taschini / pyinterval

PyInterval — Interval arithmetic in Python
http://pyinterval.readthedocs.io
Other
83 stars 25 forks source link

Installation fails with setuptools>=75.0.0 #34

Open Schmaexxi opened 2 weeks ago

Schmaexxi commented 2 weeks ago

Hi! Even though this repo doesn't seem active any more, I'll put this out here in case anyone else has an issue installing this package.

Problem description

Cannot install pyinterval with setuptools>=75.0.0 due to major changes in setuptools. Crlibm, which is a direct dependency of pyinterval fails to install due to the changes in setuptools (specific error below)

My speccs

Tested with: Python 3.10, 3.11

The same error occurs in a Github runner on Ubuntu 22.04.5 LTS with Python 3.10

Installation failure shell output

pip install --no-cache pyinterval                                                                                                                                                                        ml/aint/ci [6c4db28870]
Looking in indexes: https://pypi.org/simple
Collecting pyinterval
  Downloading pyinterval-1.2.0.tar.gz (25 kB)
  Preparing metadata (setup.py) ... done
Collecting crlibm==1.*,>=1.0.3 (from pyinterval)
  Downloading crlibm-1.0.3.tar.gz (1.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 1.4 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/km/d_mh08b54j52lf5b16g476k40000gn/T/pip-install-9drerz7x/crlibm_43dfd5bfd6bb44ed8de5cfd7748b06ef/setup.py", line 15, in <module>
          from distutils.command.upload import upload
      ModuleNotFoundError: No module named 'distutils.command.upload'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Looking at crlibm's setup.py, it shows the failing import. I haven't looked into why setuptools removed this but it definitely makes this part fail. Their changelog states the removal in v75.0.0, which refers to this commit

Workaround

Use setuptools<=74.1.3