Closed mhaas closed 2 months ago
I'm having the same issue; all vendored tarballs fail with error "invalid command bdist_wheel". Attempted workarounds including:
I have updated my description above to reference 1.8.9 instead of 1.8.10. I am not sure why 1.8.10 seemed to work for me; in my testing with the terraform CF provider, I observed that the buildpack version was not applied correctly.
I found a hint in my logs when running 1.8.9:
2023-08-25T12:16:31.39+0200 [STG/0] ERR DEPRECATION: oss2 is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
This message explains why 1.8.9 works and later versions break: 1.8.9 is the last version that comes with pip 23.0 according to the changelog
Thanks for reporting this and sorry this is happening.
I always get a bit confused with python build tools packages, like wheel
and setuptools
, and how they interact with the various PEP
s and setup.py
, etc.
I think the desired solution here is that the Python Buildpack should include the wheel
package and ensure it is available during application staging.
Does that sound right to you? Do you see a different path forward?
Hi @robdimsdale,
yeah, I think adding wheel
and setuptools
would be a good fix/workaround.
I think with PEP-517, it is hard to implemented vendoring correctly. The basic problem is that the vendor/ directory would need to include the build-time dependencies specified by a PEP-517-ified sdist. I am not sure if the ecosystem (e.g. pip) currently handles this.
So, for the short term, adding wheel
and setuptools
is a reasonable heuristic to make most (?) packages work.
We're having the same issue with vendored dependencies. Are there any plans to fix this in a future release or should it already be fixed?
Similar issues. Is there a workaround that can be used until it is fixed?
https://github.com/cloudfoundry/python-buildpack/releases/tag/v1.8.26 should fix the issue. Feel free to reopen if the issue persists
What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running
cf curl /v2/info && cf version
?What version of the buildpack you are using?
Working: 1.8.9 and older Broken: 1.8.10 and newer
If you were attempting to accomplish a task, what was it you were attempting to do?
I am pushing an app with vendored sdist dependencies. Pip attempts to build a wheel of these dependencies during installation which fails because the
wheel
package is not installed. This probably happens due to use of--build-isolation
, which breaks PEP 517 packages (see #171).What did you expect to happen?
Staging should work without an error, like it does for non-vendored apps with the same set of dependencies.
I am providing steps to reproduce here: https://github.com/mhaas/cf-python-buildpack-vendoring-issue
What was the actual behavior?
Staging fails with this error:
Please confirm where necessary: