8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? S 8000 ign 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
I'm not able to install the python-ldap - the wheel creation fails with an error about not finding Python.h, on Gitlab-CI
Python.h
I'm using Gitlab CI (with a debian 12 docker image) to test an application, using uv.
$ apt install libldap-dev $ uv venv --seed --python 3.11 # Note I'm installing a custom interpreter, provided by uv $ . .venv/bin/activate $ uv pip install python-ldap
Note that uv provides a Python.h in its Lib directory for the installed interpreter.
uv
Lib
× Failed to download and build `python-ldap==3.4.4` ├─▶ Build backend failed to build wheel through `build_wheel` (exit status: │ 1) │ [stdout] │ running bdist_wheel │ running build │ running build_py │ creating build/lib.linux-x86_64-cpython-311 │ copying Lib/ldapurl.py -> build/lib.linux-x86_64-cpython-311 │ copying Lib/ldif.py -> build/lib.linux-x86_64-cpython-311 │ creating build/lib.linux-x86_64-cpython-311/ldap │ copying Lib/ldap/__init__.py -> build/lib.linux-x86_64-cpython-311/ldap │ copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-cpython-311/ldap │ copying Lib/ldap/compat.py -> build/lib.linux-x86_64-cpython-311/ldap │ copying Lib/ldap/dn.py -> build/lib.linux-x86_64-cpython-311/ldap │ copying Lib/ldap/async.py -> build/lib.linux-x86_64-cpython-311/ldap │ copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-cpython-311/ldap │ copying Lib/ldap/filter.py -> build/lib.linux-x86_64-cpython-311/ldap │ copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-cpython-311/ldap │ copying Lib/ldap/functions.py -> build/lib.linux-x86_64-cpython-311/ldap │ copying Lib/ldap/asyncsearch.py -> │ build/lib.linux-x86_64-cpython-311/ldap │ copying Lib/ldap/pkginfo.py -> build/lib.linux-x86_64-cpython-311/ldap │ copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-cpython-311/ldap │ copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-cpython-311/ldap │ copying Lib/ldap/constants.py -> build/lib.linux-x86_64-cpython-311/ldap │ copying Lib/ldap/logger.py -> build/lib.linux-x86_64-cpython-311/ldap │ copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-cpython-311/ldap │ creating build/lib.linux-x86_64-cpython-311/ldap/controls │ copying Lib/ldap/controls/ppolicy.py -> │ build/lib.linux-x86_64-cpython-311/ldap/controls │ copying Lib/ldap/controls/__init__.py -> │ build/lib.linux-x86_64-cpython-311/ldap/controls │ copying Lib/ldap/controls/openldap.py -> │ build/lib.linux-x86_64-cpython-311/ldap/controls │ copying Lib/ldap/controls/pwdpolicy.py -> │ build/lib.linux-x86_64-cpython-311/ldap/controls │ copying Lib/ldap/controls/psearch.py -> │ build/lib.linux-x86_64-cpython-311/ldap/controls │ copying Lib/ldap/controls/sss.py -> │ build/lib.linux-x86_64-cpython-311/ldap/controls │ copying Lib/ldap/controls/vlv.py -> │ build/lib.linux-x86_64-cpython-311/ldap/controls │ copying Lib/ldap/controls/simple.py -> │ build/lib.linux-x86_64-cpython-311/ldap/controls │ copying Lib/ldap/controls/pagedresults.py -> │ build/lib.linux-x86_64-cpython-311/ldap/controls │ copying Lib/ldap/controls/deref.py -> │ build/lib.linux-x86_64-cpython-311/ldap/controls │ copying Lib/ldap/controls/readentry.py -> │ build/lib.linux-x86_64-cpython-311/ldap/controls │ copying Lib/ldap/controls/libldap.py -> │ build/lib.linux-x86_64-cpython-311/ldap/controls │ copying Lib/ldap/controls/sessiontrack.py -> │ build/lib.linux-x86_64-cpython-311/ldap/controls │ creating build/lib.linux-x86_64-cpython-311/ldap/extop │ copying Lib/ldap/extop/__init__.py -> │ build/lib.linux-x86_64-cpython-311/ldap/extop │ copying Lib/ldap/extop/passwd.py -> │ build/lib.linux-x86_64-cpython-311/ldap/extop │ copying Lib/ldap/extop/dds.py -> │ build/lib.linux-x86_64-cpython-311/ldap/extop │ creating build/lib.linux-x86_64-cpython-311/ldap/schema │ copying Lib/ldap/schema/__init__.py -> │ build/lib.linux-x86_64-cpython-311/ldap/schema │ copying Lib/ldap/schema/tokenizer.py -> │ build/lib.linux-x86_64-cpython-311/ldap/schema │ copying Lib/ldap/schema/subentry.py -> │ build/lib.linux-x86_64-cpython-311/ldap/schema │ copying Lib/ldap/schema/models.py -> │ build/lib.linux-x86_64-cpython-311/ldap/schema │ creating build/lib.linux-x86_64-cpython-311/slapdtest │ copying Lib/slapdtest/__init__.py -> │ build/lib.linux-x86_64-cpython-311/slapdtest │ copying Lib/slapdtest/_slapdtest.py -> │ build/lib.linux-x86_64-cpython-311/slapdtest │ running egg_info │ writing Lib/python_ldap.egg-info/PKG-INFO │ writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt │ writing requirements to Lib/python_ldap.egg-info/requires.txt │ writing top-level names to Lib/python_ldap.egg-info/top_level.txt │ reading manifest file 'Lib/python_ldap.egg-info/SOURCES.txt' │ reading manifest template 'MANIFEST.in' │ adding license file 'LICENCE' │ writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt' │ creating build/lib.linux-x86_64-cpython-311/slapdtest/certs │ copying Lib/slapdtest/certs/README -> │ build/lib.linux-x86_64-cpython-311/slapdtest/certs │ copying Lib/slapdtest/certs/ca.conf -> │ build/lib.linux-x86_64-cpython-311/slapdtest/certs │ copying Lib/slapdtest/certs/ca.pem -> │ build/lib.linux-x86_64-cpython-311/slapdtest/certs │ copying Lib/slapdtest/certs/client.conf -> │ build/lib.linux-x86_64-cpython-311/slapdtest/certs │ copying Lib/slapdtest/certs/client.key -> │ build/lib.linux-x86_64-cpython-311/slapdtest/certs │ copying Lib/slapdtest/certs/client.pem -> │ build/lib.linux-x86_64-cpython-311/slapdtest/certs │ copying Lib/slapdtest/certs/gencerts.sh -> │ build/lib.linux-x86_64-cpython-311/slapdtest/certs │ copying Lib/slapdtest/certs/gennssdb.sh -> │ build/lib.linux-x86_64-cpython-311/slapdtest/certs │ copying Lib/slapdtest/certs/server.conf -> │ build/lib.linux-x86_64-cpython-311/slapdtest/certs │ copying Lib/slapdtest/certs/server.key -> │ build/lib.linux-x86_64-cpython-311/slapdtest/certs │ copying Lib/slapdtest/certs/server.pem -> │ build/lib.linux-x86_64-cpython-311/slapdtest/certs │ running build_ext │ building '_ldap' extension │ creating build/temp.linux-x86_64-cpython-311/Modules │ x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g │ -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat │ -Werror=format-security -g -fwrapv -O2 -fPIC -DHAVE_SASL -DHAVE_TLS │ -DLDAPMODULE_VERSION=3.4.4 "-DLDAPMODULE_AUTHOR=python-ldap │ project" "-DLDAPMODULE_LICENSE=Python style" -IModules │ -I/builds/seniors/seniors/.uv_cache/builds-v0/.tmp9iF5DU/include │ -I/usr/include/python3.11 -c Modules/LDAPObject.c -o │ build/temp.linux-x86_64-cpython-311/Modules/LDAPObject.o │ [stderr] │ /builds/seniors/seniors/.uv_cache/builds-v0/.tmp9iF5DU/lib/python3.11/site-packages/setuptools/_distutils/dist.py:261: │ UserWarning: Unknown distribution option: 'test_suite' │ warnings.warn(msg) │ no previously-included directories found matching 'Doc/.build' │ In file included from Modules/LDAPObject.c:3: │ Modules/common.h:9:10: fatal error: Python.h: No such file or directory │ 9 | #include "Python.h" │ | ^~~~~~~~~~ │ compilation terminated. │ error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 ╰─▶ This error likely indicates that you need to install a library that provides "Python.h" for python-ldap@3.4.4 help: `python-ldap` was included because `django-auth-ldap==4.6.0` depends on `python-ldap`
Operating system: Docker image: python:3.11-bookworm
Python version: 3.11
python-ldap version: 3.4.4 (latest)
The text was updated successfully, but these errors were encountered:
I suppose it's not uv specfic, we need python3-dev to be able to build python ldap.
python3-dev
docker run -it --rm ghcr.io/astral-sh/uv:0.5-python3.9-bookworm-slim bash root@a3d046fa0517:/# apt update && apt install python3-dev libldap-dev libsasl2-dev build-essential root@a3d046fa0517:/# uv init test Initialized project `test` at `/test` root@a3d046fa0517:/# cd test/ root@a3d046fa0517:/test# uv add python-ldap Using CPython 3.9.21 interpreter at: /usr/local/bin/python3.9 Creating virtual environment at: .venv Resolved 4 packages in 885ms Built python-ldap==3.4.4 Prepared 3 packages in 1.87s Installed 3 packages in 3ms + pyasn1==0.6.1 + pyasn1-modules==0.4.1 + python-ldap==3.4.4
But I'm currently figure some similar issue on an Ubuntu image...
Sorry, something went wrong.
No branches or pull requests
Issue description:
I'm not able to install the python-ldap - the wheel creation fails with an error about not finding
Python.h
, on Gitlab-CISteps to reproduce:
I'm using Gitlab CI (with a debian 12 docker image) to test an application, using uv.
Note that
uv
provides aPython.h
in itsLib
directory for the installed interpreter.Operating system: Docker image: python:3.11-bookworm
Python version: 3.11
python-ldap version: 3.4.4 (latest)
The text was updated successfully, but these errors were encountered: