basxsoftwareassociation / bread

Engine to create database applications based on Django and the IBM Carbon Design System
BSD 3-Clause "New" or "Revised" License
19 stars 2 forks source link

Broken Support for Python 3.10 due to backports.zoneinfo #100

Closed tpokorra closed 2 years ago

tpokorra commented 2 years ago

On Fedora 35, there is Python 3.10. There is an issue with backports.zoneinfo. It is not required anymore, because "zoneinfo is now in the standard library, so there's no reason to install backports.zoneinfo on Python >= 3.9" (see upstream issue: https://github.com/pganssle/zoneinfo/issues/111)

The bug is during pip install:

[00:05:40]   building 'backports.zoneinfo._czoneinfo' extension
[00:05:40]   creating build/temp.linux-x86_64-3.10
[00:05:40]   creating build/temp.linux-x86_64-3.10/lib
[00:05:40]   gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/django/basxconnect_demo/.venv/include -I/usr/include/python3.10 -c lib/zoneinfo_module.c -o build/temp.linux-x86_64-3.10/lib/zoneinfo_module.o -std=c99
[00:05:40]   lib/zoneinfo_module.c: In function 'zoneinfo_fromutc':
[00:05:40]   lib/zoneinfo_module.c:600:19: error: '_PyLong_One' undeclared (first use in this function); did you mean '_PyLong_New'?
[00:05:40]     600 |             one = _PyLong_One;
[00:05:40]         |                   ^~~~~~~~~~~
[00:05:40]         |                   _PyLong_New
[00:05:40]   lib/zoneinfo_module.c:600:19: note: each undeclared identifier is reported only once for each function it appears in
[00:05:40]   error: command '/usr/bin/gcc' failed with exit code 1
[00:05:40]   ----------------------------------------
[00:05:40]   ERROR: Failed building wheel for backports.zoneinfo
tpokorra commented 2 years ago

Not sure if we should just say: we don't support python 3.10 yet, or if we can make the requirement conditional in https://github.com/basxsoftwareassociation/bread/blob/main/setup.py#L51

Actually, that is possible: https://stackoverflow.com/questions/21082091/install-requires-based-on-python-version