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

feat: poetry v1.2 #57

Closed
aryarm opened this issue Jan 26, 2022 · 18 comments
Closed

feat: poetry v1.2 #57

aryarm opened this issue Jan 26, 2022 · 18 comments

Comments

@aryarm
Copy link

aryarm commented Jan 26, 2022

Hi all,

First, thank you for creating this feedstock! It's been very helpful.

Having the ability to install v1.2 would be helpful for my own projects. I'd like to inquire as to the possibility of building it, perhaps with a separate label or branch as described in #56 (comment). Is this possible and what would it involve?

I've never contributed to a cf feedstock before, but if needed, I might be able to offer some help.

@xylar
Copy link
Contributor

xylar commented Jan 26, 2022

@aryarm, for my own work, it turned out that the alpha version of potery-core was sufficient, see:
conda-forge/poetry-core-feedstock#12

I am happy to create a dev branch of poetry, but it relies on development versions of other packages (poetry-core and cleo), so it's substantially more effort than just making a development version of this one package:
https://github.com/python-poetry/poetry/blob/1.2.0a2/pyproject.toml#L34-L35

I just want to make sure it's worth the effort.

@xylar
Copy link
Contributor

xylar commented Jan 26, 2022

I'm going to go ahead and work on this.

Here's the checklist:

@aryarm
Copy link
Author

aryarm commented Jan 26, 2022

Hi @xylar,

On my end, this isn't a super important request. After all, I can always just use the standard install script instead of installing from conda-forge. But it would certainly be nice to be able to isolate my poetry installation in a conda environment. I'm elated that you're taking up the mantle on this, but no need to put too much work into it if it's really difficult.

@xylar
Copy link
Contributor

xylar commented Jan 26, 2022

I mostly wanted to be sure that you need poetry and not just poetry core. It sounds like the answer is, yes you do. It's not a ton of work. I just dropped it earlier because it turned out I didn't need it myself.

@maresb
Copy link
Contributor

maresb commented Jan 26, 2022

I've been very eager to get PEP 660 support which has been sitting in the main branch of poetry-core for what seems like ages.

...hmm, but thinking this through, i think it's only really useful for that purpose if it's on PyPI.

@xylar
Copy link
Contributor

xylar commented Jan 26, 2022

@maresb, I think that feature will likely still be useful on conda-forge. My guess is that, if you include the alpha version of poetry from conda-forge in your development environment, you'll be able to do python -m pip install -e .. Obviously, we can at least try it out.

@maresb
Copy link
Contributor

maresb commented Jan 26, 2022

Ah, good point! Yes, it would be very interesting to try out.

To be specific, the experiment is to do an editable install with the following pyproject.toml

[build-system]
requires = ["poetry-core>1.0.7"]
build-backend = "poetry.core.masonry.api"

which should fail without an existing install given that the latest PyPI version is 1.0.7.

@xylar
Copy link
Contributor

xylar commented Jan 26, 2022

@maresb, that experiment you can already do. You need to install the development version of poetry-core with:

conda install -c conda-forge/label/poetry_dev "poetry-core>1.0.7"

or include this channel in creating your development environment. You don't need the full poetry.

@maresb
Copy link
Contributor

maresb commented Jan 26, 2022

Hmm, I must say that I really don't understand poetry-core's versioning conventions...

The current stable release is 1.0.7 from Oct 4, 2021. There is a prerelease of 1.1.0a6 from July 30, 2021, which is also the latest version with the poetry_dev label. (This prerelease does not support PEP 660.) So the stable release is newer than the alpha series. Then I look on the master branch and there the version is 1.1.0a6.

But @aryarm was referring to a mysterious 1.2. Is this an actual thing?

So I'm not sure what to expect. Is the next release going to be 1.1.0a7, 1.1.0 or 1.2.0?

@xylar
Copy link
Contributor

xylar commented Jan 26, 2022

@maresb, I think you're confusing poetry versioning with poetry-core versioning. They're separate things.

@xylar
Copy link
Contributor

xylar commented Jan 26, 2022

And, yes, poetry-core seems to be developing 1.0.x in parallel with 1.1.0ax, and similarly for poetry.

@xylar xylar mentioned this issue Jan 26, 2022
4 tasks
@xylar
Copy link
Contributor

xylar commented Jan 26, 2022

@aryarm, hmm, this is a fair amount of work. Good thing I'm a sucker for the sunken cost fallacy. I've put too much effort in now to abandon this thing... ;-)

@xylar
Copy link
Contributor

xylar commented Jan 26, 2022

In earnest, though, these kinds of projects are always good exercises. I needed a reminder how to make use of multiple dev. packages at once. And virtualenv definitely needs some help, which I wouldn't have noticed without this work.

@aryarm
Copy link
Author

aryarm commented Jan 26, 2022

@xylar, you have my glowing admiration! I appreciate you so much :D

I hope you know that your efforts are also pretty inspiring to students like me. I think I'd like to learn how to contribute to feedstocks myself, now. And thanks for outlining things in that checklist - that really helps me keep track and understand what you've been up to

@xylar
Copy link
Contributor

xylar commented Jan 27, 2022

I hope you know that your efforts are also pretty inspiring to students like me. I think I'd like to learn how to contribute to feedstocks myself, now.

I would be happy to help you get started if you have software of your own you'd like to create a recipe for, or if there's software not yet on conda-forge you'd like to add. poetry isn't exactly the simplest starting point :-)

@xylar
Copy link
Contributor

xylar commented Jan 27, 2022

@aryarm, this should be available by tomorrow. To install it, you need to include the channels -c conda-forge/label/poetry_dev and -c conda-forge/label/cleo_dev. Something like this:

conda create -y -n dev -c conda-forge/label/poetry_dev -c conda-forge/label/cleo_dev -c conda-forge python=3.10 poetry=1.2.0a2 <other_packages>

Let me know how that goes.

@xylar
Copy link
Contributor

xylar commented Jan 27, 2022

Closed via #58

@xylar xylar closed this as completed Jan 27, 2022
@maresb
Copy link
Contributor

maresb commented Mar 1, 2022

Thank you very much @xylar! Because of this build I'm now able to use the CLI flags from Poetry v1.2 within my Conda environments. I really appreciate your work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants