-
Notifications
You must be signed in to change notification settings - Fork 432
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
Use pipenv for managing developement virtualenv #410
Conversation
b031435
to
c03dec8
Compare
Pipfile
Outdated
|
||
[packages] | ||
|
||
"e1839a8" = {path = ".", editable = true} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line basically means that pipenv will run python setup.py install
, which will pull the install dependencies from setup.py
according to the Python environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any idea what "e1839a8" is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a short hash of the path (in this case .
) automatically generated by pipenv to avoid collisions if you have multiple entries. I think it can actually be anything unique -- I'll try renaming it to stripe
for clarity.
Makefile
Outdated
@@ -0,0 +1,15 @@ | |||
init: | |||
pip install --upgrade pipenv | |||
pipenv install --dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind if we remove the init
target in favor of just having this duplicated in .travis.yml
and the README.md
? I feel like many Python people will already have have a pipenv
available, and there are other recommended ways of installing it (e.g., I used Homebrew as recommended on their page).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Very cool! I just tried it to make sure it wasn't too much trouble, and your instructions in the I left a few comments above, but otherwise LGTM. |
Okay, I made the requested changed. Going to pull this in. |
r? @brandur-stripe
cc @stripe/api-libraries
This PR ended up being larger than I intended, so here's some helpful information:
Pipfile
andPipfile.lock
work similarly toGemfile
in Ruby projects. I've committed the lock file because it's recommended (cf. git - Should Pipfile.lock be committed to version control? pypa/pipenv#598) and is what's done in requests.Makefile
for common operations.travis.yml
to use the newmake
targetstox.ini
to set up a separate environment for flake8 linting