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

Double requirement given: setuptools #1349

Closed
asottile opened this issue Jun 25, 2019 · 5 comments · Fixed by #1350
Closed

Double requirement given: setuptools #1349

asottile opened this issue Jun 25, 2019 · 5 comments · Fixed by #1350

Comments

@asottile
Copy link
Member

@asottile asottile commented Jun 25, 2019

I'm reproducing this using pytest's 4.6-maintenance branch at 430de12f351a81d3cd0e265bcb23547fb91dcc8a

$ TOXENV=py27-pexpect,py27-twisted PYTEST_COVERAGE=1 tox --notest -vvv
using tox.ini: /tmp/pytest/tox.ini (pid 13807)
using tox-3.13.0 from /home/asottile/opt/venv/lib/python3.6/site-packages/tox/__init__.py (pid 13807)
.package start: getenv /tmp/pytest/.tox/.package
.package cannot reuse: no previous config /tmp/pytest/.tox/.package/.tox-config1
.package create: /tmp/pytest/.tox/.package
/home/asottile/opt/venv/bin/python3 (/home/asottile/opt/venv/bin/python3) is {'executable': '/home/asottile/opt/venv/bin/python3', 'name': 'python', 'version_info': [3, 6, 8, 'final', 0], 'version': '3.6.8 (default, Jan 14 2019, 11:02:34) \n[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]', 'is_64': True, 'sysplatform': 'linux'}
.package uses /home/asottile/opt/venv/bin/python3
setting PATH=/tmp/pytest/.tox/.package/bin:/home/asottile/bin:/home/asottile/bin:/home/asottile/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
[13838] /tmp/pytest/.tox$ /home/asottile/opt/venv/bin/python3 -m virtualenv --no-download --python /home/asottile/opt/venv/bin/python3 .package
Already using interpreter /home/asottile/opt/venv/bin/python3
Using real prefix '/usr'
Path not in prefix '/home/asottile/opt/venv/include/python3.6m' '/usr'
New python executable in /tmp/pytest/.tox/.package/bin/python3
Also creating executable in /tmp/pytest/.tox/.package/bin/python
Installing setuptools, pip, wheel...
done.
.package installdeps: setuptools>=40.0, setuptools-scm, wheel
setting PATH=/tmp/pytest/.tox/.package/bin:/home/asottile/bin:/home/asottile/bin:/home/asottile/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
[13848] /tmp/pytest$ /tmp/pytest/.tox/.package/bin/python -m pip install 'setuptools>=40.0' setuptools-scm wheel
Requirement already satisfied: setuptools>=40.0 in ./.tox/.package/lib/python3.6/site-packages (40.5.0)
Collecting setuptools-scm
  Using cached https://files.pythonhosted.org/packages/1d/70/97966deebaeeda0b81d3cd63ba9f8ec929b838871ed17476de9d8159db3e/setuptools_scm-3.3.3-py2.py3-none-any.whl
Requirement already satisfied: wheel in ./.tox/.package/lib/python3.6/site-packages (0.32.2)
Installing collected packages: setuptools-scm
Successfully installed setuptools-scm-3.3.3
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
.package finish: getenv /tmp/pytest/.tox/.package after 2.06 seconds
.package start: finishvenv 
write config to /tmp/pytest/.tox/.package/.tox-config1 as '94aaba361509f3eb875f759baaad9c10 /home/asottile/opt/venv/bin/python3\n3.13.0 0 0 0\n00000000000000000000000000000000 setuptools>=40.0\n00000000000000000000000000000000 setuptools-scm\n00000000000000000000000000000000 wheel'
.package finish: finishvenv  after 0.01 seconds
.package start: get-build-requires /tmp/pytest/.tox/.package
setting PATH=/tmp/pytest/.tox/.package/bin:/home/asottile/bin:/home/asottile/bin:/home/asottile/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
[13855] /tmp/pytest$ /tmp/pytest/.tox/.package/bin/python /home/asottile/opt/venv/lib/python3.6/site-packages/tox/helper/build_requires.py setuptools.build_meta '' >.tox/.package/log/.package-0.log
.package finish: get-build-requires /tmp/pytest/.tox/.package after 0.14 seconds
.package start: build_requires /tmp/pytest/.tox/.package
setting PATH=/tmp/pytest/.tox/.package/bin:/home/asottile/bin:/home/asottile/bin:/home/asottile/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
[13858] /tmp/pytest$ /tmp/pytest/.tox/.package/bin/python -m pip install setuptools 'setuptools>=40.0'
Double requirement given: setuptools>=40.0 (already in setuptools, name='setuptools')
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
ERROR: invocation failed (exit code 1)
ERROR: FAIL could not package project - v = InvocationError("/tmp/pytest/.tox/.package/bin/python -m pip install setuptools 'setuptools>=40.0'", 1)

This seems due to the pip version being used -- I'm using virtualenv==16.1 to get that trace, but I don't get a trace with virtualenv==16.6.1

The workaround for now is to upgrade virtualenv

@blueyed
Copy link
Contributor

@blueyed blueyed commented Jun 25, 2019

I'm using virtualenv==16.1

18.1, no?

@asottile
Copy link
Member Author

@asottile asottile commented Jun 25, 2019

I'm using virtualenv==16.1

18.1, no?

there's no such thing

@blueyed
Copy link
Contributor

@blueyed blueyed commented Jun 25, 2019

Oh, sorry, confused with pip from the output above.

@gaborbernat
Copy link
Member

@gaborbernat gaborbernat commented Jun 25, 2019

Will this handle the case when I define twice the same depency but with different environment marker? I think we should switch to pep517 library instead to handle source generation.

@asottile
Copy link
Member Author

@asottile asottile commented Jun 25, 2019

The patch fixes the boo-boo I made here: https://github.com/tox-dev/tox/pull/1324/files#diff-9157e9e969072aa669023dd9fc218647L34

no idea how it handles extras 🤷‍♂️

GitHub
setup (with ~some amount of pip requirements installed -- I used https://github.com/Yelp/paasta as it installs a bunch of things and I know they all build on my machine) $ pip freeze -l | wc -l 165...

@helpr helpr bot added pr-merged and removed pr-available labels Jun 25, 2019
@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants