cschwan / sage-on-gentoo

(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
79 stars 26 forks source link

jupyter_jsmol-2022.1.0 will not build against python3.9 #706

Closed strogdon closed 2 years ago

strogdon commented 2 years ago

This is on Prefix which I don't believe is causing this.

>>> Compiling source in /storage/strogdon/gentoo-rap/var/tmp/portage/dev-python/jupyter_jsmol-2022.1.0/work/jupyter_jsmol-2022.1.0 ...
 * python3_9: running distutils-r1_run_phase distutils-r1_python_compile
 *   Building the wheel for jupyter_jsmol-2022.1.0 via setuptools.build_meta
gpep517 build-wheel --backend setuptools.build_meta --output-fd 3 --wheel-dir /storage/strogdon/gentoo-rap/var/tmp/portage/dev-python/jupyter_jsmol-2022.1.0/work/jupyter_jsmol-2022.1.0-python3_9/wheel
Traceback (most recent call last):
  File "/storage/strogdon/gentoo-rap/usr/lib/python-exec/python3.9/gpep517", line 4, in <module>
    sys.exit(main())
  File "/storage/strogdon/gentoo-rap/usr/lib/python3.9/site-packages/gpep517/__main__.py", line 220, in main
    return func(args)
  File "/storage/strogdon/gentoo-rap/usr/lib/python3.9/site-packages/gpep517/__main__.py", line 87, in build_wheel
    wheel_name = backend.build_wheel(args.wheel_dir, args.config_json)
  File "/storage/strogdon/gentoo-rap/usr/lib/python3.9/site-packages/setuptools/build_meta.py", line 244, in build_wheel
    return self._build_with_temp_dir(['bdist_wheel'], '.whl',
  File "/storage/strogdon/gentoo-rap/usr/lib/python3.9/site-packages/setuptools/build_meta.py", line 229, in _build_with_temp_dir
    self.run_setup()
  File "/storage/strogdon/gentoo-rap/usr/lib/python3.9/site-packages/setuptools/build_meta.py", line 174, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 8, in <module>
    from jupyter_packaging import (
  File "/storage/strogdon/gentoo-rap/usr/lib/python3.9/site-packages/jupyter_packaging/__init__.py", line 6, in <module>
    from .setupbase import *
  File "/storage/strogdon/gentoo-rap/usr/lib/python3.9/site-packages/jupyter_packaging/setupbase.py", line 37, in <module>
    from setuptools.config import StaticModule
ImportError: cannot import name 'StaticModule' from 'setuptools.config' (/storage/strogdon/gentoo-rap/usr/lib/python3.9/site-packages/setuptools/config/__init__.py)
eix -I dev-python/setuptools
[I] dev-python/setuptools
     Available versions:  62.6.0^t ~63.1.0^t ~63.2.0^t {test PYTHON_TARGETS="pypy3 python3_8 python3_9 python3_10 python3_11"}
     Installed versions:  62.6.0^t(07:21:24 PM 07/27/2022)(-test PYTHON_TARGETS="python3_9 python3_10 -pypy3 -python3_8 -python3_11")
     Homepage:            https://github.com/pypa/setuptools/ https://pypi.org/project/setuptools/
     Description:         Collection of extensions to Distutils

The StaticModule class is defined under

$ grep -r StaticModule ~/usr/lib/python3.10/site-packages/setuptools
/storage/strogdon/gentoo-rap/usr/lib/python3.10/site-packages/setuptools/config/expand.py:class StaticModule:

$ grep -r StaticModule ~/usr/lib/python3.9/site-packages/setuptools
/storage/strogdon/gentoo-rap/usr/lib/python3.9/site-packages/setuptools/config/expand.py:class StaticModule:
kiwifb commented 2 years ago

I must say since the default has changed from python 3.9 to python 3.10 I have stopped testing my install on 3.9. I'll have to investigate.

strogdon commented 2 years ago

Initially I though python3.9 was the issue, but StaticModule is in the same location for python3.9 and python3.10

kiwifb commented 2 years ago

Do you have an old stale version of jupyter_packaging? The call comes from there and has protection against import not working in version 0.12.2.

strogdon commented 2 years ago

I do have jupyter_packaging-0.11.1 installed - 0.12.2 is available.

kiwifb commented 2 years ago

I am fairly sure updating will help.

strogdon commented 2 years ago

Upgrading jupyter_packaging did the trick.

kiwifb commented 2 years ago

I am thinking of raising the dependency to avoid that kind of stale package. And obviously, this is the right thing to do in that case.