Skip to content

Add metadata to setup.py #1296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 32 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# limitations under the License.

import glob
import importlib.machinery as imm
import os.path
import pathlib
import shutil
Expand All @@ -28,10 +29,38 @@

import versioneer

"""
Get the project version
"""
thefile_path = os.path.abspath(os.path.dirname(__file__))
version_mod = imm.SourceFileLoader(
"version", os.path.join(thefile_path, "dpctl", "_version.py")
).load_module()
__version__ = version_mod.get_versions()["version"]

# Get long description
with open("README.md", "r", encoding="utf-8") as file:
long_description = file.read()

CLASSIFIERS = """\
Development Status :: 4 - Beta
Intended Audience :: Science/Research
Intended Audience :: Developers
License :: OSI Approved :: Apache Software License
Programming Language :: C
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: Implementation :: CPython
Topic :: Software Development
Topic :: Scientific/Engineering
Operating System :: Microsoft :: Windows
Operating System :: POSIX
Operating System :: Unix
"""


def cleanup_destination(cmake_manifest):
"""Delete library files from dpctl/ folder before
Expand Down Expand Up @@ -131,7 +160,7 @@ def _get_cmdclass():

skbuild.setup(
name="dpctl",
version=versioneer.get_version(),
version=__version__,
cmdclass=_get_cmdclass(),
description="A lightweight Python wrapper for a subset of SYCL.",
long_description=long_description,
Expand Down Expand Up @@ -165,11 +194,7 @@ def _get_cmdclass():
"coverage": ["Cython<3", "pytest", "pytest-cov", "coverage", "tomli"],
},
keywords="dpctl",
classifiers=[
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
classifiers=[_f for _f in CLASSIFIERS.split("\n") if _f],
platforms=["Linux", "Windows"],
cmake_process_manifest_hook=cleanup_destination,
)