-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Pipenv skips ansible in lockfile #1025
Comments
Please let me know if there's any other information I can provide! I can also replicate this problem when installing from a pipfile instead of the command line, as well as if I attempt to install the packages separately. |
@zxaos can you run Also, do you have any folders in your current working directory? Named |
I do in fact have a folder named
|
lol. @zxaos There is currently a race condition in the codebase which prevents the resolver from resolving packages and adding them to your lockfile if you have a subdirectory off your project root of the same name as the package (i.e. there is a matching path on the filesystem). There is a solution for this sitting in #958 which will, eventually, be merged |
@zxaos to illustrate the point with the current version of Pipenv: ◰³ tempenv-2760459608fc /t/new ls -al
total 68
drwxrwxr-x 2 hawk hawk 4096 Nov 2 22:38 .
drwxrwxrwt 13 root root 61440 Nov 2 22:37 ..
◰³ tempenv-2760459608fc /t/new pipenv install ansible
Creating a Pipfile for this project…
Installing ansible…
Collecting ansible
Collecting PyYAML (from ansible)
Collecting jinja2 (from ansible)
Using cached Jinja2-2.9.6-py2.py3-none-any.whl
Collecting cryptography (from ansible)
Downloading cryptography-2.1.3-cp36-cp36m-manylinux1_x86_64.whl (2.2MB)
Collecting paramiko (from ansible)
Using cached paramiko-2.3.1-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /home/hawk/.virtualenvs/tempenv-2760459608fc/lib/python3.6/site-packages (from ansible)
Collecting MarkupSafe>=0.23 (from jinja2->ansible)
Collecting idna>=2.1 (from cryptography->ansible)
Using cached idna-2.6-py2.py3-none-any.whl
Collecting six>=1.4.1 (from cryptography->ansible)
Using cached six-1.11.0-py2.py3-none-any.whl
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography->ansible)
Using cached cffi-1.11.2-cp36-cp36m-manylinux1_x86_64.whl
Collecting asn1crypto>=0.21.0 (from cryptography->ansible)
Using cached asn1crypto-0.23.0-py2.py3-none-any.whl
Collecting pyasn1>=0.1.7 (from paramiko->ansible)
Using cached pyasn1-0.3.7-py2.py3-none-any.whl
Collecting pynacl>=1.0.1 (from paramiko->ansible)
Downloading PyNaCl-1.2.0-cp36-cp36m-manylinux1_x86_64.whl (692kB)
Collecting bcrypt>=3.1.3 (from paramiko->ansible)
Using cached bcrypt-3.1.4-cp36-cp36m-manylinux1_x86_64.whl
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography->ansible)
Installing collected packages: PyYAML, MarkupSafe, jinja2, idna, six, pycparser, cffi, asn1crypto, cryptography, pyasn1, pynacl, bcrypt, paramiko, ansible
Successfully installed MarkupSafe-1.0 PyYAML-3.12 ansible-2.4.1.0 asn1crypto-0.23.0 bcrypt-3.1.4 cffi-1.11.2 cryptography-2.1.3 idna-2.6 jinja2-2.9.6 paramiko-2.3.1 pyasn1-0.3.7 pycparser-2.18 pynacl-1.2.0 six-1.11.0
Adding ansible to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (114e81)! And the lockfile: ◰³ tempenv-2760459608fc /t/new cat Pipfile.lock Thu 02 Nov 2017 10:39:12 PM EDT
{
"_meta": {
"hash": {
"sha256": "014004bba412f1af7eea5fce95f020a6d4f9ef888ff17204b494326262114e81"
},
"host-environment-markers": {
"implementation_name": "cpython",
"implementation_version": "3.6.3",
"os_name": "posix",
"platform_machine": "x86_64",
"platform_python_implementation": "CPython",
"platform_release": "4.10.0-38-generic",
"platform_system": "Linux",
"platform_version": "#42-Ubuntu SMP Tue Oct 10 13:24:27 UTC 2017",
"python_full_version": "3.6.3",
"python_version": "3.6",
"sys_platform": "linux"
},
"pipfile-spec": 6,
"requires": {},
"sources": [
{
"name": "pypi",
"url": "https://pypi.python.org/simple",
"verify_ssl": true
}
]
},
"default": {
"ansible": {
"hashes": [
"sha256:da61afb29cc5bd6bc4737a2da06e673fb6fccc3ae2685130d19ab3a8e404fb6a"
],
"version": "==2.4.1.0"
},
"asn1crypto": {
"hashes": [
"sha256:654b7db3b120e23474e9a1e5e38d268c77e58a9e17d2cb595456c37309846494",
"sha256:0874981329cfebb366d6584c3d16e913f2a0eb026c9463efcc4aaf42a9d94d70"
..... and so on... Now lets make a folder called ◰³ tempenv-2760459608fc /t/new pipenv uninstall ansible; and mkdir ansible; and ls -al
Un-installing ansible…
Uninstalling ansible-2.4.1.0:
Successfully uninstalled ansible-2.4.1.0
Removing ansible from Pipfile…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (c23e27)!
total 80
drwxrwxr-x 3 hawk hawk 4096 Nov 2 22:42 .
drwxrwxrwt 13 root root 61440 Nov 2 22:42 ..
drwxrwxr-x 2 hawk hawk 4096 Nov 2 22:42 ansible
-rw-rw-r-- 1 hawk hawk 115 Nov 2 22:42 Pipfile
-rw-rw-r-- 1 hawk hawk 977 Nov 2 22:42 Pipfile.lock And check that the lockfile is empty: ◰³ tempenv-2760459608fc /t/new cat Pipfile.lock
{
"_meta": {
"hash": {
"sha256": "5f0257fe8c7a73db1c8de519faa92c658282a01087eb2bfafba7962704c23e27"
},
"host-environment-markers": {
"implementation_name": "cpython",
"implementation_version": "3.6.3",
"os_name": "posix",
"platform_machine": "x86_64",
"platform_python_implementation": "CPython",
"platform_release": "4.10.0-38-generic",
"platform_system": "Linux",
"platform_version": "#42-Ubuntu SMP Tue Oct 10 13:24:27 UTC 2017",
"python_full_version": "3.6.3",
"python_version": "3.6",
"sys_platform": "linux"
},
"pipfile-spec": 6,
"requires": {},
"sources": [
{
"name": "pypi",
"url": "https://pypi.python.org/simple",
"verify_ssl": true
}
]
},
"default": {},
"develop": {}
} Now lets install again: ◰³ tempenv-2760459608fc /t/new pipenv install ansible
Installing ansible…
Collecting ansible
Requirement already satisfied: PyYAML in /home/hawk/.virtualenvs/tempenv-2760459608fc/lib/python3.6/site-packages (from ansible)
Requirement already satisfied: jinja2 in /home/hawk/.virtualenvs/tempenv-2760459608fc/lib/python3.6/site-packages (from ansible)
Requirement already satisfied: cryptography in /home/hawk/.virtualenvs/tempenv-2760459608fc/lib/python3.6/site-packages (from ansible)
Requirement already satisfied: setuptools in /home/hawk/.virtualenvs/tempenv-2760459608fc/lib/python3.6/site-packages (from ansible)
Requirement already satisfied: paramiko in /home/hawk/.virtualenvs/tempenv-2760459608fc/lib/python3.6/site-packages (from ansible)
Requirement already satisfied: MarkupSafe>=0.23 in /home/hawk/.virtualenvs/tempenv-2760459608fc/lib/python3.6/site-packages (from jinja2->ansible)
Requirement already satisfied: idna>=2.1 in /home/hawk/.virtualenvs/tempenv-2760459608fc/lib/python3.6/site-packages (from cryptography->ansible)
Requirement already satisfied: six>=1.4.1 in /home/hawk/.virtualenvs/tempenv-2760459608fc/lib/python3.6/site-packages (from cryptography->ansible)
Requirement already satisfied: asn1crypto>=0.21.0 in /home/hawk/.virtualenvs/tempenv-2760459608fc/lib/python3.6/site-packages (from cryptography->ansible)
Requirement already satisfied: cffi>=1.7; platform_python_implementation != "PyPy" in /home/hawk/.virtualenvs/tempenv-2760459608fc/lib/python3.6/site-packages (from cryptography->ansible)
Requirement already satisfied: pynacl>=1.0.1 in /home/hawk/.virtualenvs/tempenv-2760459608fc/lib/python3.6/site-packages (from paramiko->ansible)
Requirement already satisfied: pyasn1>=0.1.7 in /home/hawk/.virtualenvs/tempenv-2760459608fc/lib/python3.6/site-packages (from paramiko->ansible)
Requirement already satisfied: bcrypt>=3.1.3 in /home/hawk/.virtualenvs/tempenv-2760459608fc/lib/python3.6/site-packages (from paramiko->ansible)
Requirement already satisfied: pycparser in /home/hawk/.virtualenvs/tempenv-2760459608fc/lib/python3.6/site-packages (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography->ansible)
Installing collected packages: ansible
Successfully installed ansible-2.4.1.0
Adding ansible to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (114e81)! And lets check the lockfile one more time: ◰³ tempenv-2760459608fc /t/new cat Pipfile.lock 5.9s Thu 02 Nov 2017 10:44:17 PM EDT
{
"_meta": {
"hash": {
"sha256": "014004bba412f1af7eea5fce95f020a6d4f9ef888ff17204b494326262114e81"
},
"host-environment-markers": {
"implementation_name": "cpython",
"implementation_version": "3.6.3",
"os_name": "posix",
"platform_machine": "x86_64",
"platform_python_implementation": "CPython",
"platform_release": "4.10.0-38-generic",
"platform_system": "Linux",
"platform_version": "#42-Ubuntu SMP Tue Oct 10 13:24:27 UTC 2017",
"python_full_version": "3.6.3",
"python_version": "3.6",
"sys_platform": "linux"
},
"pipfile-spec": 6,
"requires": {},
"sources": [
{
"name": "pypi",
"url": "https://pypi.python.org/simple",
"verify_ssl": true
}
]
},
"default": {},
"develop": {}
} Totally empty. This is a known bug (and an exact duplicate btw of #926 which had a collision with a top level directory also called 'ansible'!) and has ties to #936, #949, #960 and a few others. You can fix this for now by renaming your project-level subdirectory to something besides 'ansible', or by using I'm going to go ahead and close this since we already have some issues open tracking this problem. Thanks for the report and sorry for the bug! |
@techalchemy Thanks! Sorry for the duplicate report, I browsed that issues but not the pull requests and didn't see a match. |
This is resolved in #958 ! |
pipenv skips ansible when generating Pipfile.lock, but includes other packages. Pipfile is updated normally.
Describe your environment
macOS 10.13
Python 2.7.14
pipenv, version 8.3.1
Expected result
Lockfile inclues
boto
,ansible
.Actual result
Lockfile contains only
boto
Pipfile:
Pipfile.lock
Steps to replicate
pipenv --python 2.7.14
pipenv install --verbose ansible boto
The text was updated successfully, but these errors were encountered: