Hi!
I see that https://sourceforge.net/p/cxx/code/451/ removed distutils from setup_makefile.py but setup.py seems to still use distutils, which is a problem with Python >=3.12. Could it be migrated to Setuptools? Thanks in advance!
Best, Sebastian
This is a contributed script, that I do not use.
Do you have a patch to it that I can use to migrate to setuptools?
Or can you use setup_makefile.py? Maybe I should delete setup.py?
Hi Barry,
I believe the Gentoo package
dev-python/pycxxthat brought me here usessetup.pyand notsetup_makefile.py. After a quick look at theMakefilethat commandpython3 setup_makefile.py linux Makefileproduced, my impression is:- that it does not have an
installtarget- that the produced files
obj/simple.so obj/example.so obj/pycxx_iter.soare not essential (but you tell me)- that
g++would need to be a variable, e.g.$(CXX)- that
-gshould come from$(CFLAGS)and$(LDFLAGS)to respect custom user compile flagsI may not understand the full picture yet, but so far it seems to me that
setup.pyis central to packaging and installation whilesetup_makefile.pyis not. What is your understanding, how do you usesetup_makefile.pyand how do you install the package?Best, Sebastian
I read how pycxx is packaged for fedora and its using setup.py - but distutils can be imported.
I'm not sure why that is working like that. Why is distutil available on Fedora?
I will investigate and update.
Note since all the setup.py does is install files there is no need to define the compiler.
PyCXX is a template library with nothing to be compiled. That happens in the projects that use PyCXX.
distutilsmay be importable with 3.12 in some places but upstream https://docs.python.org/3.11/library/distutils.html are clear in "deprecated with removal planned for Python 3.12" and the official docs no longer contain a page for that package for 3.12; it's officially removed with regard to CPython upstream.Thank you!
Understood, yes. I was referring to
setup_makefile.pythere and for that file, it applies.