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

Use poetry for packaging #198

Closed
wants to merge 19 commits into from
Closed

Use poetry for packaging #198

wants to merge 19 commits into from

Conversation

sjagoe
Copy link
Member

@sjagoe sjagoe commented Dec 3, 2023

Part one of addressing #196

@sjagoe sjagoe marked this pull request as ready for review December 3, 2023 21:46
@sjagoe sjagoe requested a review from itziakos December 3, 2023 21:46
@sjagoe sjagoe force-pushed the poetry branch 2 times, most recently from 3e24cdc to 36d85e6 Compare December 5, 2023 09:05
Copy link
Contributor

@itziakos itziakos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sold on poetry but I can see the appeal. On thing that bugs me is that one needs poetry packages to build the package from the sdist. Is there a way that the generated sdist uses just setuptools without any dynamic features?

pyproject.toml Outdated
statistics = "^1.0.3.5"
stevedore = [
{ version = "^3.5.2", python = "<3.8" },
{ version = "^4.1.1", python = ">=3.8" }
Copy link
Contributor

@itziakos itziakos Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to be so strict in the runtime dependencies? Stevedore is stable enough and I think it is safe to have ">=4.1.1"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, locally I build haas using stevedore 5.x

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's typical in application development to pin dependencies to semantic-version compatible. I'm open to either. Or to adding v5 as the version used for later python versions.

@sjagoe
Copy link
Member Author

sjagoe commented Dec 5, 2023

I am not sold on poetry

What options do we have that satisfy these requirements?

  1. Use pyproject.toml exclusively (with plugin entry points as well)
  2. Support generating the version number from git and writing it to the source

I didn't look at many, but chose poetry for its metadata format being more pleasant to use than hatchling

@sjagoe
Copy link
Member Author

sjagoe commented Dec 5, 2023

Okay, I'm not up-to-date on new setuptools. The only think I see missing I think is the dynamic version number, but otherwise we could use that instead of poetry. Although I kind of like poetry for the reason of it managing the virtualenv for me

@sjagoe
Copy link
Member Author

sjagoe commented Dec 5, 2023

I don't see a way for using pyproject.toml for development dependencies with setuptools. It looks like going that way would lead back to a mix of different dependency management solutions (requirements files for some subset) rather than defining all project metadata in pyproject.toml.

To me poetry is the clearly more complete solution.

@itziakos
Copy link
Contributor

itziakos commented Dec 5, 2023

@sjagoe the PR is ok as we discussed offline.

@sjagoe sjagoe requested a review from itziakos December 5, 2023 20:16
@sjagoe
Copy link
Member Author

sjagoe commented Dec 5, 2023

I made some changes to open up dependency versions and remove the poetry lock file.

@sjagoe
Copy link
Member Author

sjagoe commented Dec 5, 2023

Closed in favour of #199

@sjagoe sjagoe closed this Dec 5, 2023
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

Successfully merging this pull request may close these issues.

2 participants