-
-
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
What is the correct way to install local file-backed distributions with pipenv? #945
Comments
apologies, seems related to: #939
still no love. |
...for those coming here also using heroku, temporarily resolving this by running 'python setup.py install && ' in the procfile |
In the meantime if you use a I will note that pipenv is not meant to be run from inside its own managed virtualenv (I noticed you have it sourced), or from inside its own subshell, so be aware that this may cause issues. |
@techalchemy Yep, thanks! Exiting the virtual env first, plus tweaking the syntax per "Editable Dependencies" in the docs to include the single quotes and a period worked. Here's the code.
(Note: No ref to the file itself-- that's critical. Referencing the file (as in (Note: this works if setup.py is in the top-level project dir. Not sure if pipenv searches recursively... ) |
No it doesn't. The bug we have is currently to do with traversing local relative directories specifically so if you don't make any reference to a directory (i.e. there is no |
Roger that.. thank you. Saw the 'file://' solution suggested above and in #939, but since the absolute path would be different in production not sure that would work in my use case... Thanks again. |
Trying to install a local file-backed distribution on Heroku. Previously, using standard pip/requirements.txt Heroku detected setup.py and installed the local package automatically. Now, using pipenv, with the same structure, it does not automatically detect setup.py for some reason. Per the Heroku docs I need to provide a path to the local distribution to the requirements.txt. Or, add
-e .
to provoke pip to runpython setup.py develop
What is the pipenv equivalent?Apologies if requiring local packages is addressed in the docs, but I didn't see it...
Python 3.6.2
pipenv, version 8.2.7
Heroku
Package installation using normal setup.py install command works fine both locally and on Heroku.
pipenv run setup.py install
heroku python setup.py install
Top-level directory structure looks like this:
├── Pipfile
├── Procfile
├── README.md
├── bin
├── resources
├── runtime.txt
├── setup.py
├── src
│ └── pblc
│ ├── init.py
│ ├── main.py
├── (package files)
└── test
Tried:
pipenv install path/to/setup.py
which in my case is just
pipenv install setup.py
Expected it to add the path to the Pipfile as a requirement
Got the following traceback:
Any guidance on the best way to require a local package in Pipfile...?
The text was updated successfully, but these errors were encountered: