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

Add Poetry buildpack #972

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

RobertRosca
Copy link

As suggested in the issue #835 this PR adds in a poetry buildpack.

This is heavily based on the implementation of the Pipenv buildpack, since they're pretty similar anyway. I've also implemented equivalent tests to what is done for pipenv.

The only large issue with this PR is how the python versioning is worked out in the buildpack. Poetry lets you specify dependency constraints using a variety of symbols (e.g. ^, *, ~), and it's likely that python was specified with these requirements.

To handle these constraints poetry-core has a semver module which is what I use to parse the versions constraints, however this means that poetry-core would then be a dependency requirement for repo2docker. I really don't like adding this dependency in, but the alternative is to either re-implement this constraint system, include a copy of the poetry.core.semver module in the poetry buildpack, or to ignore the constraints and parse them naively. Does anybody have a better way to deal with this?

@welcome
Copy link

welcome bot commented Oct 16, 2020

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@RobertRosca
Copy link
Author

Hi @betatim, just poking you in case the PR fell a bit too far down the todo list 😛 no rush though! Oh and Happy New Year!

@RobertRosca
Copy link
Author

Rebased onto main since there were some conflicts

@kylebarron
Copy link

it's likely that python was specified with these requirements.

Not just likely; specifying the Python version is mandatory. From here:

Be aware that declaring the python version for which your package is compatible is mandatory

@manics manics marked this pull request as draft January 26, 2022 19:21
@consideRatio consideRatio changed the title WIP: Poetry buildpack Add Poetry buildpack Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants