For some reason git is required
Closed this issue · 4 comments
aaltat commented
In here https://github.com/MarketSquare/robotframework-browser/runs/3731288969?check_suite_focus=true there is error about missing git:
---> Running in b15bcfa2d006
Obtaining file:///
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/setup.py'"'"'; __file__='"'"'/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-x7dw41k7
cwd: /
Complete output (13 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/setup.py", line 11, in <module>
subprocess.check_output("git describe --always".split())
File "/usr/local/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/local/lib/python3.9/subprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'git'
----------------------------------------
WARNING: Discarding file:///. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
The command '/bin/sh -c pip install -e .' returned a non-zero code: 1
oikajo commented
You're right, setup.py gets version from git tag.
This could be fixed easily adding couple lines to Dockerfile:
COPY .git /.git
RUN apt update && apt -y install git
But can we expect that user gets git repository via git clone -> .git directory gets created?
Deleted user commented
If clone is successful, then there is always .git directory. But all this hassle is making the build of image slower, could we reconsider?