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

Ansible not being added to Pipfile.lock #1146

Closed
dantswain opened this issue Dec 2, 2017 · 2 comments
Closed

Ansible not being added to Pipfile.lock #1146

dantswain opened this issue Dec 2, 2017 · 2 comments

Comments

@dantswain
Copy link

I'm trying to add ansible as a development dependency to a project. I can install it the first time with pipenv install -d ansible and it gets added to Pipfile, but it does not get added to Pipfile.lock. On a fresh clone of the project with no existing virtualenv, with ansible = "*" in the [dev-packages] section of Pipfile, ansible is not installed.

Describe your environment
  1. mac OS 10.13.1
  2. Python version: 2.7.12
  3. Pipenv version: 8.3.2
Expected result

ansible added to Pipfile.lock, ansible installed when running pipenv install -d

Actual result

ansible is not added to Pipfile.lock on pipenv install -d ansible. With a fresh virtualenv, ansible is not installed and not mentioned at all in pipenv install -d --verbose.

Steps to replicate

First install:

pipenv install -d ansible
grep ansible Pipfile.lock # nothing
find ~/.virtualenvs ansible # shows installed in the project's virtualenv

After this, ansible is in the virtualenv as expected and works, but ansible is not in Pipfile.lock.

On a different box (or after pipenv --rm),

pipenv install -d
pipenv shell
ansible --version # errors
find ~/.virtualenvs -name ansible # nothing

Ansible does not get installed (I assume because it's not in Pipfile.lock), and it is not in the virtualenv at all.

I've also tried deleting Pipfile.lock and running pipenv lock or pipenv install -d again, and several permutations of these steps.

@techalchemy
Copy link
Member

@dantswain do you happen to have a folder in your project called ansible? If so, you've just run into a fun and exciting bug, but one which has been encountered on a few other occasions (see #1025, #1045, and #949)

If my guess is right then your read on the situation (i.e. ansible not being in the lockfile and therefore not being installed when you move it around) is correct, and there is a fix in master since #958 was merged and should be released shortly. If my guess is wrong, there still might be a fix in master but we will need some verbose output from the install command!

@dantswain
Copy link
Author

Yup! That was it! Thanks, @techalchemy . I renamed the directory to 'ansible-playbooks' and everything works as expected.

I did search the issues before posting, but somehow missed #1025 which is basically the exact same problem 🤦‍♂️.

Luckily I can change the name of the folder, which resolves the problem for me for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants