|
|
50645e1 |
No pyproject.toml, nothing installed:
|
|
|
50645e1 |
freeze_output: |
|
|
|
50645e1 |
# empty
|
|
|
50645e1 |
expected: |
|
|
|
50645e1 |
python3dist(setuptools) >= 40.8
|
|
|
50645e1 |
python3dist(wheel)
|
|
|
50645e1 |
result: 0
|
|
|
50645e1 |
|
|
|
50645e1 |
Nothing installed yet:
|
|
|
50645e1 |
freeze_output: |
|
|
|
50645e1 |
# empty
|
|
|
50645e1 |
pyproject.toml: |
|
|
|
50645e1 |
# empty
|
|
|
50645e1 |
expected: |
|
|
|
50645e1 |
python3dist(setuptools) >= 40.8
|
|
|
50645e1 |
python3dist(wheel)
|
|
|
50645e1 |
result: 0
|
|
|
50645e1 |
|
|
|
50645e1 |
Insufficient version of setuptools:
|
|
|
50645e1 |
freeze_output: |
|
|
|
50645e1 |
setuptools==5
|
|
|
50645e1 |
wheel==1
|
|
|
50645e1 |
pyproject.toml: |
|
|
|
50645e1 |
# empty
|
|
|
50645e1 |
expected: |
|
|
|
50645e1 |
python3dist(setuptools) >= 40.8
|
|
|
50645e1 |
python3dist(wheel)
|
|
|
50645e1 |
result: 0
|
|
|
50645e1 |
|
|
|
50645e1 |
Empty pyproject.toml, empty setup.py:
|
|
|
50645e1 |
freeze_output: |
|
|
|
50645e1 |
setuptools==50
|
|
|
50645e1 |
wheel==1
|
|
|
50645e1 |
setup.py: |
|
|
|
50645e1 |
expected: |
|
|
|
50645e1 |
python3dist(setuptools) >= 40.8
|
|
|
50645e1 |
python3dist(wheel)
|
|
|
50645e1 |
python3dist(wheel)
|
|
|
50645e1 |
result: 0
|
|
|
50645e1 |
|
|
|
50645e1 |
Default build system, empty setup.py:
|
|
|
50645e1 |
freeze_output: |
|
|
|
50645e1 |
setuptools==50
|
|
|
50645e1 |
wheel==1
|
|
|
50645e1 |
pyproject.toml: |
|
|
|
50645e1 |
# empty
|
|
|
50645e1 |
setup.py: |
|
|
|
50645e1 |
expected: |
|
|
|
50645e1 |
python3dist(setuptools) >= 40.8
|
|
|
50645e1 |
python3dist(wheel)
|
|
|
50645e1 |
python3dist(wheel)
|
|
|
50645e1 |
result: 0
|
|
|
50645e1 |
|
|
|
50645e1 |
Erroring setup.py:
|
|
|
50645e1 |
freeze_output: |
|
|
|
50645e1 |
setuptools==50
|
|
|
50645e1 |
wheel==1
|
|
|
50645e1 |
setup.py: |
|
|
|
50645e1 |
exit(77)
|
|
|
50645e1 |
result: 77
|
|
|
50645e1 |
|
|
|
50645e1 |
Bad character in version:
|
|
|
50645e1 |
freeze_output: |
|
|
|
50645e1 |
pyproject.toml: |
|
|
|
50645e1 |
[build-system]
|
|
|
50645e1 |
requires = ["pkg == 0.$.^.*"]
|
|
|
50645e1 |
except: ValueError
|
|
|
50645e1 |
|
|
|
50645e1 |
Build system dependencies in pyproject.toml:
|
|
|
50645e1 |
freeze_output: |
|
|
|
50645e1 |
setuptools==50
|
|
|
50645e1 |
wheel==1
|
|
|
50645e1 |
pyproject.toml: |
|
|
|
50645e1 |
[build-system]
|
|
|
50645e1 |
requires = [
|
|
|
50645e1 |
"foo",
|
|
|
50645e1 |
"ne!=1",
|
|
|
50645e1 |
"ge>=1.2",
|
|
|
50645e1 |
"le <= 1.2.3",
|
|
|
50645e1 |
"lt < 1.2.3.4 ",
|
|
|
50645e1 |
" gt > 1.2.3.4.5",
|
|
|
50645e1 |
"combo >2, <5, != 3.0.0",
|
|
|
50645e1 |
"invalid!!ignored",
|
|
|
50645e1 |
"py2 ; python_version < '2.7'",
|
|
|
50645e1 |
"py3 ; python_version > '3.0'",
|
|
|
50645e1 |
"pkg [extra-currently-ignored]",
|
|
|
50645e1 |
]
|
|
|
50645e1 |
expected: |
|
|
|
50645e1 |
python3dist(foo)
|
|
|
50645e1 |
(python3dist(ne) < 1 or python3dist(ne) > 1.0)
|
|
|
50645e1 |
python3dist(ge) >= 1.2
|
|
|
50645e1 |
python3dist(le) <= 1.2.3
|
|
|
50645e1 |
python3dist(lt) < 1.2.3.4
|
|
|
50645e1 |
python3dist(gt) > 1.2.3.4.5
|
|
|
50645e1 |
((python3dist(combo) < 3 or python3dist(combo) > 3.0) and python3dist(combo) < 5 and python3dist(combo) > 2)
|
|
|
50645e1 |
python3dist(py3)
|
|
|
50645e1 |
python3dist(pkg)
|
|
|
50645e1 |
python3dist(setuptools) >= 40.8
|
|
|
50645e1 |
python3dist(wheel)
|
|
|
50645e1 |
result: 0
|
|
|
50645e1 |
|
|
|
bc156c4 |
Default build system, build dependencies in setup.py:
|
|
|
50645e1 |
freeze_output: |
|
|
|
50645e1 |
setuptools==50
|
|
|
50645e1 |
wheel==1
|
|
|
50645e1 |
setup.py: |
|
|
|
50645e1 |
from setuptools import setup
|
|
|
50645e1 |
setup(
|
|
|
50645e1 |
name='test',
|
|
|
50645e1 |
version='0.1',
|
|
|
50645e1 |
setup_requires=['foo', 'bar!=2'],
|
|
|
bc156c4 |
install_requires=['inst'],
|
|
|
50645e1 |
)
|
|
|
50645e1 |
expected: |
|
|
|
50645e1 |
python3dist(setuptools) >= 40.8
|
|
|
50645e1 |
python3dist(wheel)
|
|
|
50645e1 |
python3dist(wheel)
|
|
|
50645e1 |
python3dist(foo)
|
|
|
50645e1 |
(python3dist(bar) < 2 or python3dist(bar) > 2.0)
|
|
|
50645e1 |
result: 0
|
|
|
bc156c4 |
|
|
|
bc156c4 |
Default build system, run dependencies in setup.py:
|
|
|
bc156c4 |
freeze_output: |
|
|
|
bc156c4 |
setuptools==50
|
|
|
bc156c4 |
wheel==1
|
|
|
bc156c4 |
pyyaml==1
|
|
|
bc156c4 |
include_runtime: true
|
|
|
bc156c4 |
setup.py: |
|
|
|
bc156c4 |
from setuptools import setup
|
|
|
bc156c4 |
setup(
|
|
|
bc156c4 |
name='test',
|
|
|
bc156c4 |
version='0.1',
|
|
|
bc156c4 |
setup_requires=['pyyaml'], # nb. setuptools will try to install this
|
|
|
bc156c4 |
install_requires=['inst > 1', 'inst2 < 3'],
|
|
|
bc156c4 |
)
|
|
|
bc156c4 |
expected: |
|
|
|
bc156c4 |
python3dist(setuptools) >= 40.8
|
|
|
bc156c4 |
python3dist(wheel)
|
|
|
bc156c4 |
python3dist(wheel)
|
|
|
bc156c4 |
python3dist(pyyaml)
|
|
|
bc156c4 |
python3dist(inst) > 1
|
|
|
bc156c4 |
python3dist(inst2) < 3
|
|
|
bc156c4 |
result: 0
|
|
|
c7e7d1e |
|
|
|
d6e6bb7 |
Run dependencies with extras (not selected):
|
|
|
c7e7d1e |
freeze_output: |
|
|
|
c7e7d1e |
setuptools==50
|
|
|
c7e7d1e |
wheel==1
|
|
|
c7e7d1e |
pyyaml==1
|
|
|
c7e7d1e |
include_runtime: true
|
|
|
d6e6bb7 |
setup.py: &pytest_setup_py |
|
|
|
c7e7d1e |
# slightly abriged copy of pytest's setup.py
|
|
|
c7e7d1e |
from setuptools import setup
|
|
|
c7e7d1e |
|
|
|
c7e7d1e |
INSTALL_REQUIRES = [
|
|
|
c7e7d1e |
"py>=1.5.0",
|
|
|
c7e7d1e |
"six>=1.10.0",
|
|
|
c7e7d1e |
"setuptools",
|
|
|
c7e7d1e |
"attrs>=17.4.0",
|
|
|
c7e7d1e |
'more-itertools>=4.0.0,<6.0.0;python_version<="2.7"',
|
|
|
c7e7d1e |
'more-itertools>=4.0.0;python_version>"2.7"',
|
|
|
c7e7d1e |
"atomicwrites>=1.0",
|
|
|
c7e7d1e |
'funcsigs>=1.0;python_version<"3.0"',
|
|
|
c7e7d1e |
'pathlib2>=2.2.0;python_version<"3.6"',
|
|
|
c7e7d1e |
'colorama;sys_platform=="win32"',
|
|
|
c7e7d1e |
"pluggy>=0.11",
|
|
|
c7e7d1e |
]
|
|
|
c7e7d1e |
|
|
|
c7e7d1e |
def main():
|
|
|
c7e7d1e |
setup(
|
|
|
c7e7d1e |
setup_requires=["setuptools>=40.0"],
|
|
|
c7e7d1e |
# fmt: off
|
|
|
c7e7d1e |
extras_require={
|
|
|
c7e7d1e |
"testing": [
|
|
|
c7e7d1e |
"argcomplete",
|
|
|
c7e7d1e |
"hypothesis>=3.56",
|
|
|
c7e7d1e |
"nose",
|
|
|
c7e7d1e |
"requests",
|
|
|
c7e7d1e |
"mock;python_version=='2.7'",
|
|
|
c7e7d1e |
],
|
|
|
c7e7d1e |
},
|
|
|
c7e7d1e |
# fmt: on
|
|
|
c7e7d1e |
install_requires=INSTALL_REQUIRES,
|
|
|
c7e7d1e |
)
|
|
|
c7e7d1e |
|
|
|
c7e7d1e |
if __name__ == "__main__":
|
|
|
c7e7d1e |
main()
|
|
|
c7e7d1e |
expected: |
|
|
|
c7e7d1e |
python3dist(setuptools) >= 40.8
|
|
|
c7e7d1e |
python3dist(wheel)
|
|
|
c7e7d1e |
python3dist(wheel)
|
|
|
c7e7d1e |
python3dist(setuptools) >= 40
|
|
|
c7e7d1e |
python3dist(py) >= 1.5
|
|
|
c7e7d1e |
python3dist(six) >= 1.10
|
|
|
c7e7d1e |
python3dist(setuptools)
|
|
|
c7e7d1e |
python3dist(attrs) >= 17.4
|
|
|
c7e7d1e |
python3dist(atomicwrites) >= 1
|
|
|
c7e7d1e |
python3dist(pluggy) >= 0.11
|
|
|
c7e7d1e |
python3dist(more-itertools) >= 4
|
|
|
c7e7d1e |
result: 0
|
|
|
d6e6bb7 |
|
|
|
d6e6bb7 |
Run dependencies with extras (selected):
|
|
|
d6e6bb7 |
freeze_output: |
|
|
|
d6e6bb7 |
setuptools==50
|
|
|
d6e6bb7 |
wheel==1
|
|
|
d6e6bb7 |
pyyaml==1
|
|
|
d6e6bb7 |
include_runtime: true
|
|
|
d6e6bb7 |
extras: testing
|
|
|
d6e6bb7 |
setup.py: *pytest_setup_py
|
|
|
d6e6bb7 |
expected: |
|
|
|
d6e6bb7 |
python3dist(setuptools) >= 40.8
|
|
|
d6e6bb7 |
python3dist(wheel)
|
|
|
d6e6bb7 |
python3dist(wheel)
|
|
|
d6e6bb7 |
python3dist(setuptools) >= 40
|
|
|
d6e6bb7 |
python3dist(py) >= 1.5
|
|
|
d6e6bb7 |
python3dist(six) >= 1.10
|
|
|
d6e6bb7 |
python3dist(setuptools)
|
|
|
d6e6bb7 |
python3dist(attrs) >= 17.4
|
|
|
d6e6bb7 |
python3dist(atomicwrites) >= 1
|
|
|
d6e6bb7 |
python3dist(pluggy) >= 0.11
|
|
|
d6e6bb7 |
python3dist(more-itertools) >= 4
|
|
|
d6e6bb7 |
python3dist(argcomplete)
|
|
|
d6e6bb7 |
python3dist(hypothesis) >= 3.56
|
|
|
d6e6bb7 |
python3dist(nose)
|
|
|
d6e6bb7 |
python3dist(requests)
|
|
|
d6e6bb7 |
result: 0
|
|
|
aca2f6a |
|
|
|
aca2f6a |
Run dependencies with multiple extras:
|
|
|
aca2f6a |
xfail: requirement.marker.evaluate seems to not support multiple extras
|
|
|
aca2f6a |
freeze_output: |
|
|
|
aca2f6a |
setuptools==50
|
|
|
aca2f6a |
wheel==1
|
|
|
aca2f6a |
pyyaml==1
|
|
|
aca2f6a |
include_runtime: true
|
|
|
aca2f6a |
extras: testing,more-testing, even-more-testing , cool-feature
|
|
|
aca2f6a |
setup.py: |
|
|
|
aca2f6a |
from setuptools import setup
|
|
|
aca2f6a |
setup(
|
|
|
aca2f6a |
extras_require={
|
|
|
aca2f6a |
'testing': ['dep1'],
|
|
|
aca2f6a |
'more-testing': ['dep2'],
|
|
|
aca2f6a |
'even-more-testing': ['dep3'],
|
|
|
aca2f6a |
'cool-feature': ['dep4'],
|
|
|
aca2f6a |
},
|
|
|
aca2f6a |
)
|
|
|
aca2f6a |
expected: |
|
|
|
aca2f6a |
python3dist(setuptools) >= 40.8
|
|
|
aca2f6a |
python3dist(wheel)
|
|
|
aca2f6a |
python3dist(wheel)
|
|
|
aca2f6a |
python3dist(dep1)
|
|
|
aca2f6a |
python3dist(dep2)
|
|
|
aca2f6a |
python3dist(dep3)
|
|
|
aca2f6a |
python3dist(dep4)
|
|
|
aca2f6a |
result: 0
|