-
-
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 lock --requirements" includes dev requirements #245
Comments
This should be simple to set up, we currently have If @kennethreitz signs off on adding the Thanks for bringing this up, @blueyed :) |
I think it should remain as is, for now.
…Sent from my iPhone
On Mar 1, 2017, at 10:46 AM, Nate Prewitt ***@***.***> wrote:
This should be simple to set up, we currently have dev hardcoded to True for the lock command. I think this was Kenneth's original intent to just do a simple dump of everything for requirements.txt.
If @kennethreitz signs off on adding the --dev option to pipenv lock that will fix everything with a one line change. We can look into a PR at that point.
Thanks for bringing this up, @blueyed :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
i might change my mind later. |
So what would be the recommended way to achieve a clean install without dev deps then currently? |
In the current version of pipenv, you'd need to run the command on a Pipfile without dev dependencies. That's unfortunately the only way at the moment. I did think some more on the If maintaining the requirements.txt backwards compatibility is fundamental for your project right now, I'd suggest using something like the script below. from pipenv.project import Project
from pipenv.utils import convert_deps_to_pip
# Create pip-compatible dependency list
packages = Project().parsed_pipfile.get('packages', {})
deps = convert_deps_to_pip(packages, r=False)
with open('requirements.txt', 'w') as f:
f.write('\n'.join(deps)) |
Yes, I came to the same conclusion. There should be a separate command for it (generating a requirements file/output) probably. |
+1 to get 2 commands:
|
Sorry to be deconstructive, but this is surely not happening through commenting on an issue that has been ignored from the beginning: I've even digged into the code and created a PR IIRC - but this project is just a bit too confusing. |
For those that find your way here, this seems to have been addressed in https://github.com/kennethreitz/pipenv/pull/972 |
It should behave like
pipenv install
, where you have to specify--dev
to install development packages explicitly.My use case it
pip install -r <(pipenv lock --requirements) -t build/upload
to generate a directory with the packages required for the app - that should not include development packages (by default).The text was updated successfully, but these errors were encountered: