Auto merge of #26174 - sstangl:fix-fedora-bootstrap, r=Manishearth

Add 'python3-devel' to the DNF bootstrap packages list

Bootstrapping on Fedora 31 fails with a missing <Python.h> header.
That header is provided by the 'python3-devel' package.

Note that Fedora 31 does not ship Python2 packages anymore due to Python2 EOL.

Prior to this patch on Fedora 31, running `python3 ./mach bootstrap` results in the following build error:

```
    running build_ext
    building 'psutil._psutil_linux' extension
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/psutil
    gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=570 -DPSUTIL_LINUX=1 -I/usr/include/python3.7m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.7/psutil/_psutil_common.o
    psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
        9 | #include <Python.h>
          |          ^~~~~~~~~~
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/sstangl/dev/servo/python/_virtualenv3.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2w6ff301/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2w6ff301/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-pg5414df/install-record.txt --single-version-externally-managed --compile --install-headers /home/sstangl/dev/servo/python/_virtualenv3.7/include/site/python3.7/psutil Check the logs for full command output.
```

After this patch, `python3 ./mach bootstrap` succeeds.

- [X] These changes do not require tests because it is adding a missing dependency.
This commit is contained in:
bors-servo 2020-04-12 22:26:04 -04:00 committed by GitHub
commit 24a45248d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -101,7 +101,7 @@ sudo dnf install curl libtool gcc-c++ libXi-devel libunwind-devel \
libXrandr-devel gperf fontconfig-devel cabextract ttmkfdir expat-devel \
rpm-build openssl-devel cmake bzip2-devel libX11-devel libXcursor-devel \
libXmu-devel mesa-libOSMesa-devel dbus-devel ncurses-devel harfbuzz-devel \
ccache mesa-libGLU-devel clang clang-libs gstreamer1-devel \
ccache mesa-libGLU-devel clang clang-libs gstreamer1-devel python3-devel \
gstreamer1-plugins-base-devel gstreamer1-plugins-bad-free-devel autoconf213
```

View file

@ -126,7 +126,7 @@ def linux(context, force=False):
'libXcursor-devel', 'libXmu-devel', 'mesa-libOSMesa-devel',
'dbus-devel', 'ncurses-devel', 'harfbuzz-devel', 'ccache',
'mesa-libGLU-devel', 'clang', 'clang-libs', 'gstreamer1-devel',
'gstreamer1-plugins-base-devel',
'gstreamer1-plugins-base-devel', 'python3-devel',
'gstreamer1-plugins-bad-free-devel', 'autoconf213']
if context.distro == "Ubuntu" and context.distro_version != "14.04":
pkgs_apt += ['libgstreamer1.0-dev', 'libgstreamer-plugins-base1.0-dev',