-
Notifications
You must be signed in to change notification settings - Fork 293
PipEnv Development dependencies not included in requirements.txt #113
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
Comments
After reading the discussion in here, pypa/pipenv#972 , the API behavior might change sometime in the future. We need a future proof way of fixing this like in ONSdigital/eq-survey-runner#1327 |
@dschep Should Cython be a dev dependency? Wished pipenv had an option to include it as a build dependency. I would suggest that the correct build behavior going forward should be the following: pipenv lock --requirements > requirements.txt pip install -r requirements-dev.txt |
Hmm. yeah, as you saw in #87 we don't want to include dev deps in the deployment. I haven't used Cython personally, if I understand right, it needs to installed when pip install is called, is that right? |
Yup. Cython needs to be installed first before doing pip install of other packages that detect the presence of Cython (before compiling optimizations automatically). Example: |
Cool, thanks. This is pretty tricky to address afaict. dev reqs with pipenv don't seem to be the right fit, since i'm just using As a work around, my suggestions would be:
|
"create your own docker image that has cython installed" seems like a good workaround, since the docker file would only need three lines. I would say this could be added to the documentation to address build dependencies. Or even better, a custom config option could be added to specify additional commands to be run in the docker container before the actual build. For example to yum install some devel libraries. That would make it very user friendly:
The commands could be read from serverless.yml and placed into ".serverless/pre-build-hook.sh" |
lol.. how could I forget I started on that in #103.. but it needs to be adapted to work for docker correctly. |
Hey 👋 I'm closing this ticket as it looks like it's heavily outdated, we can of course reopen it if needed 👍 |
Behavior of
pipenv lock -r
has been changed.See: pypa/pipenv#942
We now require another
pipenv lock -r -d
to produce a requirements.txt that includes dev dependencies required for the build.An example would be
pipenv --dev Cython
The text was updated successfully, but these errors were encountered: