pip-tools: pip-compile failure pep517/in_process/_in_process.py get_requires_for_build_wheel
My pip-compile was working fine yesterday and is now failing.
I don’t know what changed. I know that my requirements.txt did not change and my pip-tools version did not change either.
I have seen issues #1535 and #1390 but no workaround works for me.
Environment Versions
- OS Type:
Linux - Python version:
Python 3.8.10 - pip version:
pip 21.3.1 - pip-tools version:
pip-compile, version 6.4.0
Steps to replicate
$ cat setup.py
from setuptools import setup
setup(
name='apollo',
install_requires=['conan==1.45.0']
)
$ cat build/requirements.txt
bottle==0.12.19
# via conan
certifi==2021.10.8
# via requests
charset-normalizer==2.0.12
# via requests
colorama==0.4.4
# via conan
conan==1.45.0
# via apollo (setup.py)
distro==1.6.0
# via conan
fasteners==0.17.3
# via conan
idna==3.3
# via requests
jinja2==3.0.3
# via conan
markupsafe==2.1.0
# via jinja2
node-semver==0.6.1
# via conan
patch-ng==1.17.4
# via conan
pluginbase==1.0.1
# via conan
pygments==2.11.2
# via conan
pyjwt==1.7.1
# via conan
python-dateutil==2.8.2
# via conan
pyyaml==5.4.1
# via conan
requests==2.27.1
# via conan
six==1.16.0
# via
# conan
# python-dateutil
tqdm==4.62.3
# via conan
urllib3==1.26.8
# via
# conan
# requests
Expected result
success
Actual result
$ pip-compile --output-file build/requirements.txt
ERROR: WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
ERROR: You should consider upgrading via the '/data/homes/jcoulon/.gradle/pyvenv-apollo/bin/python -m pip install --upgrade pip' command.
Traceback (most recent call last):
File "/data/homes/jcoulon/.gradle/pyvenv-apollo/bin/pip-compile", line 8, in <module>
sys.exit(cli())
File "/data/homes/jcoulon/.gradle/pyvenv-apollo/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/data/homes/jcoulon/.gradle/pyvenv-apollo/lib/python3.8/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/data/homes/jcoulon/.gradle/pyvenv-apollo/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/data/homes/jcoulon/.gradle/pyvenv-apollo/lib/python3.8/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/data/homes/jcoulon/.gradle/pyvenv-apollo/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/data/homes/jcoulon/.gradle/pyvenv-apollo/lib/python3.8/site-packages/piptools/scripts/compile.py", line 408, in cli
dist = meta.load(os.path.dirname(os.path.abspath(src_file)))
File "/data/homes/jcoulon/.gradle/pyvenv-apollo/lib/python3.8/site-packages/pep517/meta.py", line 71, in load
path = Path(build_as_zip(builder))
File "/data/homes/jcoulon/.gradle/pyvenv-apollo/lib/python3.8/site-packages/pep517/meta.py", line 58, in build_as_zip
builder(dest=out_dir)
File "/data/homes/jcoulon/.gradle/pyvenv-apollo/lib/python3.8/site-packages/pep517/meta.py", line 53, in build
_prep_meta(hooks, env, dest)
File "/data/homes/jcoulon/.gradle/pyvenv-apollo/lib/python3.8/site-packages/pep517/meta.py", line 28, in _prep_meta
reqs = hooks.get_requires_for_build_wheel({})
File "/data/homes/jcoulon/.gradle/pyvenv-apollo/lib/python3.8/site-packages/pep517/wrappers.py", line 172, in get_requires_for_build_wheel
return self._call_hook('get_requires_for_build_wheel', {
File "/data/homes/jcoulon/.gradle/pyvenv-apollo/lib/python3.8/site-packages/pep517/wrappers.py", line 322, in _call_hook
self._subprocess_runner(
File "/data/homes/jcoulon/.gradle/pyvenv-apollo/lib/python3.8/site-packages/pep517/wrappers.py", line 75, in quiet_subprocess_runner
check_output(cmd, cwd=cwd, env=env, stderr=STDOUT)
File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/data/homes/jcoulon/.gradle/pyvenv-apollo/bin/python', '/data/homes/jcoulon/.gradle/pyvenv-apollo/lib/python3.8/site-packages/pep517/in_process/_in_process.py', 'get_requires_for_build_wheel', '/tmp/tmpr0u030tn']' returned non-zero exit status 1.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 4
- Comments: 38 (18 by maintainers)
@abravalheri
Thank you! Your help and explanation is very much appreciated.
If there are no objections, I’ll close this one soon.
Hi guys, I will try to have a look this evening on the failing jobs, but it would be really helpful from the setuptools point of view if you have an isolated reproducer.
In terms of potential points of failure, v61 introduced a breaking change for “empty packages”. They are now required to explicitly set
packages=[]orpy_modules=[]insetup.pyor the equivalentpackages = # purposefully emptyinsetup.cfg. If this condition is not met and the project root is not empty[^1], the build can potentially fail.The first reproduction with Dockerfile that fail in this thread did not met this new requirement. The following revision of the Dockerfile creates a brand new empty project root and simply adds setup.py to it and therefore succeds.
[^1]: “Empty” with the exception of
setup.py,setup.cfg.@lsiden
Support for relpaths throughout the Python package ecosystem is … picky.
Based on my work in #1329, I would suggest you format that as
file:../my_lib.whlrather than thename @ URIform. Can you try that?I didn’t have any
pyproject.toml.Adding this file also solves my problem.
Thanks.
Hint: I’ve just had the same problem, and found this issue. For me the root cause was that my project was not installable at all (i.e.
pip install -e .failed). Fixing that, pip-tools worked just fine.Here is a reproducible Dockerfile: