Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

container image not buildable from sources #821

Open
eskultety opened this issue Feb 4, 2025 · 0 comments
Open

container image not buildable from sources #821

eskultety opened this issue Feb 4, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@eskultety
Copy link
Member

eskultety commented Feb 4, 2025

This has been an issue since pretty much forever when we added setuptools-scm as a dynamic version inference tool in commit a253654. If one tries to actually build the container image from the source tarball, they'll get:

$ tar -xf <ourtarball>.tar.gz && cd <ourtarball>
$ podman build .
[1/7] STEP 1/1: FROM registry.access.redhat.com/ubi9/ubi@sha256:53d6c19d664f4f418ce5c823d3a33dbb562a2550ea249cf07ef10aa063ace38f AS ubi
--> 4d9d35858951
...
File "/tmp/pip-build-env-y2q5mfj8/overlay/lib/python3.9/site-packages/setuptools_scm/_get_version_impl.py", line 117, in _version_missing
          raise LookupError(
      LookupError: setuptools-scm was unable to detect version for /src.

This is because setuptools-scm expects the .git directory to be present in the container build environment which it is not, because .git naturally isn't (and shouldn't be) part of the source tarball.

@eskultety eskultety added the bug Something isn't working label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant