-
Notifications
You must be signed in to change notification settings - Fork 28
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
refactor: convert 'setup()' metadata to TOML #195
Conversation
Depend on GH master branch of 'cffi' for CPython 3.13*, until there is a release of 'cffi' which supports it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a little reluctant to approve the PR. It's fine per se, but we don't use pyproject.toml anywhere else. @icemac what do you think?
When trying something else than @tseaver Interestingly GitHub Actions breaks only on Ubuntu Python 3.13a6: https://github.com/zopefoundation/persistent/actions/runs/8733259336/job/23961629868?pr=195 |
I thought I had added an explanation for that choice: it made it easier / saner to spell the weird conditional dependency on the Github master branch: it could likely be done in "cffi @ git+https://github.com/python-cffi/cffi.git ; platform_python_implementation == 'CPython' and python_version >= '3.13a0'"
Hmm, built the $ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
$ /opt/Python-3.13.0a6/bin/python3.13 setup.py build_ext -i
/opt/Python-3.13.0a6/lib/python3.13/site-packages/setuptools/_distutils/dist.py:266: UserWarning: Unknown distribution option: 'cffi_modules'
warnings.warn(msg)
running build_ext
building 'persistent.cPersistence' extension
creating build
creating build/temp.linux-x86_64-cpython-313
creating build/temp.linux-x86_64-cpython-313/src
creating build/temp.linux-x86_64-cpython-313/src/persistent
gcc -pthread -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/opt/Python-3.13.0a6/include/python3.13 -c src/persistent/cPersistence.c -o build/temp.linux-x86_64-cpython-313/src/persistent/cPersistence.o
gcc -pthread -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/opt/Python-3.13.0a6/include/python3.13 -c src/persistent/ring.c -o build/temp.linux-x86_64-cpython-313/src/persistent/ring.o
creating build/lib.linux-x86_64-cpython-313
creating build/lib.linux-x86_64-cpython-313/persistent
gcc -pthread -shared build/temp.linux-x86_64-cpython-313/src/persistent/cPersistence.o build/temp.linux-x86_64-cpython-313/src/persistent/ring.o -o build/lib.linux-x86_64-cpython-313/persistent/cPersistence.cpython-313-x86_64-linux-gnu.so
building 'persistent.cPickleCache' extension
gcc -pthread -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/opt/Python-3.13.0a6/include/python3.13 -c src/persistent/cPickleCache.c -o build/temp.linux-x86_64-cpython-313/src/persistent/cPickleCache.o
gcc -pthread -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/opt/Python-3.13.0a6/include/python3.13 -c src/persistent/ring.c -o build/temp.linux-x86_64-cpython-313/src/persistent/ring.o
gcc -pthread -shared build/temp.linux-x86_64-cpython-313/src/persistent/cPickleCache.o build/temp.linux-x86_64-cpython-313/src/persistent/ring.o -o build/lib.linux-x86_64-cpython-313/persistent/cPickleCache.cpython-313-x86_64-linux-gnu.so
building 'persistent._timestamp' extension
gcc -pthread -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/opt/Python-3.13.0a6/include/python3.13 -c src/persistent/_timestamp.c -o build/temp.linux-x86_64-cpython-313/src/persistent/_timestamp.o
gcc -pthread -shared build/temp.linux-x86_64-cpython-313/src/persistent/_timestamp.o -o build/lib.linux-x86_64-cpython-313/persistent/_timestamp.cpython-313-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-cpython-313/persistent/cPersistence.cpython-313-x86_64-linux-gnu.so -> src/persistent
copying build/lib.linux-x86_64-cpython-313/persistent/cPickleCache.cpython-313-x86_64-linux-gnu.so -> src/persistent
copying build/lib.linux-x86_64-cpython-313/persistent/_timestamp.cpython-313-x86_64-linux-gnu.so -> src/persistent
Looking at that failure, the GH action seems to be using a cached version of
AFAICT, the "official" docs for building extension modules under setuptools do not deprecate |
@dataflake I think I've managed to tweak We should still be thinking about moving to |
I fully agree that we need to modernize the package build setup. Something of this nature is usually discussed and decided on the meta repository. That way we can make sure it works with the configuration file template generator. We are trying to avoid manual tweaks for these common files. |
Superseded by #192. |
Depend on GH master branch of 'cffi' for CPython 3.13*, until there is a release of 'cffi' which supports it.