jack-cli-cd-ripper / jack

Jack command-line CD ripper
GNU General Public License v2.0
14 stars 5 forks source link

setuptools-scm is failing #53

Closed pimzand closed 2 years ago

pimzand commented 2 years ago

I currently can't install any change in my local git repo,

sudo python setup.py install
 
Traceback (most recent call last):
  File "/home/pim/os/linux/sound/jack/jack-cli-cd-ripper/jack/setup.py", line 28, in <module>
    setup(
  File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib64/python3.10/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 459, in __init__
    _Distribution.__init__(
  File "/usr/lib64/python3.10/distutils/dist.py", line 292, in __init__
    self.finalize_options()
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 837, in finalize_options
    ep(self)
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 858, in _finalize_setup_keywords
    ep.load()(self, ep.name, value)
  File "/usr/lib/python3.10/site-packages/setuptools_scm/integration.py", line 75, in version_keyword
    _assign_version(dist, config)
  File "/usr/lib/python3.10/site-packages/setuptools_scm/integration.py", line 51, in _assign_version
    _version_missing(config)
  File "/usr/lib/python3.10/site-packages/setuptools_scm/__init__.py", line 106, in _version_missing
    raise LookupError(
LookupError: setuptools-scm was unable to detect version for /home/pim/os/linux/sound/jack/jack-cli-cd-ripper/jack.

Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
pimzand commented 2 years ago

This is my first attempt after having upgraded from Fedora 35 to Fedora 36. Fedora 36 comes with python3-setuptools_scm-6.4.2-1.fc36.noarch Fedora 35 had python3-setuptools_scm-6.0.1-4.fc35.noarch

madmartin commented 2 years ago

I can confirm this error message. My setuptools version is dev-python/setuptools_scm-6.4.1

pimzand commented 2 years ago

The problem is caused by git, being run as root from setuptools_scm. Git is failing when run as root when the git directory is owned by a non-root user. To fix, run sudo git config --global --add safe.directory $PWD Then continue with sudo pip install .