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

docker build failed from tar.gz source #369

Open
pbalazs-t opened this issue Apr 10, 2024 · 1 comment
Open

docker build failed from tar.gz source #369

pbalazs-t opened this issue Apr 10, 2024 · 1 comment

Comments

@pbalazs-t
Copy link

Docker build from the tar.gz source is not working. From a cloned source is working well.
If I copy the ".git" directory from a cloned repository into the directory what was extracted from tar.gz, the build is successful.

v0.14.1, v0.14.0 ....

[builder 4/4] RUN pip install --prefix="/install" --no-warn-script-location /sygnal:
1.754 Processing /sygnal
1.759 Installing build dependencies: started
4.030 Installing build dependencies: finished with status 'done'
4.031 Getting requirements to build wheel: started
4.237 Getting requirements to build wheel: finished with status 'error'
4.246 error: subprocess-exited-with-error
4.246
4.246 × Getting requirements to build wheel did not run successfully.
4.246 │ exit code: 1
4.246 ╰─> [35 lines of output]
4.246 Traceback (most recent call last):
4.246 File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
4.246 main()
4.246 File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
4.246 json_out['return_val'] = hook(**hook_input['kwargs'])
4.246 File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
4.246 return hook(config_settings)
4.246 File "/tmp/pip-build-env-blii0irz/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
4.246 return self._get_build_requires(config_settings, requirements=['wheel'])
4.246 File "/tmp/pip-build-env-blii0irz/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
4.246 self.run_setup()
4.246 File "/tmp/pip-build-env-blii0irz/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup
4.246 exec(code, locals())
4.246 File "", line 1, in
4.246 File "/tmp/pip-build-env-blii0irz/overlay/lib/python3.10/site-packages/setuptools/init.py", line 104, in setup
4.246 return distutils.core.setup(**attrs)
4.246 File "/tmp/pip-build-env-blii0irz/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 147, in setup
4.246 _setup_distribution = dist = klass(attrs)
4.246 File "/tmp/pip-build-env-blii0irz/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 307, in init
4.246 _Distribution.init(self, dist_attrs)
4.246 File "/tmp/pip-build-env-blii0irz/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 283, in init
4.246 self.finalize_options()
4.246 File "/tmp/pip-build-env-blii0irz/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 658, in finalize_options
4.246 ep(self)
4.246 File "/tmp/pip-build-env-blii0irz/overlay/lib/python3.10/site-packages/setuptools_scm/_integration/setuptools.py", line 121, in infer_version
4.246 _assign_version(dist, config)
4.246 File "/tmp/pip-build-env-blii0irz/overlay/lib/python3.10/site-packages/setuptools_scm/_integration/setuptools.py", line 56, in _assign_version
4.246 _version_missing(config)
4.246 File "/tmp/pip-build-env-blii0irz/overlay/lib/python3.10/site-packages/setuptools_scm/_get_version_impl.py", line 112, in _version_missing
4.246 raise LookupError(
4.246 LookupError: setuptools-scm was unable to detect version for /sygnal.
4.246
4.246 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.
4.246
4.246 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
4.246 [end of output]
4.246
4.246 note: This error originates from a subprocess, and is likely not a problem with pip.
4.248 error: subprocess-exited-with-error
4.248
4.248 × Getting requirements to build wheel did not run successfully.
4.248 │ exit code: 1
4.248 ╰─> See above for output.
4.248
4.248 note: This error originates from a subprocess, and is likely not a problem with pip.
4.255
4.255 [notice] A new release of pip is available: 23.0.1 -> 24.0
4.255 [notice] To update, run: pip install --upgrade pip


Dockerfile:22

20 | COPY . /sygnal/
21 |
22 | >>> RUN pip install --prefix="/install" --no-warn-script-location /sygnal
23 |
24 | ###

ERROR: failed to solve: process "/bin/sh -c pip install --prefix="/install" --no-warn-script-location /sygnal" did not complete successfully: exit code: 1

@reivilibre
Copy link
Contributor

hmm, guess this is a nasty side effect of determining the version number from the git repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants