desihub / speclite

Lightweight utilities for working with spectroscopic data
14 stars 19 forks source link

Latest speclite release incompatible with setuptools>=58.0.2 #70

Closed rrjbca closed 3 years ago

rrjbca commented 3 years ago

The most recent release of speclite is incompatible with the most recent release of setuptools:

>> pip install setuptools==58.0.2
>> pip install --upgrade --no-cache-dir speclite

Collecting speclite
  Downloading speclite-0.13.tar.gz (813 kB)
     |████████████████████████████████| 813 kB 4.4 MB/s 
    ERROR: Command errored out with exit status 1:
     command: python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/nw/43x1r_9n2235_0prypvp329w0000gp/T/pip-install-veu0mnlm/speclite_2f9edd95dc2742aa965feed4c25bf466/setup.py'"'"'; __file__='"'"'/private/var/folders/nw/43x1r_9n2235_0prypvp329w0000gp/T/pip-install-veu0mnlm/speclite_2f9edd95dc2742aa965feed4c25bf466/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/nw/43x1r_9n2235_0prypvp329w0000gp/T/pip-pip-egg-info-uk77udyx
         cwd: /private/var/folders/nw/43x1r_9n2235_0prypvp329w0000gp/T/pip-install-veu0mnlm/speclite_2f9edd95dc2742aa965feed4c25bf466/
    Complete output (11 lines):
    /private/var/folders/nw/43x1r_9n2235_0prypvp329w0000gp/T/pip-install-veu0mnlm/speclite_2f9edd95dc2742aa965feed4c25bf466/astropy_helpers/astropy_helpers/setup_helpers.py:161: AstropyDeprecationWarning: The package argument to generate_version_py has been deprecated and will be removed in future. Specify the package name in setup.cfg instead
      warnings.warn('The package argument to generate_version_py has '
    /private/var/folders/nw/43x1r_9n2235_0prypvp329w0000gp/T/pip-install-veu0mnlm/speclite_2f9edd95dc2742aa965feed4c25bf466/astropy_helpers/astropy_helpers/setup_helpers.py:166: AstropyDeprecationWarning: The version argument to generate_version_py has been deprecated and will be removed in future. Specify the version number in setup.cfg instead
      warnings.warn('The version argument to generate_version_py has '
    /private/var/folders/nw/43x1r_9n2235_0prypvp329w0000gp/T/pip-install-veu0mnlm/speclite_2f9edd95dc2742aa965feed4c25bf466/astropy_helpers/astropy_helpers/setup_helpers.py:171: AstropyDeprecationWarning: The release argument to generate_version_py has been deprecated and will be removed in future. We now use the presence of the "dev" string in the version to determine whether this is a release
      warnings.warn('The release argument to generate_version_py has '
    /private/var/folders/nw/43x1r_9n2235_0prypvp329w0000gp/T/pip-install-veu0mnlm/speclite_2f9edd95dc2742aa965feed4c25bf466/astropy_helpers/astropy_helpers/setup_helpers.py:186: AstropyDeprecationWarning: Specifying the package name using the "package_name" option in setup.cfg is deprecated - use the "name" option instead.
      warnings.warn('Specifying the package name using the "package_name" '
    /private/var/folders/nw/43x1r_9n2235_0prypvp329w0000gp/T/pip-install-veu0mnlm/speclite_2f9edd95dc2742aa965feed4c25bf466/astropy_helpers/astropy_helpers/version_helpers.py:264: AstropyDeprecationWarning: Specifying the package name using the "package_name" option in setup.cfg is deprecated - use the "name" option instead.
      warnings.warn('Specifying the package name using the "package_name" '
    error in speclite setup command: use_2to3 is invalid.
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/83/ae/c940436d23883d4e45bfa79fca5e7cc084fd07b2722e407cfcbf6ddf47f2/speclite-0.13.tar.gz#sha256=cf32e5e7a060690fb9eecb071bbdce61854f04fe25e7fd312346a82446c56111 (from https://pypi.org/simple/speclite/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

It looks like #65 already implemented the necessary fix, removing use_2to3=True from the setup function arguments. As a result, building from the master branch with setuptools==58.0.2 is successful:

>> pip install setuptools==58.0.2
>> git clone https://github.com/desihub/speclite.git
>> cd speclite
>> pip install .

Collecting astropy
  Using cached astropy-4.3.1-cp39-cp39-macosx_10_9_x86_64.whl (6.6 MB)
Collecting scipy
  Using cached scipy-1.7.1-cp39-cp39-macosx_10_9_x86_64.whl (32.8 MB)
Collecting pyyaml
  Using cached PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl (259 kB)
Collecting numpy>=1.17
  Using cached numpy-1.21.2-cp39-cp39-macosx_10_9_x86_64.whl (17.0 MB)
Collecting pyerfa>=1.7.3
  Using cached pyerfa-2.0.0-cp39-cp39-macosx_10_9_x86_64.whl (340 kB)
Building wheels for collected packages: speclite
  Building wheel for speclite (setup.py) ... done
  Created wheel for speclite: filename=speclite-0.14.dev592-py3-none-any.whl size=362165 sha256=c23d35f3491207e31a7005713a0d47553bea01472b47bfc68be482b0bb9d4f71
  Stored in directory: /private/var/folders/nw/43x1r_9n2235_0prypvp329w0000gp/T/pip-ephem-wheel-cache-kdt3qvxj/wheels/e5/f1/8d/8435528e26defdd25d0821f33b32ab92260a0efe5056911ef4
Successfully built speclite
Installing collected packages: numpy, pyerfa, scipy, pyyaml, astropy, speclite
Successfully installed astropy-4.3.1 numpy-1.21.2 pyerfa-2.0.0 pyyaml-5.4.1 scipy-1.7.1 speclite-0.14.dev592

A new release off master should therefore be sufficient to resolve this issue.

dkirkby commented 3 years ago

Thanks for reporting this @rrjbca. I should be able take care of this tomorrow.

dkirkby commented 3 years ago

I just tagged and released v0.14 from master.

(for some reason, git push --tags is hanging for me, so this tag does not show up on github yet, but I will keep trying).

rrjbca commented 3 years ago

Thanks @dkirkby this is now working with our downstream project