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

Build PyPI wheels #93

Closed
2 tasks
joasode opened this issue Jan 21, 2025 · 2 comments
Closed
2 tasks

Build PyPI wheels #93

joasode opened this issue Jan 21, 2025 · 2 comments
Labels
Sprint | ready This issue is well suited for code sprint

Comments

@joasode
Copy link
Contributor

joasode commented Jan 21, 2025

We need a build setup based on our pyproject.toml file. Since cotainr is a pure python package, we should only need to build a single wheel and sdist source distribution for all OS'es and architectures.

The setup must:

@joasode joasode added the Sprint | ready This issue is well suited for code sprint label Jan 21, 2025
@joasode joasode added Sprint | nominee Nominated to be targeted in a sprint, but more preparation work is needed and removed Sprint | ready This issue is well suited for code sprint labels Jan 27, 2025
@joasode
Copy link
Contributor Author

joasode commented Jan 29, 2025

The current major build backends for building wheels are listed here. We should decide on which one is most appropriate for the cotainr project. In PR #57 Hatchling is suggested. This branch docker-build-ci suggest SetupTools (>= 61.0).

uv currently only have a build frontend, however the Astral team is currently deliberating whether building a uv build backend would be their strategic decision.

Further down the line we could consider building one various linux variations using https://github.com/pypa/manylinux if the need arose.

Regarding the decision on what build backend system we should use, it seems like for a pure python package like cotainr, there should not really be any difference. The key difference I see is if we want to use some specific workflow automation from the build frontend. As I see it, the only automation in #57 is the [tool.hatch.version] table, which seems seems to be implented in setuptools [tool.setuptools.dynamic] table. So I would suggest the conservative option of following PyPA and use Setuptools (>= 61.0) as build backend and pip (>= 19.0) or build as build frontend. Then we also have a natural choice for the CI in issue #94 ciwheelbuild. At least until we can do it all in uv ;)

@Chroxvi @TheBlackKoala @juliusroeder any thoughts?

@Chroxvi
Copy link
Contributor

Chroxvi commented Jan 30, 2025

I agree with your assessment @joasode, and I don't have a strong opinion on the choice of backend/frontend. I don't think we need to care too much about the manylinux standards as cotainr is pure Python package with no compiled extensions.

In my work in the pip_package branch, I used flit as it is a very simple tool for pure Python packages. It had a few short comings, though:

  1. Installation of different dependency sets (docs, tests, etc.) gets a little clumsy.
  2. It is not easy to include extra files in the wheel, e.g. if you wanted to include the doc folder in the wheel.

As for setuptools, I have found that difficult to use and maintain in the past, but that was 10 years ago before the we had all the nice pyproject.toml and frontend/backend standards....

To minimize the number of dependencies, I would like to try with uv as frontend instead of build since we plan to use uv for installing dependencies anyway.

@Chroxvi Chroxvi mentioned this issue Jan 30, 2025
5 tasks
@Chroxvi Chroxvi added Sprint | ready This issue is well suited for code sprint and removed Sprint | nominee Nominated to be targeted in a sprint, but more preparation work is needed labels Feb 5, 2025
@joasode joasode closed this as completed Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sprint | ready This issue is well suited for code sprint
Projects
None yet
Development

No branches or pull requests

2 participants