ymattw / ydiff

View colored, incremental diff in workspace or from stdin with side by side and auto pager support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replace legacy distutils by... setuptools?

hartwork opened this issue · comments

Hi @ymattw,

are there any plans to migrate off legacy distutils? There are multiple options for a target, what are your thoughts and/or equirements for a pull request with a good chance of getting merged if any?

Best, Sebastian

Confirmed that this breaks ydiff for Fedora 39; that link should contain some useful links about how to get rid of distutils

https://bugzilla.redhat.com/show_bug.cgi?id=2154966

@AloisMahdal good to know!

@ymattw any thoughts?

While I am annoyed by such kind of breakage introduced in new python versions, this problem is not an issue (yet) to ydiff itself. To create a release package, one can use python environments that still have the distutils installed - from python<3.12 built-in or via third party tool.

Yes the solution would be moving to setuptools, I suppose it's builtin in major python 3 versions. But I have to find another time when I am in the mood of fixing everything related to releases all together (GitHub action for package test, docker image, documentation, etc.).

Interestingly, distutils still works in at least up to 3.12.4?

⮕ % docker run -it -v $(pwd):$(pwd) python:3.12.4-alpine sh
/ # apk add --no-cache bash make
fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/community/x86_64/APKINDEX.tar.gz
(1/2) Installing bash (5.2.26-r0)
Executing bash-5.2.26-r0.post-install
(2/2) Installing make (4.4.1-r2)
Executing busybox-1.36.1-r29.trigger
OK: 17 MiB in 39 packages
/ # cd /home/ymattw/ydiff/
/home/ymattw/ydiff # make build
./setup.py build sdist
/home/ymattw/ydiff #

@ymattw I would need to double check to be sure why that is, either it's distro patches or setuptools being installed and being the indirect provider of distutils, something like that.

Would you acctep a pull request migrating from distutils to setuptools? It would solve the problem, and the only work on your shoulders is review then. What do you think?

Sure, pull request is always welcome, please make sure https://github.com/ymattw/ydiff/actions/workflows/package.yml passes.

@ymattw done, please see #119.