deadsnakes / issues

Issues for https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
86 stars 6 forks source link

BUG: 3.9-dbg - No module named '_sysconfigdata_d_linux_x86_64-linux-gnu #188

Closed henryiii closed 2 years ago

henryiii commented 2 years ago

description

Very recently (today or 1-2 days ago), 3.9 deadsnakes debug builds on GitHub Actions for pybind11 started failing with `ModuleNotFoundError: No module named '_sysconfigdata_d_linux_x86_64-linux-gnu'.

Is this possibly related to #182? Could that have affected 3.9 by mistake?

Logs: https://github.com/pybind/pybind11/runs/4583094186?check_suite_focus=true

os information

deadsnakes/action@v2.1.1 on ubuntu-latest, GHA.

It can be reproduced in Docker also. Here is a MWE:

$ docker run --rm -it ubuntu:20.04
# apt update && apt install software-properties-common -y
# add-apt-repository ppa:deadsnakes/ppa && apt update && apt install -y python3.9-dev python3.9-dbg python3.9-venv python3.9-distutils
# python3.9-dbg -m venv .venv
# ./.venv/bin/python -m pip install -U pip setuptools wheel
# ./.venv/bin/python -c "import setuptools; from distutils import sysconfig as s; s.get_config_var('LDVERSION')"
Traceback (most recent call last):
  File "/.venv/lib/python3.9/site-packages/setuptools/_distutils/sysconfig.py", line 488, in _init_posix
    _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata_d_linux_x86_64-linux-gnu'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/.venv/lib/python3.9/site-packages/setuptools/_distutils/sysconfig.py", line 601, in get_config_var
    return get_config_vars().get(name)
  File "/.venv/lib/python3.9/site-packages/setuptools/_distutils/sysconfig.py", line 532, in get_config_vars
    func()
  File "/.venv/lib/python3.9/site-packages/setuptools/_distutils/sysconfig.py", line 491, in _init_posix
    _temp = __import__(
ModuleNotFoundError: No module named '_sysconfigdata'

based on https://github.com/deadsnakes/action/blob/master/bin/install-python.

lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:    20.04
Codename:   focal

uname -a

Linux 6aa941240de9 5.10.47-linuxkit #1 SMP Sat Jul 3 21:51:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
asottile commented 2 years ago

the 3.9 builds haven't changed in over a month: https://github.com/deadsnakes/python3.9

asottile commented 2 years ago

I suspect you're running into https://github.com/pypa/setuptools/blob/main/CHANGES.rst#breaking-changes

henryiii commented 2 years ago

I noticed that last night, but managed to forget about it by the morning! Thanks, I bet that's it. I'll verify, and close once I've verified (hopefully in an hour, but at least by tomorrow).

henryiii commented 2 years ago

Setting SETUPTOOLS_USE_DISTUTILS=stdlib fixes it, so it's likely a setuptools bug. Thanks!