Marco-Sulla / python-frozendict

A simple immutable dictionary for Python
https://github.com/Marco-Sulla/python-frozendict
GNU Lesser General Public License v3.0
133 stars 16 forks source link

[BUG] 2.3.7: pep517 based build procedure is not producing .whl archive with DSO module #79

Closed kloczek closed 1 year ago

kloczek commented 1 year ago

Looks like pep517 based build rpcedure does not produce .whl archive with dynamic shared object module despite fact that such DSO has been compiled and linked.

+ /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
running egg_info
creating src/frozendict.egg-info
writing src/frozendict.egg-info/PKG-INFO
writing dependency_links to src/frozendict.egg-info/dependency_links.txt
writing top-level names to src/frozendict.egg-info/top_level.txt
writing manifest file 'src/frozendict.egg-info/SOURCES.txt'
reading manifest file 'src/frozendict.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE.txt'
writing manifest file 'src/frozendict.egg-info/SOURCES.txt'
* Building wheel...
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-38
creating build/lib.linux-x86_64-cpython-38/frozendict
copying src/frozendict/__init__.py -> build/lib.linux-x86_64-cpython-38/frozendict
copying src/frozendict/core.py -> build/lib.linux-x86_64-cpython-38/frozendict
copying src/frozendict/monkeypatch.py -> build/lib.linux-x86_64-cpython-38/frozendict
copying src/frozendict/version.py -> build/lib.linux-x86_64-cpython-38/frozendict
copying src/frozendict/py.typed -> build/lib.linux-x86_64-cpython-38/frozendict
copying src/frozendict/frozendict.pyi -> build/lib.linux-x86_64-cpython-38/frozendict
running build_ext
building 'frozendict._frozendict' extension
creating build/temp.linux-x86_64-cpython-38
creating build/temp.linux-x86_64-cpython-38/src
creating build/temp.linux-x86_64-cpython-38/src/frozendict
creating build/temp.linux-x86_64-cpython-38/src/frozendict/c_src
creating build/temp.linux-x86_64-cpython-38/src/frozendict/c_src/3_8
/usr/bin/gcc -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fPIC -I/home/tkloczko/rpmbuild/BUILD/python-frozendict-2.3.7/src/frozendict/c_src/3_8/Include -I/home/tkloczko/rpmbuild/BUILD/python-frozendict-2.3.7/src/frozendict/c_src/3_8/cpython_src/Objects -I/home/tkloczko/rpmbuild/BUILD/python-frozendict-2.3.7/src/frozendict/c_src/3_8/cpython_src/Objects/stringlib -I/home/tkloczko/rpmbuild/BUILD/python-frozendict-2.3.7/src/frozendict/c_src/3_8/cpython_src/Objects/clinic -I/home/tkloczko/rpmbuild/BUILD/python-frozendict-2.3.7/src/frozendict/c_src/3_8/cpython_src -I/usr/include/python3.8 -c src/frozendict/c_src/3_8/frozendictobject.c -o build/temp.linux-x86_64-cpython-38/src/frozendict/c_src/3_8/frozendictobject.o -DPY_SSIZE_T_CLEAN
warning: build_ext: building extension "frozendict._frozendict" failed: command '/usr/bin/gcc' failed: No such file or directory

installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/frozendict
copying build/lib.linux-x86_64-cpython-38/frozendict/__init__.py -> build/bdist.linux-x86_64/wheel/frozendict
copying build/lib.linux-x86_64-cpython-38/frozendict/core.py -> build/bdist.linux-x86_64/wheel/frozendict
copying build/lib.linux-x86_64-cpython-38/frozendict/monkeypatch.py -> build/bdist.linux-x86_64/wheel/frozendict
copying build/lib.linux-x86_64-cpython-38/frozendict/version.py -> build/bdist.linux-x86_64/wheel/frozendict
copying build/lib.linux-x86_64-cpython-38/frozendict/py.typed -> build/bdist.linux-x86_64/wheel/frozendict
copying build/lib.linux-x86_64-cpython-38/frozendict/frozendict.pyi -> build/bdist.linux-x86_64/wheel/frozendict
running install_egg_info
running egg_info
writing src/frozendict.egg-info/PKG-INFO
writing dependency_links to src/frozendict.egg-info/dependency_links.txt
writing top-level names to src/frozendict.egg-info/top_level.txt
reading manifest file 'src/frozendict.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE.txt'
writing manifest file 'src/frozendict.egg-info/SOURCES.txt'
Copying src/frozendict.egg-info to build/bdist.linux-x86_64/wheel/frozendict-2.3.6-py3.8.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/frozendict-2.3.6.dist-info/WHEEL
creating '/home/tkloczko/rpmbuild/BUILD/python-frozendict-2.3.7/dist/.tmp-rs6tg5uh/frozendict-2.3.6-cp38-cp38-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'frozendict/__init__.py'
adding 'frozendict/core.py'
adding 'frozendict/frozendict.pyi'
adding 'frozendict/monkeypatch.py'
adding 'frozendict/py.typed'
adding 'frozendict/version.py'
adding 'frozendict-2.3.6.dist-info/LICENSE.txt'
adding 'frozendict-2.3.6.dist-info/METADATA'
adding 'frozendict-2.3.6.dist-info/WHEEL'
adding 'frozendict-2.3.6.dist-info/top_level.txt'
adding 'frozendict-2.3.6.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built frozendict-2.3.6-cp38-cp38-linux_x86_64.whl

Here is list of installed modules in build env

```console Package Version --------------- ------- build 0.10.0 distro 1.8.0 exceptiongroup 1.0.0 gpg 1.19.0 iniconfig 2.0.0 installer 0.7.0 libcomps 0.1.19 packaging 23.0 pluggy 1.0.0 pyproject_hooks 1.0.0 pytest 7.3.0 python-dateutil 2.8.2 setuptools 65.6.3 six 1.16.0 tomli 2.0.1 wheel 0.40.0 ```
Marco-Sulla commented 1 year ago

I see:

warning: build_ext: building extension "frozendict._frozendict" failed: command '/usr/bin/gcc' failed: No such file or directory

kloczek commented 1 year ago

Gosh .. my fault. After add gcc to build env. module passes build, install and test suite (pytest). Closing.

Thank you đź‘Ť

Marco-Sulla commented 1 year ago

De nada.

PS: if you want that the extension is mandatory, you have to set the env var CIBUILDWHEEL to 1: https://github.com/Marco-Sulla/python-frozendict#building