|
15 | 15 | # limitations under the License.
|
16 | 16 |
|
17 | 17 | import glob
|
| 18 | +import importlib.machinery as imm |
18 | 19 | import os.path
|
19 | 20 | import pathlib
|
20 | 21 | import shutil
|
|
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 :: 4 - Beta |
| 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 | +""" |
| 63 | + |
35 | 64 |
|
36 | 65 | def cleanup_destination(cmake_manifest):
|
37 | 66 | """Delete library files from dpctl/ folder before
|
@@ -131,7 +160,7 @@ def _get_cmdclass():
|
131 | 160 |
|
132 | 161 | skbuild.setup(
|
133 | 162 | name="dpctl",
|
134 |
| - version=versioneer.get_version(), |
| 163 | + version=__version__, |
135 | 164 | cmdclass=_get_cmdclass(),
|
136 | 165 | description="A lightweight Python wrapper for a subset of SYCL.",
|
137 | 166 | long_description=long_description,
|
@@ -165,11 +194,7 @@ def _get_cmdclass():
|
165 | 194 | "coverage": ["Cython<3", "pytest", "pytest-cov", "coverage", "tomli"],
|
166 | 195 | },
|
167 | 196 | 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 |
| - ], |
| 197 | + classifiers=[_f for _f in CLASSIFIERS.split("\n") if _f], |
| 198 | + platforms=["Linux", "Windows"], |
174 | 199 | cmake_process_manifest_hook=cleanup_destination,
|
175 | 200 | )
|
0 commit comments