Skip to content

Commit

Permalink
Merge pull request #106 from hexagonrecursion/setup-py
Browse files Browse the repository at this point in the history
Add a test for setup.py support
  • Loading branch information
takluyver committed Mar 12, 2021
2 parents 6e9ab97 + 8ba7437 commit 16fe639
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/samples/setup-py/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
6 changes: 6 additions & 0 deletions tests/samples/setup-py/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from setuptools import setup

setup(
name='pep517-test-setup-py-support',
version='1.0'
)
9 changes: 9 additions & 0 deletions tests/test_call_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,12 @@ def test_issue_104():
'__init__.py', '__init__.pyc', '_in_process.py', '_in_process.pyc',
'__pycache__',
}


def test_setup_py():
hooks = get_hooks('setup-py')
with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
res = hooks.get_requires_for_build_wheel({})
# Some versions of setuptools list setuptools itself here
res = [x for x in res if x != 'setuptools']
assert res == ['wheel']

0 comments on commit 16fe639

Please sign in to comment.