You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Invoking setup.pydirectly 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 the setuptools backend. But please, don't invoke this module. You can move most of the file contents to setup.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/.
Modern tooling requires projects to have explicit [build-system] section in pyproject.toml for best results.
Use pypa/build for making distribution packages; at least for making an sdist; I'll mention the wheels in the next point.
I see that there are 3 wheels that are published, but it does not cover the actual user base, so most would be forced to compile the thing during the installation process (https://packaging.python.org/en/latest/guides/packaging-binary-extensions/#building-extensions-for-multiple-platforms). One is marked as manylinux2014 but there's no toolchain verifying that it's actually compliant (the auditwheel call + twine check --strict). It might also be needed to invoke auditwheel 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 use cibuildwheel (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 the abi3 tag in case the C-extensions are ABI-compatible (which they probably are, but I haven't checked).
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: