Search code examples
pythonubuntucondasetup.pypysmt

pySMT using deprecated setup.py


I have installed pySMT for Python 3.12 using PyCharm package manager with a conda environment in Ubuntu 22.04.5 LTS:

$ pip show pysmt

Name: PySMT
Version: 0.9.6
Summary: A solver-agnostic library for SMT Formulae manipulation and solving
Home-page: http://www.pysmt.org
Author: PySMT Team
Author-email: [email protected]
License: APACHE
Location: .../lib/python3.12/site-packages
Requires: 
Required-by: 

However, if I try to install a solver, or, for example, "show you which solvers have been found in your PYTHONPATH", I get a SetuptoolsDeprecationWarning:

$ pysmt-install --check

.../lib/python3.12/site-packages/setuptools/_distutils/cmd.py:79: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
Traceback (most recent call last):
...
FileExistsError: [Errno 17] File exists: '.../miniforge3/envs/.../bin/python3.12'

What am I missing? Why would pysmt-install use the deprecated setup.py?

Perplexity suggested to pip install --upgrade setuptools but I'm not convinced.

Edit: There is one similar open issue in the pySMT Github repo but it is related to MacOS with M1:

Cannot install msat solver on MacOs with M1


Solution

  • What am I missing?

    I don't know – is there an error here that you're trying to solve? What you're seeing is a warning that's saying, well, exactly what it's saying, that projects these days should use PEP 517 builds.

    Why would pysmt-install use the deprecated setup.py?

    Because that's what it's written to do (1, 2).

    There's a whole bunch of grody patching going on in those installers anyway, and looks like those "sub-packages" just haven't been updated to use modern build methods.