pypa / setuptools_scm

the blessed package to manage your versions by scm tags

Home Page:https://setuptools-scm.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

8.0.4 fails to install with Python 3.8/3.9 (but works fine with Python 3.10+)

barracuda156 opened this issue · comments

Is it even supported for Python <= 3.9?

It fails for me:

--->  Configuring py38-setuptools_scm
--->  Building py38-setuptools_scm
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-setuptools_scm/py38-setuptools_scm/work/setuptools-scm-8.0.4" && /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -m build --no-isolation --wheel --outdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-setuptools_scm/py38-setuptools_scm/work 
* Getting build dependencies for wheel...
running egg_info
writing src/setuptools_scm.egg-info/PKG-INFO
writing dependency_links to src/setuptools_scm.egg-info/dependency_links.txt
writing entry points to src/setuptools_scm.egg-info/entry_points.txt
writing requirements to src/setuptools_scm.egg-info/requires.txt
writing top-level names to src/setuptools_scm.egg-info/top_level.txt
ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
    main()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
    return hook(config_settings)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=['wheel'])
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
    self.run_setup()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/build_meta.py", line 341, in run_setup
    exec(code, locals())
  File "<string>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 103, in setup
    return distutils.core.setup(**attrs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/dist.py", line 989, in run_command
    super().run_command(command)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 318, in run
    self.find_sources()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 326, in find_sources
    mm.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 548, in run
    self.add_defaults()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 589, in add_defaults
    rcfiles = list(walk_revctrl())
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/sdist.py", line 18, in walk_revctrl
    for item in ep.load()(dirname):
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-setuptools_scm/py38-setuptools_scm/work/setuptools-scm-8.0.4/src/setuptools_scm/_file_finders/__init__.py", line 102, in find_files
    command: Callable[[_t.PathT], list[str]] = ep.load()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 208, in load
    module = import_module(match.group('module'))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'setuptools_scm.file_finder_git'

ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-setuptools_scm/py38-setuptools_scm/work/setuptools-scm-8.0.4" && /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -m build --no-isolation --wheel --outdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-setuptools_scm/py38-setuptools_scm/work 
Exit code: 1

But py310-setuptools_scm installs fine.

This looks like the effect of having multiple incompatible versions active

The entry point referred is used in a older incompatible version,

Reading the top of the output, the build process is complete wrong and using legacy setuptools

This is a broken build pipeline

Basically without build isolation, if a older version of setuptools-scm is installed,things Just break

Basically without build isolation, if a older version of setuptools-scm is installed,things Just break

@RonnyPfannschmidt Thank you for responding. What would you recommend? Deactivating preciously installed version? That is doable, we can declare a build conflict for the port with itself, that will have an effect of the user being in need to deactivate it, if an earlier version is installed.

The installation process is as it is set in Macports (I mean, I did not tweak it locally). If something is wrong besides an earlier version active, we will be happy to fix it.

I'm not familiar with ports, but my guess is, the proposed mechanism should work

closing this one as downstream bug in handling build dependencies