|
19 | 19 | import pathlib |
20 | 20 | import shutil |
21 | 21 | import sys |
| 22 | +import importlib.machinery as imm |
22 | 23 |
|
23 | 24 | import skbuild |
24 | 25 | import skbuild.setuptools_wrap |
|
28 | 29 |
|
29 | 30 | import versioneer |
30 | 31 |
|
| 32 | +""" |
| 33 | +Get the project version |
| 34 | +""" |
| 35 | +thefile_path = os.path.abspath(os.path.dirname(__file__)) |
| 36 | +version_mod = imm.SourceFileLoader( |
| 37 | + "version", os.path.join(thefile_path, "dpctl", "_version.py") |
| 38 | +).load_module() |
| 39 | +__version__ = version_mod.get_versions()["version"] |
| 40 | + |
31 | 41 | # Get long description |
32 | 42 | with open("README.md", "r", encoding="utf-8") as file: |
33 | 43 | long_description = file.read() |
34 | 44 |
|
| 45 | +CLASSIFIERS = """\ |
| 46 | +Development Status :: 3 - Alpha |
| 47 | +Intended Audience :: Science/Research |
| 48 | +Intended Audience :: Developers |
| 49 | +License :: OSI Approved :: Apache Software License |
| 50 | +Programming Language :: C |
| 51 | +Programming Language :: Python |
| 52 | +Programming Language :: Python :: 3 |
| 53 | +Programming Language :: Python :: 3.8 |
| 54 | +Programming Language :: Python :: 3.9 |
| 55 | +Programming Language :: Python :: 3.10 |
| 56 | +Programming Language :: Python :: Implementation :: CPython |
| 57 | +Topic :: Software Development |
| 58 | +Topic :: Scientific/Engineering |
| 59 | +Operating System :: Microsoft :: Windows |
| 60 | +Operating System :: POSIX |
| 61 | +Operating System :: Unix |
| 62 | +""" |
35 | 63 |
|
36 | 64 | def cleanup_destination(cmake_manifest): |
37 | 65 | """Delete library files from dpctl/ folder before |
@@ -131,7 +159,7 @@ def _get_cmdclass(): |
131 | 159 |
|
132 | 160 | skbuild.setup( |
133 | 161 | name="dpctl", |
134 | | - version=versioneer.get_version(), |
| 162 | + version=__version__, |
135 | 163 | cmdclass=_get_cmdclass(), |
136 | 164 | description="A lightweight Python wrapper for a subset of SYCL.", |
137 | 165 | long_description=long_description, |
@@ -165,11 +193,7 @@ def _get_cmdclass(): |
165 | 193 | "coverage": ["Cython", "pytest", "pytest-cov", "coverage", "tomli"], |
166 | 194 | }, |
167 | 195 | keywords="dpctl", |
168 | | - classifiers=[ |
169 | | - "Development Status :: 3 - Alpha", |
170 | | - "Programming Language :: Python :: 3.7", |
171 | | - "Programming Language :: Python :: 3.8", |
172 | | - "Programming Language :: Python :: 3.9", |
173 | | - ], |
| 196 | + classifiers=[_f for _f in CLASSIFIERS.split('\n') if _f], |
| 197 | + platforms=["Linux", "Windows"], |
174 | 198 | cmake_process_manifest_hook=cleanup_destination, |
175 | 199 | ) |
0 commit comments