Skip to content

Commit 0eb2fdf

Browse files
Merge pull request #1269 from IntelPython/fix/wheel-metadata
Fix metadata in setup.py for wheels distribution
2 parents f52182d + 8e6a55f commit 0eb2fdf

File tree

1 file changed

+32
-7
lines changed

1 file changed

+32
-7
lines changed

Diff for: setup.py

+32-7
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,38 @@
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+
"""
63+
3564

3665
def cleanup_destination(cmake_manifest):
3766
"""Delete library files from dpctl/ folder before
@@ -131,7 +160,7 @@ def _get_cmdclass():
131160

132161
skbuild.setup(
133162
name="dpctl",
134-
version=versioneer.get_version(),
163+
version=__version__,
135164
cmdclass=_get_cmdclass(),
136165
description="A lightweight Python wrapper for a subset of SYCL.",
137166
long_description=long_description,
@@ -165,11 +194,7 @@ def _get_cmdclass():
165194
"coverage": ["Cython<3", "pytest", "pytest-cov", "coverage", "tomli"],
166195
},
167196
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"],
174199
cmake_process_manifest_hook=cleanup_destination,
175200
)

0 commit comments

Comments
 (0)