[Pulp-dev] Managing dependencies with Poetry - PoC

Fabricio Aguiar fabricio.aguiar at redhat.com
Thu May 21 17:19:32 UTC 2020


it is already on the PR:
https://github.com/pulp/pulp_file/pull/390/commits/ce7dc81625aea186f1b3a4c2769b40e508fee6e9

I'm just waiting for approval on pulp_file PR to start to replicate it to
other plugins

Best regards,
Fabricio Aguiar
Software Engineer, Pulp Project
Red Hat Brazil - Latam <https://www.redhat.com/>
+55 11 999652368


On Thu, May 21, 2020 at 2:06 PM Brian Bouterse <bmbouter at redhat.com> wrote:

> This POC outlines the pros and cons nicely. Thanks for sharing it. Not
> being able to work in editable mode tells me we can't fully adopt poetry
> currently, but maybe others fill differently.
>
> I would like to discuss unblocking the automated release machinery goal.
> To do that in the best way possible, I believe we need to move the
> requirements out of setup.py and to their own requirements.txt file. I have
> a few motivations:
> * bump2version can't operate on setup.py correctly when there are other
> versions in there. See PR convo here:
> https://github.com/pulp/pulp_file/pull/390#discussion_r423272806
> * tools like pip can't natively inspect/install the requirements except
> when installing the package itself
>
> By doing ^, we would be able to continue on the plugin_template version of
> this https://github.com/pulp/pulp_file/pull/390  The implications are
> though that each plugin would need to move it's requirements from setup.py
> to a dedicated file.
>
> What do you think?
>
> On Tue, May 12, 2020 at 6:35 PM Fabricio Aguiar <
> fabricio.aguiar at redhat.com> wrote:
>
>> Due pulp_installer issue https://pulp.plan.io/issues/6623 and the epic
>> for plugins: https://pulp.plan.io/issues/6707
>>
>> I wanted to try Poetry[1] and see how far I could go.
>>
>> So I started a PoC[2] on pulp_file, and I will share the pros and cons
>> pros:
>> - Manages the dependencies for us (creating a poetry.lock file)
>> - Easy to build and publish packages
>> - Easy to track dependencies
>> - With the latest version of pip, users are able to install using just
>> pip install [3]
>>
>> cons:
>> - Poetry does not work well in editable mode for multiple plugins [4]
>> - Developers need to install poetry to add/remove the dependencies
>>
>> This email is not a call for action, I just wanted to share my findings
>> in case other people were thinking about adopting poetry. I didn't explore
>> it too much, so my conclusions may be wrong.
>> In case you wanna play with it, take a look at the PR:
>> https://github.com/pulp/pulp_file/pull/391
>>
>> [1] https://python-poetry.org/
>> [2] https://github.com/pulp/pulp_file/pull/391
>> [3] https://github.com/pulp/pulp_file/pull/391#issuecomment-627407691
>> [4]
>> https://github.com/python-poetry/poetry/issues/34#issuecomment-586440285
>>
>> Best regards,
>> Fabricio Aguiar
>> Software Engineer, Pulp Project
>> Red Hat Brazil - Latam <https://www.redhat.com/>
>> +55 11 999652368
>> _______________________________________________
>> Pulp-dev mailing list
>> Pulp-dev at redhat.com
>> https://www.redhat.com/mailman/listinfo/pulp-dev
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-dev/attachments/20200521/fb839a8c/attachment.htm>


More information about the Pulp-dev mailing list