Blame SOURCES/pyproject_buildrequires_testcases.yaml

7ef706
No pyproject.toml, nothing installed:
7ef706
  installed:
7ef706
    # empty
7ef706
  except: FileNotFoundError
7ef706
7ef706
Nothing installed yet:
7ef706
  installed:
7ef706
    # empty
7ef706
  pyproject.toml: |
7ef706
    # empty
7ef706
  expected: |
7ef706
    python3dist(setuptools) >= 40.8
7ef706
    python3dist(wheel)
7ef706
  except: FileNotFoundError
7ef706
7ef706
Insufficient version of setuptools:
7ef706
  installed:
7ef706
    setuptools: 5
7ef706
    wheel: 1
7ef706
    toml: 1
7ef706
  pyproject.toml: |
7ef706
    # empty
7ef706
  setup.py: |
7ef706
  expected: |
7ef706
    python3dist(setuptools) >= 40.8
7ef706
    python3dist(wheel)
7ef706
  result: 0
7ef706
7ef706
No pyproject.toml, empty setup.py:
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
  include_runtime: false
7ef706
  setup.py: |
7ef706
  expected: |
7ef706
    python3dist(setuptools) >= 40.8
7ef706
    python3dist(wheel)
7ef706
    python3dist(wheel)
7ef706
  result: 0
7ef706
7ef706
Default build system, empty setup.py:
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
    toml: 1
7ef706
  include_runtime: false
7ef706
  pyproject.toml: |
7ef706
    # empty
7ef706
  setup.py: |
7ef706
  expected: |
7ef706
    python3dist(setuptools) >= 40.8
7ef706
    python3dist(wheel)
7ef706
    python3dist(wheel)
7ef706
  result: 0
7ef706
7ef706
pyproject.toml with build-backend and setup.py:
7ef706
  generate_extras: true
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
    toml: 1
7ef706
  setup.py: |
7ef706
    # empty
7ef706
  pyproject.toml: |
7ef706
    [build-system]
7ef706
    requires = [
7ef706
        "foo",
7ef706
    ]
7ef706
    build-backend = "foo.build"
7ef706
  expected: |
7ef706
    python3dist(foo)
7ef706
  result: 0
7ef706
7ef706
Erroring setup.py:
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
  setup.py: |
7ef706
    exit(77)
7ef706
  result: 77
7ef706
7ef706
Bad character in version:
7ef706
  installed:
7ef706
    toml: 1
7ef706
  pyproject.toml: |
7ef706
    [build-system]
7ef706
    requires = ["pkg == 0.$.^.*"]
7ef706
  except: ValueError
7ef706
7ef706
Single value version with unsupported compatible operator:
7ef706
  installed:
7ef706
    toml: 1
7ef706
  pyproject.toml: |
7ef706
    [build-system]
7ef706
    requires = ["pkg ~= 42", "foo"]
7ef706
    build-backend = "foo.build"
7ef706
  except: ValueError
7ef706
7ef706
Asterisk in version with unsupported compatible operator:
7ef706
  installed:
7ef706
    toml: 1
7ef706
  pyproject.toml: |
7ef706
    [build-system]
7ef706
    requires = ["pkg ~= 0.1.*", "foo"]
7ef706
    build-backend = "foo.build"
7ef706
  except: ValueError
7ef706
7ef706
Local path as requirement:
7ef706
  installed:
7ef706
    toml: 1
7ef706
  pyproject.toml: |
7ef706
    [build-system]
7ef706
    requires = ["./pkg-1.2.3.tar.gz", "foo"]
7ef706
    build-backend = "foo.build"
7ef706
  except: ValueError
7ef706
7ef706
Pip's egg=pkgName requirement not in requirements file:
7ef706
  installed:
7ef706
    toml: 1
7ef706
  pyproject.toml: |
7ef706
    [build-system]
7ef706
    requires = ["git+https://github.com/monty/spam.git@master#egg=spam", "foo"]
7ef706
    build-backend = "foo.build"
7ef706
  except: ValueError
7ef706
7ef706
URL without egg fragment as requirement:
7ef706
  installed:
7ef706
    toml: 1
7ef706
  pyproject.toml: |
7ef706
    [build-system]
7ef706
    requires = ["git+https://github.com/pkg-dev/pkg.git@96dbe5e3", "foo"]
7ef706
    build-backend = "foo.build"
7ef706
  except: ValueError
7ef706
7ef706
Build system dependencies in pyproject.toml with extras:
7ef706
  generate_extras: true
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
    toml: 1
7ef706
  pyproject.toml: |
7ef706
    [build-system]
7ef706
    requires = [
7ef706
        "foo",
7ef706
        "bar[bAz] > 5",
7ef706
        "ne!=1",
7ef706
        "ge>=1.2.0",
7ef706
        "le <= 1.2.3",
7ef706
        "lt < 1.2.3.4      ",
7ef706
        "    gt > 1.2.3.4.5",
7ef706
        "compatible ~= 0.4.0",
7ef706
        "equal == 0.5.0",
7ef706
        "arbitrary_equal === 0.6.0",
7ef706
        "asterisk_equal == 0.6.*",
7ef706
        "appdirs@https://github.com/ActiveState/appdirs/archive/8eacfa312d77aba28d483fbfb6f6fc54099622be.zip",
7ef706
        "multi[Extras1,Extras2] == 6.0",
7ef706
        "combo >2, <5, != 3.0.0",
7ef706
        "py2 ; python_version < '2.7'",
7ef706
        "py3 ; python_version > '3.0'",
7ef706
    ]
7ef706
    build-backend = "foo.build"
7ef706
  expected: |
7ef706
    python3dist(foo)
7ef706
    python3dist(bar) > 5.0
7ef706
    python3dist(bar[baz]) > 5.0
7ef706
    (python3dist(ne) < 1 or python3dist(ne) > 1)
7ef706
    python3dist(ge) >= 1.2
7ef706
    python3dist(le) <= 1.2.3
7ef706
    python3dist(lt) < 1.2.3.4~~
7ef706
    python3dist(gt) > 1.2.3.4.5.0
7ef706
    (python3dist(compatible) >= 0.4 with python3dist(compatible) < 0.5)
7ef706
    python3dist(equal) = 0.5
7ef706
    python3dist(arbitrary-equal) = 0.6
7ef706
    (python3dist(asterisk-equal) >= 0.6 with python3dist(asterisk-equal) < 0.7)
7ef706
    python3dist(appdirs)
7ef706
    python3dist(multi) = 6
7ef706
    python3dist(multi[extras1]) = 6
7ef706
    python3dist(multi[extras2]) = 6
7ef706
    ((python3dist(combo) < 3 or python3dist(combo) > 3) with python3dist(combo) < 5~~ with python3dist(combo) > 2.0)
7ef706
    python3dist(py3)
7ef706
  stderr_contains: "WARNING: Simplifying 'appdirs@https://github.com/ActiveState/appdirs/archive/8eacfa312d77aba28d483fbfb6f6fc54099622be.zip' to 'appdirs'."
7ef706
  result: 0
7ef706
7ef706
Build system dependencies in pyproject.toml without extras:
7ef706
  generate_extras: false
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
    toml: 1
7ef706
  pyproject.toml: |
7ef706
    [build-system]
7ef706
    requires = [
7ef706
        "bar[Baz] > 5",
7ef706
        "multi[extras1,extras2] == 6.0",
7ef706
    ]
7ef706
    build-backend = "foo.build"
7ef706
  expected: |
7ef706
    python3dist(bar) > 5.0
7ef706
    python3dist(multi) = 6
7ef706
  result: 0
7ef706
7ef706
Default build system, build dependencies in setup.py:
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
  include_runtime: false
7ef706
  setup.py: |
7ef706
    from setuptools import setup
7ef706
    setup(
7ef706
        name='test',
7ef706
        version='0.1',
7ef706
        setup_requires=['foo', 'bar!=2', 'baz~=1.1.1'],
7ef706
        install_requires=['inst'],
7ef706
    )
7ef706
  expected: |
7ef706
    python3dist(setuptools) >= 40.8
7ef706
    python3dist(wheel)
7ef706
    python3dist(wheel)
7ef706
    python3dist(foo)
7ef706
    (python3dist(bar) < 2 or python3dist(bar) > 2)
7ef706
    (python3dist(baz) >= 1.1.1 with python3dist(baz) < 1.2)
7ef706
  result: 0
7ef706
7ef706
Default build system, run dependencies in setup.py:
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
    pyyaml: 1
7ef706
  setup.py: |
7ef706
    from setuptools import setup
7ef706
    setup(
7ef706
        name='test',
7ef706
        version='0.1',
7ef706
        setup_requires=['pyyaml'],  # nb. setuptools will try to install this
7ef706
        install_requires=['inst > 1', 'inst2 < 3'],
7ef706
    )
7ef706
  expected: |
7ef706
    python3dist(setuptools) >= 40.8
7ef706
    python3dist(wheel)
7ef706
    python3dist(wheel)
7ef706
    python3dist(pyyaml)
7ef706
    python3dist(inst) > 1.0
7ef706
    python3dist(inst2) < 3~~
7ef706
  result: 0
7ef706
7ef706
Run dependencies with extras (not selected):
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
    pyyaml: 1
7ef706
  setup.py: &pytest_setup_py |
7ef706
        # slightly abriged copy of pytest's setup.py
7ef706
        from setuptools import setup
7ef706
7ef706
        INSTALL_REQUIRES = [
7ef706
            "py>=1.5.0",
7ef706
            "six>=1.10.0",
7ef706
            "setuptools",
7ef706
            "attrs>=17.4.0",
7ef706
            'more-itertools>=4.0.0,<6.0.0;python_version<="2.7"',
7ef706
            'more-itertools>=4.0.0;python_version>"2.7"',
7ef706
            "atomicwrites>=1.0",
7ef706
            'funcsigs>=1.0;python_version<"3.0"',
7ef706
            'pathlib2>=2.2.0;python_version<"3.6"',
7ef706
            'colorama;sys_platform=="win32"',
7ef706
            "pluggy>=0.11",
7ef706
        ]
7ef706
7ef706
        def main():
7ef706
            setup(
20b2b6
                name = "pytest",
20b2b6
                version = "6.6.6",
7ef706
                setup_requires=["setuptools>=40.0"],
7ef706
                # fmt: off
7ef706
                extras_require={
7ef706
                    "testing": [
7ef706
                        "argcomplete",
7ef706
                        "hypothesis>=3.56",
7ef706
                        "nose",
7ef706
                        "requests",
7ef706
                        "mock;python_version=='2.7'",
7ef706
                    ],
7ef706
                },
7ef706
                # fmt: on
7ef706
                install_requires=INSTALL_REQUIRES,
7ef706
            )
7ef706
7ef706
        if __name__ == "__main__":
7ef706
            main()
7ef706
  expected: |
7ef706
    python3dist(setuptools) >= 40.8
7ef706
    python3dist(wheel)
7ef706
    python3dist(wheel)
7ef706
    python3dist(setuptools) >= 40
7ef706
    python3dist(py) >= 1.5
7ef706
    python3dist(six) >= 1.10
7ef706
    python3dist(setuptools)
7ef706
    python3dist(attrs) >= 17.4
7ef706
    python3dist(atomicwrites) >= 1
7ef706
    python3dist(pluggy) >= 0.11
7ef706
    python3dist(more-itertools) >= 4
7ef706
  result: 0
7ef706
7ef706
Run dependencies with extras (selected):
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
    pyyaml: 1
7ef706
  include_runtime: true
7ef706
  extras:
7ef706
    - testing
7ef706
  setup.py: *pytest_setup_py
7ef706
  expected: |
7ef706
    python3dist(setuptools) >= 40.8
7ef706
    python3dist(wheel)
7ef706
    python3dist(wheel)
7ef706
    python3dist(setuptools) >= 40
7ef706
    python3dist(py) >= 1.5
7ef706
    python3dist(six) >= 1.10
7ef706
    python3dist(setuptools)
7ef706
    python3dist(attrs) >= 17.4
7ef706
    python3dist(atomicwrites) >= 1
7ef706
    python3dist(pluggy) >= 0.11
7ef706
    python3dist(more-itertools) >= 4
7ef706
    python3dist(argcomplete)
7ef706
    python3dist(hypothesis) >= 3.56
7ef706
    python3dist(nose)
7ef706
    python3dist(requests)
7ef706
  result: 0
7ef706
7ef706
Run dependencies with multiple extras:
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
    pyyaml: 1
7ef706
  include_runtime: true
7ef706
  generate_extras: true
7ef706
  extras:
7ef706
    - testing,more-testing
7ef706
    - even-more-testing , cool-feature
7ef706
  setup.py: |
7ef706
    from setuptools import setup
7ef706
    setup(
7ef706
        extras_require={
7ef706
            'testing': ['dep1'],
7ef706
            'more-testing': ['dep2'],
7ef706
            'even-more-testing': ['dep3'],
7ef706
            'cool-feature': ['dep4[FOO,BAR]'],
7ef706
        },
7ef706
    )
7ef706
  expected: |
7ef706
    python3dist(setuptools) >= 40.8
7ef706
    python3dist(wheel)
7ef706
    python3dist(wheel)
7ef706
    python3dist(dep4)
7ef706
    python3dist(dep4[bar])
7ef706
    python3dist(dep4[foo])
7ef706
    python3dist(dep3)
7ef706
    python3dist(dep2)
7ef706
    python3dist(dep1)
7ef706
  result: 0
7ef706
20b2b6
Run dependencies with extras and build wheel option:
20b2b6
  installed:
20b2b6
    setuptools: 50
20b2b6
    wheel: 1
20b2b6
    pyyaml: 1
20b2b6
  include_runtime: true
20b2b6
  build_wheel: true
20b2b6
  extras:
20b2b6
    - testing
20b2b6
  setup.py: *pytest_setup_py
20b2b6
  expected: |
20b2b6
    python3dist(setuptools) >= 40.8
20b2b6
    python3dist(wheel)
20b2b6
    python3dist(wheel)
20b2b6
    python3dist(setuptools) >= 40
20b2b6
    python3dist(py) >= 1.5
20b2b6
    python3dist(six) >= 1.10
20b2b6
    python3dist(setuptools)
20b2b6
    python3dist(attrs) >= 17.4
20b2b6
    python3dist(atomicwrites) >= 1
20b2b6
    python3dist(pluggy) >= 0.11
20b2b6
    python3dist(more-itertools) >= 4
20b2b6
    python3dist(argcomplete)
20b2b6
    python3dist(hypothesis) >= 3.56
20b2b6
    python3dist(nose)
20b2b6
    python3dist(requests)
20b2b6
  result: 0
20b2b6
  stderr_contains: "Reading metadata from {wheeldir}/pytest-6.6.6-py3-none-any.whl"
20b2b6
7ef706
Tox dependencies:
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
    tox: 3.5.3
7ef706
    tox-current-env: 0.0.6
7ef706
  toxenv:
7ef706
    - py3
7ef706
  setup.py: |
7ef706
    from setuptools import setup
7ef706
    setup(
7ef706
        name='test',
7ef706
        version='0.1',
7ef706
        install_requires=['inst'],
7ef706
    )
7ef706
  tox.ini: |
7ef706
    [tox]
7ef706
    envlist = py36,py37,py38
7ef706
    [testenv]
7ef706
    deps =
7ef706
        toxdep1
7ef706
        toxdep2
7ef706
    commands =
7ef706
        true
5d3ed2
  expected:
5d3ed2
    - |  # tox 3
5d3ed2
      python3dist(setuptools) >= 40.8
5d3ed2
      python3dist(wheel)
5d3ed2
      python3dist(wheel)
5d3ed2
      python3dist(tox-current-env) >= 0.0.6
5d3ed2
      python3dist(toxdep1)
5d3ed2
      python3dist(toxdep2)
5d3ed2
      python3dist(inst)
5d3ed2
    - |  # tox 4
5d3ed2
      python3dist(setuptools) >= 40.8
5d3ed2
      python3dist(wheel)
5d3ed2
      python3dist(wheel)
5d3ed2
      python3dist(tox-current-env) >= 0.0.6
5d3ed2
      python3dist(tox)
5d3ed2
      python3dist(toxdep1)
5d3ed2
      python3dist(toxdep2)
5d3ed2
      python3dist(inst)
7ef706
  result: 0
7ef706
7ef706
Tox extras:
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
    tox: 3.5.3
7ef706
    tox-current-env: 0.0.6
7ef706
  generate_extras: true
7ef706
  toxenv:
7ef706
    - py3
7ef706
  setup.py: |
7ef706
    from setuptools import setup
7ef706
    setup(
7ef706
        name='test',
7ef706
        version='0.1',
7ef706
        install_requires=['inst'],
7ef706
        extras_require={
7ef706
            'extra1':  ['dep11 > 11', 'dep12'],
7ef706
            'extra2': ['dep21', 'dep22', 'dep23', 'extra_dep[EXTRA_DEP]'],
7ef706
            'nope': ['nopedep'],
7ef706
        }
7ef706
    )
7ef706
  tox.ini: |
7ef706
    [tox]
7ef706
    envlist = py36,py37,py38
7ef706
    [testenv]
7ef706
    deps =
7ef706
        toxdep
7ef706
    extras =
7ef706
        extra2
7ef706
        extra1
7ef706
    commands =
7ef706
        true
5d3ed2
  expected:
5d3ed2
    - |  # tox 3
5d3ed2
      python3dist(setuptools) >= 40.8
5d3ed2
      python3dist(wheel)
5d3ed2
      python3dist(wheel)
5d3ed2
      python3dist(tox-current-env) >= 0.0.6
5d3ed2
      python3dist(toxdep)
5d3ed2
      python3dist(inst)
5d3ed2
      python3dist(dep11) > 11.0
5d3ed2
      python3dist(dep12)
5d3ed2
      python3dist(dep21)
5d3ed2
      python3dist(dep22)
5d3ed2
      python3dist(dep23)
5d3ed2
      python3dist(extra-dep)
5d3ed2
      python3dist(extra-dep[extra_dep])
5d3ed2
    - |  # tox 4
5d3ed2
      python3dist(setuptools) >= 40.8
5d3ed2
      python3dist(wheel)
5d3ed2
      python3dist(wheel)
5d3ed2
      python3dist(tox-current-env) >= 0.0.6
5d3ed2
      python3dist(tox)
5d3ed2
      python3dist(toxdep)
5d3ed2
      python3dist(inst)
5d3ed2
      python3dist(dep11) > 11.0
5d3ed2
      python3dist(dep12)
5d3ed2
      python3dist(dep21)
5d3ed2
      python3dist(dep22)
5d3ed2
      python3dist(dep23)
5d3ed2
      python3dist(extra-dep)
5d3ed2
      python3dist(extra-dep[extra_dep])
7ef706
  result: 0
7ef706
7ef706
Tox provision unsatisfied:
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
    tox: 3.5.3
7ef706
    tox-current-env: 0.0.6
7ef706
  toxenv:
7ef706
    - py3
7ef706
  setup.py: |
7ef706
    from setuptools import setup
7ef706
    setup(
7ef706
        name='test',
7ef706
        version='0.1',
7ef706
        install_requires=['inst'],
7ef706
    )
7ef706
  tox.ini: |
7ef706
    [tox]
7ef706
    minversion = 3.999
7ef706
    requires =
7ef706
        setuptools > 40
7ef706
        wheel > 2
7ef706
    [testenv]
7ef706
    deps =
7ef706
        toxdep1
7ef706
        toxdep2
5d3ed2
  expected:
5d3ed2
    - |  # tox 3
5d3ed2
      python3dist(setuptools) >= 40.8
5d3ed2
      python3dist(wheel)
5d3ed2
      python3dist(wheel)
5d3ed2
      python3dist(tox-current-env) >= 0.0.6
5d3ed2
      python3dist(tox) >= 3.999
5d3ed2
      python3dist(setuptools) > 40.0
5d3ed2
      python3dist(wheel) > 2.0
5d3ed2
    - |  # tox 4
5d3ed2
      python3dist(setuptools) >= 40.8
5d3ed2
      python3dist(wheel)
5d3ed2
      python3dist(wheel)
5d3ed2
      python3dist(tox-current-env) >= 0.0.6
5d3ed2
      python3dist(tox) >= 3.999
5d3ed2
      python3dist(setuptools) > 40.0
5d3ed2
      python3dist(wheel) > 2.0
5d3ed2
      python3dist(tox) >= 3.999
7ef706
  result: 0
7ef706
7ef706
Tox provision satisfied:
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
    tox: 3.5.3
7ef706
    tox-current-env: 0.0.6
7ef706
  toxenv:
7ef706
    - py3
7ef706
  setup.py: |
7ef706
    from setuptools import setup
7ef706
    setup(
7ef706
        name='test',
7ef706
        version='0.1',
7ef706
        install_requires=['inst'],
7ef706
    )
7ef706
  tox.ini: |
7ef706
    [tox]
7ef706
    minversion = 3.5
7ef706
    requires =
7ef706
        setuptools > 40
7ef706
    [testenv]
7ef706
    deps =
7ef706
        toxdep1
7ef706
        toxdep2
5d3ed2
  expected:
5d3ed2
    - |  # tox 3
5d3ed2
      python3dist(setuptools) >= 40.8
5d3ed2
      python3dist(wheel)
5d3ed2
      python3dist(wheel)
5d3ed2
      python3dist(tox-current-env) >= 0.0.6
5d3ed2
      python3dist(tox) >= 3.5
5d3ed2
      python3dist(setuptools) > 40.0
5d3ed2
      python3dist(toxdep1)
5d3ed2
      python3dist(toxdep2)
5d3ed2
      python3dist(inst)
5d3ed2
    - |  # tox 4
5d3ed2
      python3dist(setuptools) >= 40.8
5d3ed2
      python3dist(wheel)
5d3ed2
      python3dist(wheel)
5d3ed2
      python3dist(tox-current-env) >= 0.0.6
5d3ed2
      python3dist(setuptools) > 40.0
5d3ed2
      python3dist(tox) >= 3.5
5d3ed2
      python3dist(toxdep1)
5d3ed2
      python3dist(toxdep2)
5d3ed2
      python3dist(inst)
7ef706
  result: 0
7ef706
7ef706
Default build system, unmet deps in requirements file:
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
  setup.py: |
7ef706
    from setuptools import setup
7ef706
    setup(
7ef706
        name='test',
7ef706
        version='0.1',
7ef706
    )
7ef706
  requirements.txt: |
7ef706
    lxml
7ef706
    ncclient
7ef706
    cryptography
7ef706
    paramiko
7ef706
    SQLAlchemy
7ef706
  requirement_files:
7ef706
    - requirements.txt
7ef706
  expected: |
7ef706
    python3dist(lxml)
7ef706
    python3dist(ncclient)
7ef706
    python3dist(cryptography)
7ef706
    python3dist(paramiko)
7ef706
    python3dist(sqlalchemy)
7ef706
  result: 0
7ef706
7ef706
Default build system, met deps in requirements file:
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
    lxml: 3.9
7ef706
    ncclient: 1
7ef706
    cryptography: 2
7ef706
    paramiko: 1
7ef706
    SQLAlchemy: 1.0.90
7ef706
  setup.py: |
7ef706
    from setuptools import setup
7ef706
    setup(
7ef706
        name='test',
7ef706
        version='0.1',
7ef706
    )
7ef706
  requirements.txt: |
7ef706
    lxml!=3.7.0,>=2.3    # OF-Config
7ef706
    ncclient  # OF-Config
7ef706
    cryptography!=1.5.2  # Required by paramiko
7ef706
    paramiko  # NETCONF, BGP speaker (SSH console)
7ef706
    SQLAlchemy>=1.0.10,<1.1.0  # Zebra protocol service
7ef706
  requirement_files:
7ef706
    - requirements.txt
7ef706
  expected: |
7ef706
    ((python3dist(lxml) < 3.7 or python3dist(lxml) > 3.7) with python3dist(lxml) >= 2.3)
7ef706
    python3dist(ncclient)
7ef706
    (python3dist(cryptography) < 1.5.2 or python3dist(cryptography) > 1.5.2)
7ef706
    python3dist(paramiko)
7ef706
    (python3dist(sqlalchemy) < 1.1~~ with python3dist(sqlalchemy) >= 1.0.10)
7ef706
    python3dist(setuptools) >= 40.8
7ef706
    python3dist(wheel)
7ef706
    python3dist(wheel)
7ef706
  result: 0
7ef706
7ef706
With pyproject.toml, requirements file and with -N option:
7ef706
  use_build_system: false
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
    toml: 1
7ef706
    lxml: 3.9
7ef706
    ncclient: 1
7ef706
    cryptography: 2
7ef706
    paramiko: 1
7ef706
    SQLAlchemy: 1.0.90
7ef706
  pyproject.toml: |
7ef706
    [build-system]
7ef706
    requires = [
7ef706
        "foo",
7ef706
    ]
7ef706
    build-backend = "foo.build"
7ef706
  requirements.txt: |
7ef706
    lxml
7ef706
    ncclient
7ef706
    cryptography
7ef706
    paramiko
7ef706
    SQLAlchemy
7ef706
    git+https://github.com/monty/spam.git@master#egg=spam
7ef706
  requirement_files:
7ef706
    - requirements.txt
7ef706
  expected: |
7ef706
    python3dist(lxml)
7ef706
    python3dist(ncclient)
7ef706
    python3dist(cryptography)
7ef706
    python3dist(paramiko)
7ef706
    python3dist(sqlalchemy)
7ef706
    python3dist(spam)
7ef706
  stderr_contains: "WARNING: Simplifying 'spam@git+https://github.com/monty/spam.git@master#egg=spam' to 'spam'."
7ef706
  result: 0
7ef706
7ef706
With pyproject.toml, requirements file and without -N option:
7ef706
  use_build_system: true
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
    toml: 1
7ef706
    lxml: 3.9
7ef706
    ncclient: 1
7ef706
    cryptography: 2
7ef706
    paramiko: 1
7ef706
    SQLAlchemy: 1.0.90
7ef706
    argcomplete: 1
7ef706
    hypothesis: 1
7ef706
  pyproject.toml: |
7ef706
    [build-system]
7ef706
    requires = [
7ef706
        "foo",
7ef706
    ]
7ef706
    build-backend = "foo.build"
7ef706
  requirements.txt: |
7ef706
    lxml
7ef706
    ncclient
7ef706
    cryptography
7ef706
    paramiko
7ef706
    SQLAlchemy
7ef706
  requirements1.in: |
7ef706
    argcomplete
7ef706
    hypothesis
7ef706
  requirement_files:
7ef706
    - requirements.txt
7ef706
    - requirements1.in
7ef706
  expected: |
7ef706
    python3dist(lxml)
7ef706
    python3dist(ncclient)
7ef706
    python3dist(cryptography)
7ef706
    python3dist(paramiko)
7ef706
    python3dist(sqlalchemy)
7ef706
    python3dist(argcomplete)
7ef706
    python3dist(hypothesis)
7ef706
    python3dist(foo)
7ef706
  result: 0
7ef706
7ef706
Value error if -N and -r arguments are present:
7ef706
  installed:
7ef706
    # empty
7ef706
  include_runtime: true
7ef706
  use_build_system: false
7ef706
  except: ValueError
7ef706
7ef706
Value error if -N and -e arguments are present:
7ef706
  installed:
7ef706
    # empty
7ef706
  toxenv:
7ef706
    - py3
7ef706
  use_build_system: false
7ef706
  except: ValueError
7ef706
7ef706
Weird and complex requirements file:
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
  setup.py: |
7ef706
    from setuptools import setup
7ef706
    setup(
7ef706
        name='test',
7ef706
        version='0.1',
7ef706
    )
7ef706
  requirements.txt: |
7ef706
    Normal_Req ~= 1.2.0
7ef706
7ef706
    good@git+https://github.com/monty/spam.git@master#egg=bad
7ef706
    git+https://github.com/monty/spam.git@master#egg=ugly
7ef706
7ef706
    this-name-is-too-\
7ef706
    long-for-this-file<\
7ef706
    =30  # even names and operators can be split
7ef706
7ef706
    # this is not a multi-line comment \
7ef706
    some-dep
7ef706
    other-dep  # but this *is* a multi-line coment \
7ef706
    so any garbage can be here
7ef706
    dep-a # and this comment ends with the blank line below \
7ef706
7ef706
    dep-b
7ef706
    -r requirements2.txt
7ef706
    ${PACKAGE}${WANTED_VERSION}
7ef706
  requirements2.txt: |
7ef706
    dep-from-included-file
7ef706
  requirement_files:
7ef706
    - requirements.txt
7ef706
  environ:
7ef706
    PACKAGE: package
7ef706
    WANTED_VERSION: -from-environ >= 1.2.3
7ef706
  expected: |
7ef706
    (python3dist(normal-req) >= 1.2 with python3dist(normal-req) < 1.3)
7ef706
    python3dist(good)
7ef706
    python3dist(ugly)
7ef706
    python3dist(this-name-is-too-long-for-this-file) <= 30
7ef706
    python3dist(some-dep)
7ef706
    python3dist(other-dep)
7ef706
    python3dist(dep-a)
7ef706
    python3dist(dep-b)
7ef706
    python3dist(dep-from-included-file)
7ef706
    python3dist(package-from-environ) >= 1.2.3
7ef706
  stderr_contains:
7ef706
  - "WARNING: Simplifying 'good@git+https://github.com/monty/spam.git@master#egg=bad' to 'good'."
7ef706
  # XXX: pyproject_requirements_txt adds a prefix that's not actually in the source;
7ef706
  # but that's good enough:
7ef706
  - "WARNING: Simplifying 'ugly@git+https://github.com/monty/spam.git@master#egg=ugly' to 'ugly'."
7ef706
  result: 0
7ef706
7ef706
7ef706
Pre-releases are accepted:
7ef706
  installed:
7ef706
    setuptools: 50
7ef706
    wheel: 1
7ef706
    toml: 1
7ef706
    cffi: 1.15.0rc2
7ef706
  pyproject.toml: |
7ef706
    [build-system]
7ef706
    requires = [
7ef706
        "setuptools",
7ef706
        "wheel",
7ef706
        "cffi",
7ef706
    ]
7ef706
    build-backend = "setuptools.build_meta"
7ef706
  expected: |
7ef706
    python3dist(setuptools)
7ef706
    python3dist(wheel)
7ef706
    python3dist(cffi)
7ef706
    python3dist(wheel)
7ef706
  stderr_contains: "Requirement satisfied: cffi"
7ef706
  result: 0
5d3ed2
5d3ed2
5d3ed2
Wrapped subprocess prints to stdout from setup.py:
5d3ed2
  installed:
5d3ed2
    setuptools: 50
5d3ed2
    wheel: 1
5d3ed2
  include_runtime: false
5d3ed2
  setup.py: |
5d3ed2
    import os
5d3ed2
    os.system('echo LEAK?')
5d3ed2
    from setuptools import setup
5d3ed2
    setup(name='test', version='0.1')
5d3ed2
  expected: |
5d3ed2
    python3dist(setuptools) >= 40.8
5d3ed2
    python3dist(wheel)
5d3ed2
    python3dist(wheel)
5d3ed2
  stderr_contains: "HOOK STDOUT: LEAK?"
5d3ed2
  result: 0