Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Generated requirements.txt contains test dependencies #1324

Closed
jonnyshaw89 opened this issue Oct 30, 2017 · 2 comments
Closed

Generated requirements.txt contains test dependencies #1324

jonnyshaw89 opened this issue Oct 30, 2017 · 2 comments

Comments

@jonnyshaw89
Copy link
Contributor

jonnyshaw89 commented Oct 30, 2017

Expected behaviour

The dev dependencies should not in included in the requirements.txt when the app is deployed

Actual behaviour

The test dependencies are in the requirements.txt

Steps to reproduce the behaviour

pipenv lock -r > requirements.txt

@jcox-dev
Copy link
Contributor

jcox-dev commented Oct 30, 2017

This seems to be intended behaviour. See: https://github.com/kennethreitz/pipenv/issues/245.

We could use this script as a workaround (from the above): https://github.com/kennethreitz/pipenv/issues/245#issuecomment-283694215

Or something like: serverless/serverless-python-requirements#87 (comment) (pip freeze does not hash requirements).

jcox-dev pushed a commit that referenced this issue Oct 31, 2017
'pipenv lock -r' outputs a list of dependencies suitable for piping to requirements.txt file but it tends to include all (including dev) dependencies. This is expected behaviour and unlikely to change in Pipenv project but we can work around this by using the Pipenv API to generate our own requirements.txt file (with hashes).

Fixes: #1324
jcox-dev pushed a commit that referenced this issue Oct 31, 2017
'pipenv lock -r' outputs a list of dependencies suitable for piping to requirements.txt file but it tends to include all (including dev) dependencies. This is expected behaviour and unlikely to change in Pipenv project but we can work around this by using the Pipenv API to generate our own requirements.txt file (with hashes).

Fixes: #1324
@jcox-dev
Copy link
Contributor

Fixed in latest version of Pipenv: kennethreitz/pipenv#972

Upgrading Pipenv on Jenkins would solve this issue.

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

No branches or pull requests

2 participants