Skip to content

Commit dfabea4

Browse files
Add metadata to setup.py
1 parent 33c241c commit dfabea4

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

setup.py

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# limitations under the License.
1616

1717
import glob
18+
import importlib.machinery as imm
1819
import os.path
1920
import pathlib
2021
import shutil
@@ -28,10 +29,37 @@
2829

2930
import versioneer
3031

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+
3141
# Get long description
3242
with open("README.md", "r", encoding="utf-8") as file:
3343
long_description = file.read()
3444

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+
"""
3563

3664
def cleanup_destination(cmake_manifest):
3765
"""Delete library files from dpctl/ folder before
@@ -131,7 +159,7 @@ def _get_cmdclass():
131159

132160
skbuild.setup(
133161
name="dpctl",
134-
version=versioneer.get_version(),
162+
version=__version__,
135163
cmdclass=_get_cmdclass(),
136164
description="A lightweight Python wrapper for a subset of SYCL.",
137165
long_description=long_description,
@@ -165,11 +193,7 @@ def _get_cmdclass():
165193
"coverage": ["Cython<3", "pytest", "pytest-cov", "coverage", "tomli"],
166194
},
167195
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"],
174198
cmake_process_manifest_hook=cleanup_destination,
175199
)

0 commit comments

Comments
 (0)