Skip to content
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

enforce correct python tags for pure wheels from setup.py #197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[build-system]
# Further build requirements come from setup.py via the PEP 517 interface
requires = [
"packaging",
"setuptools>=42",
]
build-backend = "setuptools.build_meta"
10 changes: 10 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ def has_ext_modules(foo):

def run_setup(with_extensions=True):
extensions = []
options = {}
if with_extensions:
extensions = [
Extension(
Expand All @@ -232,6 +233,14 @@ def run_setup(with_extensions=True):
depends=glob.glob('%s/*.h' % srcdir) + ['setup.py'],
),
]
else:
import packaging.tags

tag_name = packaging.tags.interpreter_name()
tag_version = packaging.tags.interpreter_version()
options['bdist_wheel'] = {
'python_tag':tag_name+tag_version,
}
packages = find_packages(
where=pkgdir,
exclude=['ez_setup', 'examples', 'doc',],
Expand Down Expand Up @@ -276,6 +285,7 @@ def run_setup(with_extensions=True):
packages=packages,
package_dir={'': pkgdir},
ext_modules=extensions,
options=options,
)
# add dependencies
depend = [dill_version]
Expand Down