-
-
Notifications
You must be signed in to change notification settings - Fork 215
WIP: Convert project to use pipenv #38
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
Conversation
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.
The only way that comes to my mind to solve the duplication without requiring pipenv
to install the package (which would be bad as explained by them on that issue you linked), is to parse the Pipfile
using a regular expression that splits in groups based on encoutering square brackets, and then processing each line in the [packages]
further. Sounds a bit overkill, but if we manage to do this well we could send a patch to setuptools
and get it included there.
We could split this task into multiple GCI tasks as well.
6d95900
to
2942de1
Compare
Using the method described in pypa/pipenv#1263 (comment) I modified the Pipfile so that when issuing This means that the runtime dependencies are defined in the It would also be possible to define another list for |
2942de1
to
3610434
Compare
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.
@okraits Cool!
The .travis.yml
file needs to be updated to reflect these changes otherwise the build will fail. See also my other minor comment.
Pipfile
Outdated
coverage = "*" | ||
coveralls = "*" | ||
isort = "*" | ||
flake8 = "*" |
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.
final new line is missing here
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.
Yes, already noticed it in the diff. Fixed 😀
I need to fix the travis build tomorrow.
8643ceb
to
1a1fe11
Compare
ddf631c
to
0632c24
Compare
0632c24
to
44ffff4
Compare
44ffff4
to
87c42ce
Compare
I'd recommend adding pipenv tasks to replace the current |
@anonguy great 👍 |
Implement pipenv tasks to #38
[qa] Added a check for empty line at the end of a file openwisp#29
This PR has the goal of converting this project to use pipenv (https://pipenv.readthedocs.io/) for its development and deployment. It can serve as an example and evaluation of the conversion process.
For simplicity, I removed the method to parse the
requirements.txt
file fromsetup.py
and inserted the dependencies directly, that's how other projects do it, too - https://github.com/requests/httpbin for example.It also makes sense to keep both dependency lists - see https://pipenv.readthedocs.io/en/latest/advanced/#pipfile-vs-setuppy.
Also, I didn't find a possibility to parse the
Pipfile
so far (pipenv is the reference implementation - see https://github.com/pypa/pipfile), but we can add that later.Todos:
setup.py
, read dependencies fromPipfile
Related issue in pipenv: pypa/pipenv#1263