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

Switch to pipenv for dependency management #50

Merged
merged 1 commit into from
Feb 4, 2021
Merged

Switch to pipenv for dependency management #50

merged 1 commit into from
Feb 4, 2021

Conversation

ttung
Copy link
Contributor

@ttung ttung commented Feb 3, 2021

Description

Standard requirements.txt files have a few issues with a third party library installed from source:

  1. pip does not handle relative paths in a predictable way. It is relative to current working directory instead of relative to the path of the requirements.txt. As we cannot constrain that, it leads to unpredictable behavior.
  2. pip freeze does not generate the correct output when there is a local library.

Test plan

  1. tried to deploying to elastic beanstalk, and it seems to work.
  2. ran make update-deps
  3. ran make update-deps with a local library and Pipfile.lock references that instead of just a version number.

@ttung
Copy link
Contributor Author

ttung commented Feb 3, 2021

I think pyproject.toml is the future of python packaging, and plausibly can solve these problems, but as elastic beanstalk wants either requirements.txt or Pipenv.

@ttung ttung force-pushed the ttung/pipenv branch 2 times, most recently from 27b6193 to cbfcecd Compare February 3, 2021 18:25
### Description
Standard requirements.txt files have a few issues with a third party library installed from source:
1. pip does not handle [relative paths](pypa/pip#8765) in a predictable way.  It is relative to current working directory instead of relative to the path of the requirements.txt.  As we cannot constrain that, it leads to unpredictable behavior.
2. `pip freeze` does not generate the correct output when there is a local library.

### Test plan
1. tried to deploying to elastic beanstalk, and it seems to work.
2. ran `make update-deps`
3. ran `make update-deps` with a local library and `Pipfile.lock` references that instead of just a version number.
@phoenixAja
Copy link
Collaborator

I think pyproject.toml is the future of python packaging, and plausibly can solve these problems, but as elastic beanstalk wants either requirements.txt or Pipenv.

interesting, i would personally like to move towards this approach if we end up doing a deploy solution that's not ebs.

@ttung ttung merged commit 358c741 into trunk Feb 4, 2021
@ttung ttung deleted the ttung/pipenv branch February 4, 2021 03:17
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

Successfully merging this pull request may close these issues.

2 participants