Skip to content
New issue

Have a question about this project? Sign 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

Deprecation of distutils #51

Closed
FriedrichFroebel opened this issue Jul 25, 2022 · 5 comments
Closed

Deprecation of distutils #51

FriedrichFroebel opened this issue Jul 25, 2022 · 5 comments

Comments

@FriedrichFroebel
Copy link
Contributor

FriedrichFroebel commented Jul 25, 2022

When building the package with some recent Python version (3.10.5 in my case), there are warnings about distutils being used, but deprecated:

$ python setup.py --nowx build
/home/runner/work/didjvu/didjvu/deps/gamera-4-4.0.0/setup.py:27: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.ccompiler import CCompiler
Gamera version: 4.0.0
Compiling genetic algorithms with parallelization (OpenMP)
generating wrappers for string_io plugin
[...]
@cdalitz
Copy link
Member

cdalitz commented Aug 15, 2022

Thanks for the info. Hopefully, there is a simple replacement or workaround: a port to a completely different build system would presumably be too expensive. Any suggestions are appreciated.

@FriedrichFroebel
Copy link
Contributor Author

Unfortunately, the migration docs are a bit sparse and I am not familiar enough with building C/C++ code. There is some guidance at https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html, but for the CCompiler part, there is still some discussion in pypa/setuptools#2806.

The corresponding imports have been introduced in 904faa9 by @Cyperghost as part of multithread building support - maybe he can tell more about why monkey-patching CCompiler.compile is required, which is not really clear to me without deeper insights.

@cdalitz
Copy link
Member

cdalitz commented Aug 23, 2022

As we do not have funding for Gamera, we must always consider whether just porting without any benefit, but just for the sake of keeping pace with the moving target Python is worth the time and money. There is also the pending deprecation of the old buffer protocol. Maybe it's time to pull the plug. We will briefly estimate the effort and then decide whether we will reallocate the ressources to other projects.

@cdalitz
Copy link
Member

cdalitz commented Oct 4, 2022

Cyberghost will have a closer look into this issue and hopefully work on the port to setuptool.

@cdalitz
Copy link
Member

cdalitz commented Jan 13, 2023

The build process has been ported to setuptools with the latest commit.

@cdalitz cdalitz closed this as completed Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants