vivarium-core
vivarium-core copied to clipboard
replace all uses of distutils
Python 3.10 deprecates distutils
. It'll be removed in Python 3.12.
So with the move to support Python 3.10 in #135 , we should replace distutils in all vivarium projects. setuptools
embeds a forked (and updated?) copy of distutils but there are compatibility issues and it's moving away from being a CLI tool to being just a library. setup.py
is not dead but apparently we should not run it directly. It's a mess.
(Presumably wcEcoli will stay on Python 3.8.7 and distutils. I did try updating it to setuptools but reverted that due to https://github.com/CovertLab/wcEcoli/issues/1113.)
PEP 517 defines how to describe a project in a small, declarative pyproject.toml
file.
Modern tools to consider:
-
Flit. Experts recommend Flit and it should be easier and more robust to use and maintain. Flit handles the normal cases but Flit does not support Cython code so it won't work for
vivarium-ecoli
. It makes sense for us to learn one modern tool and use it in all vivarium projects. - build.
- Pipenv (there's also a Pipenv guide on Real Python)
- Poetry
- Bento
-
Meson is a build tool like pyinvoke and Ruby rake, not a packaging tool, but apparently Numpy & Scipy are moving to [Meson]. Maybe it includes Python packaging features? Anyway, don't switch to
numpy.distutils
. - ...
Some of these tools can also obviate the Makefile
.