darlinghq / darling

Darwin/macOS emulation layer for Linux

Home Page:http://www.darlinghq.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get rid of Python2 dependency

tpimh opened this issue · comments

Right now the build process depends on Python2 which is EOL for a while already. Modern distributions (Debian 12, Ubuntu 23.04, Arch Linux since September 2022, Fedora 32, openSUSE Leap 15.4, Alpine Linux 3.16) already dropped support for legacy Python versions, so it's no longer possible to get this build dependency via the package manager.

The solution is simple: update all scripts to be compatible with Python 3.

Hi,

Python 2 is not required since #1356

update all scripts to be compatible with Python 3.

Which scripts are you talking about?

In this case, only documentation should be updated. I noticed a recent issue (#1391) referencing Python 2 dependency, and this raised my concern.

And yet invoking tools/debian/make-deb ends up with this error (on current master):

tools/debian/make-deb
dch warning: Recognised distributions are: 
experimental, unstable, testing, stable, oldstable, oldoldstable,
{bullseye,buster,stretch,jessie,wheezy}-proposed-updates,
{testing,stable,oldstable,oldoldstable}-proposed-updates,
{bullseye,buster,stretch,jessie,wheezy}-security,
{testing,stable,oldstable,oldoldstable}}-security, bullseye-backports, bookworm-backports and UNRELEASED.
Using your request anyway.
dch: Did you see that warning?  Press RETURN to continue...

 dpkg-buildpackage -us -uc -ui -b
dpkg-buildpackage: info: source package darling
dpkg-buildpackage: info: source version 0.1.20230924~bookworm
dpkg-buildpackage: info: source distribution bookworm
dpkg-buildpackage: info: source changed by Darling build server <noreply@darlinghq.org>
 dpkg-source --before-build .
dpkg-buildpackage: info: host architecture amd64
dpkg-checkbuilddeps: error: Unmet build dependencies: python2
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -b failed

I assume that this actually comes from this line (too late to check as I'm already building, I've overrode the check with mentioned -d flag):

Build-Depends: cmake, clang | clang-9, bison, flex, libfuse-dev, libudev-dev, pkg-config, libc6-dev-i386, linux-headers-amd64|linux-headers-generic, gcc-multilib, libcairo2-dev, libgl1-mesa-dev, libtiff5-dev, libfreetype6-dev, libelf-dev, libxml2-dev, libegl1-mesa-dev, libglu1-mesa-dev, libfontconfig1-dev, libbsd-dev, debhelper, ninja-build, python2, libxrandr-dev, libxcursor-dev, libgif-dev, libavcodec-dev, libavformat-dev, libswresample-dev, libavutil-dev, libpulse-dev, libavformat-dev, libavcodec-dev, libdbus-1-dev, libxkbfile-dev, libcap-dev, llvm-dev, libvulkan-dev, libcap2-bin

I think it's from here, because it also complained about some missing deps like Linux kernel headers that weren't automatically installed before. Besides that there still seem to be many places in the repo mentioning python2. I'm currently building Darling on Debian 12 and will update with results as soon as it's finished building...

EDIT: Gonna move this to issue #1391

It seems that one issue is that darling-python2_0.1.20230924~bookworm_amd64.deb is an empty package now without any binaries apparently?

And it causes the following issue:

Darling [/Volumes/SystemRoot/]# xcode-select --install
Cannot open /root/.darling/usr/bin/python2.7: No such file or directory