Closed yurivict closed 2 years ago
I am unable to reproduce this using pip 21.3.1:
>pip install yq --no-binary :all:
Collecting yq
Downloading yq-2.14.0.tar.gz (28 kB)
Preparing metadata (setup.py) ... done
Collecting PyYAML>=5.3.1
Downloading PyYAML-6.0.tar.gz (124 kB)
|████████████████████████████████| 124 kB 4.9 MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting xmltodict>=0.11.0
Downloading xmltodict-0.12.0.tar.gz (18 kB)
Preparing metadata (setup.py) ... done
Collecting toml>=0.10.0
Downloading toml-0.10.2.tar.gz (22 kB)
Preparing metadata (setup.py) ... done
Collecting argcomplete>=1.8.1
Downloading argcomplete-2.0.0.tar.gz (54 kB)
|████████████████████████████████| 54 kB 7.7 MB/s
Preparing metadata (setup.py) ... done
Skipping wheel build for yq, due to binaries being disabled for it.
Skipping wheel build for argcomplete, due to binaries being disabled for it.
Skipping wheel build for toml, due to binaries being disabled for it.
Skipping wheel build for xmltodict, due to binaries being disabled for it.
Building wheels for collected packages: PyYAML
Building wheel for PyYAML (pyproject.toml) ... done
Created wheel for PyYAML: filename=PyYAML-6.0-cp39-cp39-macosx_12_0_x86_64.whl size=45338 sha256=e9ca931d6bb4d27b45b2d8049e756c29828072a33495917591d5db296ebadfcf
Stored in directory: /Users/kislyuk/Library/Caches/pip/wheels/b4/0f/9a/d6af48581dda678920fccfb734f5d9f827c6ed5b4074c7eda8
Successfully built PyYAML
Installing collected packages: xmltodict, toml, PyYAML, argcomplete, yq
Running setup.py install for xmltodict ... done
Running setup.py install for toml ... done
Running setup.py install for argcomplete ... done
Running setup.py install for yq ... done
Successfully installed PyYAML-6.0 argcomplete-2.0.0 toml-0.10.2 xmltodict-0.12.0 yq-2.14.0
If you need help, please provide a complete set of steps to reproduce the issue.
Here's the complete command with output:
===> Configuring for yq-2.14.0
(cd /disk-samsung/freebsd-ports/textproc/yq/work/yq-2.14.0; /usr/bin/env XDG_DATA_HOME=/disk-samsung/freebsd-ports/textproc/yq/work XDG_CONFIG_HOME=/disk-samsung/freebsd-ports/textproc/yq/work XDG_CACHE_HOME=/disk-samsung/freebsd-ports/textproc/yq/work/.cache HOME=/disk-samsung/freebsd-ports/textproc/yq/work PATH=/disk-samsung/freebsd-ports/textproc/yq/work/.bin:/home/yuri/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin NO_PIE=yes MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES LDSHARED="cc -shared" PYTHONDONTWRITEBYTECODE= PYTHONOPTIMIZE= PREFIX=/usr/local LOCALBASE=/usr/local CC="cc" CFLAGS="-O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing " CPP="cpp" CPPFLAGS="-fno-omit-frame-pointer" LDFLAGS=" -fstack-protector-strong " LIBS="" CXX="c++" CXXFLAGS="-O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer " MANPREFIX="/usr/local" BSD_INSTALL_PROGRAM="install -s -m 555" BSD_INSTALL_LIB="install -s -m 0644" BSD_INSTALL_SCRIPT="install -m 555" BSD_INSTALL_DATA="install -m 0644" BSD_INSTALL_MAN="install -m 444" /usr/local/bin/python3.8 -c "import sys; import setuptools; __file__='setup.py'; sys.argv[0]='setup.py'; exec(compile(open(__file__, 'rb').read().replace(b'\\r\\n', b'\\n'), __file__, 'exec'))" config )
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "setup.py", line 5, in <module>
setup(
File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.8/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 455, in __init__
_Distribution.__init__(self, {
File "/usr/local/lib/python3.8/distutils/dist.py", line 292, in __init__
self.finalize_options()
File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 801, in finalize_options
ep(self)
File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 808, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "/usr/local/lib/python3.8/site-packages/setuptools_scm/integration.py", line 75, in version_keyword
_assign_version(dist, config)
File "/usr/local/lib/python3.8/site-packages/setuptools_scm/integration.py", line 51, in _assign_version
_version_missing(config)
File "/usr/local/lib/python3.8/site-packages/setuptools_scm/__init__.py", line 106, in _version_missing
raise LookupError(
LookupError: setuptools-scm was unable to detect version for /disk-samsung/freebsd-ports/textproc/yq/work/yq-2.14.0.
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
This didn't happen with 2.13.0. Something changed.
Strangely, it builds with the tarball from PyPI.
So closing.
Thanks for your help!
OK, I was able to reproduce the issue. It looks like you originally tried to pull the tag's tarball from github. Note that the line immediately following your pasted snippet gives the explanation for the error:
LookupError: setuptools-scm was unable to detect version for /private/var/folders/mg/s14fqnk1089g4jggcbyz2xnr0000gp/T/pip-req-build-nsqjbwin.
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.
It's unfortunate that with setuptools-scm raw tarballs from github don't work, perhaps there is a way to hide them from the release. But setuptools-scm is the best way for maintainers to manage release versions so this will be a common issue.
The FreeBSD package build fails:
It builds from the tarball downloaded from GitHub.