-
Notifications
You must be signed in to change notification settings - Fork 47
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
GHA+PyPI+packaging shortcomings #466
Comments
@webknjaz I'm taking a look at implementing some of this now. I'll be honest, I'm not as knowledgeable around some of these areas and could use some help. Are there any other resources you can point to to help me get my head around updating our distribution? |
https://packaging.python.org/en/latest/flow/ is probably a good place to start reading |
@raylu appreciate it! |
Yep, PyPUG is a good place to start. But if you have more specific questions — tag me. Or just post your discoveries/progress here and I'll try to keep an eye on the issue in case you get stuck. In addition to PyPUG, there's a few scientific communities that try to present the same and adjacent information in other forms. Like https://learn.scientific-python.org/development/guides/packaging-compiled/. But really, start with the very first links in the initial post, I think. After that, try following the cibuildwheel docs. |
Done! Left a few chaotic comments… |
Not at all @webknjaz, really appreciated |
As I was inspecting the repo, I noticed a few outdated, deprecated, discouraged practices and vulnerability surfaces regarding $sbj. So this is my attempt to document them.
setup.py
directly has been deprecated some time ago @ https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html; and it'd been discouraged during like half a decade before. It's still fine to use it as a config for thesetuptools
backend. But please, don't invoke this module. You can move most of the file contents tosetup.cfg
(the declarative options) and only keep the C-extension building in it, but that's optional. Here's one of the PyPUG guides on the topic, but it doesn't cover C-exts: https://packaging.python.org/en/latest/guides/modernize-setup-py-project/.[build-system]
section inpyproject.toml
for best results.manylinux2014
but there's no toolchain verifying that it's actually compliant (theauditwheel
call +twine check --strict
). It might also be needed to invokeauditwheel repair
/delocate
/delvewheel
depending on the target. It's much easier to implement this nowadays, compared to the old times — it's now customary to usecibuildwheel
(https://cibuildwheel.pypa.io) that does all the heavy lifting for you, which is a generic solution and is invocable both locally and in CI (you can optionally include running tests in that config and also make wheels for non-x86 arch easily). You might be able to cut the number of actual artifacts by using theabi3
tag in case the C-extensions are ABI-compatible (which they probably are, but I haven't checked).setup.py
too, and it actually renders two commands in a single line so it's fully brokenThe text was updated successfully, but these errors were encountered: