Description
pipenv lock
with devpi as a mirror fails while works with pypi.
It seems like pipenv installs Django-2.1 (python3 only) even though it runs in python2 venv.
Steps to reproduce:
- run local devpi server
- create python2 venv
virtualenv venv2 && source venv2/bin/activate
- create Pipfile (see support information)
- try to run
pipenv lock
In devpi I see output:
2018-08-09 16:49:45,825 INFO [req231] GET /root/pypi/+simple/django-celery-email/
2018-08-09 16:49:45,904 INFO [req232] GET /root/pypi/+simple/django-celery-email/
2018-08-09 16:49:45,944 INFO [req233] GET /root/pypi/+f/298/94330d621a079/django_celery_email-2.0.0-py2.py3-none-any.whl
2018-08-09 16:49:45,982 INFO [req234] GET /root/pypi/+simple/django/
2018-08-09 16:49:46,175 INFO [req235] GET /root/pypi/+f/7f2/46078d5a546f6/Django-2.1.tar.gz
$ pipenv lock --clear --verbose
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead.
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
using sources: [{u'url': u'http://localhost:3141/root/pypi/+simple/', u'verify_ssl': True, u'name': u'pypi'}]
Using pip: -i http://localhost:3141/root/pypi/+simple/
ROUND 1
Current constraints:
django-celery-email (from -r /var/folders/9d/ymk7h3g533nfcj7rm966d5fc0000gn/T/pipenv-SnKCsr-requirements/pipenv-jZiemI-constraints.txt (line 2))
Finding the best candidates:
found candidate django-celery-email==2.0.0 (constraint was <any>)
Finding secondary dependencies:
django-celery-email==2.0.0 not in cache, need to check index
Traceback (most recent call last):
File "/Users/wtf/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/resolver.py", line 87, in <module>
main()
File "/Users/wtf/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/resolver.py", line 76, in main
system=system,
File "/Users/wtf/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/resolver.py", line 63, in resolve
allow_global=system,
File "/Users/wtf/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/utils.py", line 402, in resolve_deps
req_dir=req_dir
File "/Users/wtf/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/utils.py", line 293, in actually_resolve_deps
results = resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS)
File "/Users/wtf/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 104, in resolve
has_changed, best_matches = self._resolve_one_round()
File "/Users/wtf/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 209, in _resolve_one_round
for dep in self._iter_dependencies(best_match):
File "/Users/wtf/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 303, in _iter_dependencies
dependencies = self.repository.get_dependencies(ireq)
File "/Users/wtf/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 243, in get_dependencies
legacy_results = self.get_legacy_dependencies(ireq)
File "/Users/wtf/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 335, in get_legacy_dependencies
self.resolver.resolve(reqset)
File "/Users/wtf/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/resolve.py", line 107, in resolve
self._resolve_one(requirement_set, req)
File "/Users/wtf/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/resolve.py", line 264, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/Users/wtf/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/resolve.py", line 214, in _get_abstract_dist_for
self.require_hashes
File "/Users/wtf/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/operations/prepare.py", line 328, in prepare_linked_requirement
abstract_dist.prep_for_dist(finder, self.build_isolation)
File "/Users/wtf/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/operations/prepare.py", line 155, in prep_for_dist
self.req.run_egg_info()
File "/Users/wtf/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/req/req_install.py", line 486, in run_egg_info
command_desc='python setup.py egg_info')
File "/Users/wtf/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/utils/misc.py", line 698, in call_subprocess
% (command_desc, proc.returncode, cwd))
pipenv.patched.notpip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /var/folders/9d/ymk7h3g533nfcj7rm966d5fc0000gn/T/tmpluss5Bbuild/django/
/Users/wtf/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/_compat.py:113: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/var/folders/9d/ymk7h3g533nfcj7rm966d5fc0000gn/T/pipenv-SnKCsr-requirements'>
warnings.warn(warn_message, ResourceWarning)
With standard pypi index pipenv works without problem.
$ pipenv --support
Pipenv version: '2018.7.1'
Pipenv location: '/Users/a/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv'
Python location: '/Users/a/.local/venvs/pipenv/bin/python3'
Other Python installations in PATH
:
-
2.7
:/private/tmp/venv2/bin/python2.7
-
2.7
:/private/tmp/venv2/bin/python2.7
-
2.7
:/usr/local/bin/python2.7
-
2.7
:/usr/local/bin/python2.7
-
2.7
:/usr/bin/python2.7
-
3.6
:/usr/local/bin/python3.6m
-
3.6
:/usr/local/bin/python3.6
-
3.6
:/usr/local/bin/python3.6
-
2.7.15
:/private/tmp/venv2/bin/python
-
2.7.15
:/usr/local/bin/python
-
2.7.15
:/usr/local/bin/python
-
2.7.10
:/usr/bin/python
-
2.7.15
:/private/tmp/venv2/bin/python2
-
2.7.15
:/usr/local/bin/python2
-
2.7.15
:/usr/local/bin/python2
-
3.6.5
:/usr/local/bin/python3
-
3.6.5
:/usr/local/bin/python3
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.6.5',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '17.7.0',
'platform_system': 'Darwin',
'platform_version': 'Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT '
'2018; root:xnu-4570.71.2~1/RELEASE_X86_64',
'python_full_version': '3.6.5',
'python_version': '3.6',
'sys_platform': 'darwin'}
System environment variables:
Apple_PubSub_Socket_Render
GOPATH
HOME
LANG
LC_ALL
LC_CTYPE
LESS
LOGNAME
LSCOLORS
OBJC_DISABLE_INITIALIZE_FORK_SAFETY
OLDPWD
PAGER
PATH
PWD
SHELL
SHLVL
SSH_AUTH_SOCK
TERM
TMPDIR
TMUX
TMUX_PANE
USER
VAULT_ADDR
VIRTUAL_ENV_DISABLE_PROMPT
XPC_FLAGS
XPC_SERVICE_NAME
ZSH
__CF_USER_TEXT_ENCODING
VIRTUAL_ENV
_
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/private/tmp/venv2/bin:/Users/a/go/bin:/usr/local/opt/node@8/bin:/Users/a/.cargo/bin:/usr/local/opt/coreutils/libexec/gnubin:/Applications/Postgres.app/Contents/Versions/9.6/bin:/Users/a/.local/bin:/Users/a/.config/yarn/global/node_modules/.bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/a/go/bin:/usr/local/opt/node@8/bin:/Users/a/.cargo/bin:/usr/local/opt/coreutils/libexec/gnubin:/Applications/Postgres.app/Contents/Versions/9.6/bin:/Users/a/.local/bin:/Users/a/.config/yarn/global/node_modules/.bin:/usr/local/sbin:/usr/local/opt/go/libexec/bin:/usr/local/opt/go/libexec/bin
SHELL
:/bin/zsh
LANG
:en_US.UTF-8
PWD
:/tmp/venv2
VIRTUAL_ENV
:/private/tmp/venv2
Contents of Pipfile
('/private/tmp/venv2/Pipfile'):
[[source]]
url = "http://localhost:3141/root/pypi/+simple/"
verify_ssl = true
name = "pypi"
[requires]
python_version = "2.7"
[packages]
django-celery-email = "*"
Contents of Pipfile.lock
('/private/tmp/venv2/Pipfile.lock'):
{
"_meta": {
"hash": {
"sha256": "cdd5b617d75678f6776da6fc11633510de0f2994f023f6e8b895cbb150fb4bed"
},
"pipfile-spec": 6,
"requires": {
"python_version": "2.7"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.python.org/simple",
"verify_ssl": true
}
]
},
"default": {
"amqp": {
"hashes": [
"sha256:073dd02fdd73041bffc913b767866015147b61f2a9bc104daef172fc1a0066eb",
"sha256:eed41946890cd43e8dee44a316b85cf6fee5a1a34bb4a562b660a358eb529e1b"
],
"version": "==2.3.2"
},
"billiard": {
"hashes": [
"sha256:ed65448da5877b5558f19d2f7f11f8355ea76b3e63e1c0a6059f47cfae5f1c84"
],
"version": "==3.5.0.4"
},
"celery": {
"hashes": [
"sha256:77dab4677e24dc654d42dfbdfed65fa760455b6bb563a0877ecc35f4cfcfc678",
"sha256:ad7a7411772b80a4d6c64f2f7f723200e39fb66cf614a7fdfab76d345acc7b13"
],
"version": "==4.2.1"
},
"django": {
"hashes": [
"sha256:8176ac7985fe6737ce3d6b2531b4a2453cb7c3377c9db00bacb2b3320f4a1311",
"sha256:b18235d82426f09733d2de9910cee975cf52ff05e5f836681eb957d105a05a40"
],
"version": "==1.11.15"
},
"django-appconf": {
"hashes": [
"sha256:6a4d9aea683b4c224d97ab8ee11ad2d29a37072c0c6c509896dd9857466fb261",
"sha256:ddab987d14b26731352c01ee69c090a4ebfc9141ed223bef039d79587f22acd9"
],
"version": "==1.0.2"
},
"django-celery-email": {
"hashes": [
"sha256:1d20120569edd233d7f5a22460b60410b4d8f7c0f1ef66889e1267762aeacbf5",
"sha256:29894330d621a0794b2e82e63220ccc5f1dbd539f5cedd9e183616dc2f72f973"
],
"index": "pypi",
"version": "==2.0.0"
},
"kombu": {
"hashes": [
"sha256:86adec6c60f63124e2082ea8481bbe4ebe04fde8ebed32c177c7f0cd2c1c9082",
"sha256:b274db3a4eacc4789aeb24e1de3e460586db7c4fc8610f7adcc7a3a1709a60af"
],
"version": "==4.2.1"
},
"pytz": {
"hashes": [
"sha256:a061aa0a9e06881eb8b3b2b43f05b9439d6583c206d0a6c340ff72a7b6669053",
"sha256:ffb9ef1de172603304d9d2819af6f5ece76f2e85ec10692a524dd876e72bf277"
],
"version": "==2018.5"
},
"vine": {
"hashes": [
"sha256:52116d59bc45392af9fdd3b75ed98ae48a93e822cee21e5fda249105c59a7a72",
"sha256:6849544be74ec3638e84d90bc1cf2e1e9224cc10d96cd4383ec3f69e9bce077b"
],
"version": "==1.1.4"
}
},
"develop": {}
}