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/pycxx
that brought me here usessetup.py
and notsetup_makefile.py
. After a quick look at theMakefile
that commandpython3 setup_makefile.py linux Makefile
produced, my impression is:- that it does not have an
install
target- that the produced files
obj/simple.so obj/example.so obj/pycxx_iter.so
are not essential (but you tell me)- that
g++
would need to be a variable, e.g.$(CXX)
- that
-g
should 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.py
is central to packaging and installation whilesetup_makefile.py
is not. What is your understanding, how do you usesetup_makefile.py
and 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.
distutils
may 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.py
there and for that file, it applies.