[openstack-dev] PBR and Pipfile
Gaetan
gaetan at xeberon.net
Sun Apr 8 09:10:57 UTC 2018
Hello OpenStack dev community,
I am currently working on the support of Pipfile for PBR ([1]), and I also
follow actively the work on pipenv, which is now in officially supported by
PyPA.
There have been recently an intense discussion on the difficulties about
Python libraries development, and how to spread good practices [2] on the
pipenv community and enhance its documentation.
As a user of PBR, and big fan of it, I try to bridge the link between pbr
and pipenv (with [1]) but I am interested in getting the feedback of Python
developers of OpenStack that may have much more experience using PBR and
more generally packaging python libraries than me.
The main point is that packaging an application is quite easy or at least
understandable by newcomers, using `requirements.txt` or `Pipfile`+
`Pipfile.lock` with pipenv. At least it is easily "teachable".
Packaging a library is harder, and require to explain why by default
`requirements.txt`(or `Pipfile`) does not work. Some "advanced"
documentation exists but it still hard to understand why Python ended up
with something complex for libraries ([3]).
One needs to ensure `install_requires`declares the dependencies to that pip
can find them during transitive dependencies installation (that is,
installing the dependencies of a given dependency). PBR helps on this point
but some does not want its other features.
There is also works on PEP around pyproject.toml ([4]), which looks quite
similar to PBR's setup.cfg. What do you think about it?
My opinion is this difference in behaviour between lib and app has
technical reasons, but as a community we would gain a lot of unifying both
workflows. I am using PBR + a few hacks [5], and I am pretty satisfied with
the overall result.
So, in short, I simply start a general thread here to retrieve your general
feedback around these points.
Thanks for your feedbacks
Gaetan
[1]: https://review.openstack.org/#/c/524436/
[2]: https://github.com/pypa/pipenv/issues/1911
[3]: https://docs.pipenv.org/advanced/#pipfile-vs-setup-py
[4]: https://www.python.org/dev/peps/pep-0518/
[5]: library:
- pipenv to maintain Pipfile and Pipfile.lock
- Pipfile.lock not tracked (local reproductivity),
- pipenv-to-requirements [6] to generate a `requirements.txt` without
version freeze, also tracked
applications:
- pipenv to maintain Pipfile and Pipfile.lock
- Pipfile.lock not tracked (global reproductivity),
- pipenv-to-requirements [6] to generate a `requirements.txt` and
`requirements-dev.txt` with version freeze, both tracked
The development done with [1] should allow to get rid of [6].
[6] https://github.com/gsemet/pipenv-to-requirements
-----
Gaetan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20180408/138f295a/attachment.html>
More information about the OpenStack-dev
mailing list