-vvv option).[tool.poetry.dev-dependencies]
jinja2-cli = { git = "[email protected]:mattrobenolt/jinja2-cli.git", branch = "master" }
Here is what I get on GitLab CI:
$ poetry install -vvv
Creating virtualenv aria2p-py3.6 in /root/.cache/pypoetry/virtualenvs
Using virtualenv: /root/.cache/pypoetry/virtualenvs/aria2p-py3.6
Updating dependencies
Resolving dependencies...
1: fact: aria2p is 0.2.1
1: derived: aria2p
1: fact: aria2p depends on requests (*)
1: fact: aria2p depends on black (*)
1: fact: aria2p depends on pytest (*)
1: fact: aria2p depends on pytest-cov (*)
1: fact: aria2p depends on pytest-sugar (*)
1: fact: aria2p depends on ipython (^7.2)
1: fact: aria2p depends on recommonmark (^0.4.0)
1: fact: aria2p depends on sphinx (^1.8)
1: fact: aria2p depends on sphinx-rtd-theme (^0.4.2)
1: fact: aria2p depends on sphinxcontrib-spelling (^4.2)
1: fact: aria2p depends on responses (^0.10.5)
1: fact: aria2p depends on pytest-xdist (^1.26)
1: fact: aria2p depends on isort (^4.3)
1: fact: aria2p depends on flake8 (^3.6)
1: fact: aria2p depends on jinja2-cli (*)
1: fact: aria2p depends on bandit (^1.5)
1: fact: aria2p depends on safety (^1.8)
1: selecting aria2p (0.2.1)
1: derived: safety (^1.8)
1: derived: bandit (^1.5)
1: derived: jinja2-cli (*)
1: derived: flake8 (^3.6)
1: derived: isort (^4.3)
1: derived: pytest-xdist (^1.26)
1: derived: responses (^0.10.5)
1: derived: sphinxcontrib-spelling (^4.2)
1: derived: sphinx-rtd-theme (^0.4.2)
1: derived: sphinx (^1.8)
1: derived: recommonmark (^0.4.0)
1: derived: ipython (^7.2)
1: derived: pytest-sugar (*)
1: derived: pytest-cov (*)
1: derived: pytest (*)
1: derived: black (*)
1: derived: requests (*)
PyPI: 5 packages found for safety >=1.8,<2.0
PyPI: 2 packages found for bandit >=1.5,<2.0
1: Version solving took 0.207 seconds.
1: Tried 1 solutions.
[FileNotFoundError]
[Errno 2] No such file or directory: '/tmp/pypoetry-git-jinja2-cli26vra6cc'
Exception trace:
/usr/local/lib/python3.6/site-packages/cleo/application.py in run() at line 94
status_code = self.do_run(input_, output_)
/usr/local/lib/python3.6/site-packages/poetry/console/application.py in do_run() at line 88
return super(Application, self).do_run(i, o)
/usr/local/lib/python3.6/site-packages/cleo/application.py in do_run() at line 197
status_code = command.run(input_, output_)
/usr/local/lib/python3.6/site-packages/poetry/console/commands/command.py in run() at line 77
return super(BaseCommand, self).run(i, o)
/usr/local/lib/python3.6/site-packages/cleo/commands/base_command.py in run() at line 146
status_code = self.execute(input_, output_)
/usr/local/lib/python3.6/site-packages/cleo/commands/command.py in execute() at line 107
return self.handle()
/usr/local/lib/python3.6/site-packages/poetry/console/commands/install.py in handle() at line 57
return_code = installer.run()
/usr/local/lib/python3.6/site-packages/poetry/installation/installer.py in run() at line 76
self._do_install(local_repo)
/usr/local/lib/python3.6/site-packages/poetry/installation/installer.py in _do_install() at line 158
ops = solver.solve(use_latest=self._whitelist)
/usr/local/lib/python3.6/site-packages/poetry/puzzle/solver.py in solve() at line 38
packages, depths = self._solve(use_latest=use_latest)
/usr/local/lib/python3.6/site-packages/poetry/puzzle/solver.py in _solve() at line 171
self._package, self._provider, locked=locked, use_latest=use_latest
/usr/local/lib/python3.6/site-packages/poetry/mixology/__init__.py in resolve_version() at line 7
return solver.solve()
/usr/local/lib/python3.6/site-packages/poetry/mixology/version_solver.py in solve() at line 79
next = self._choose_package_version()
/usr/local/lib/python3.6/site-packages/poetry/mixology/version_solver.py in _choose_package_version() at line 349
dependency = min(*unsatisfied, key=_get_min)
/usr/local/lib/python3.6/site-packages/poetry/mixology/version_solver.py in _get_min() at line 342
return len(self._provider.search_for(dependency))
/usr/local/lib/python3.6/site-packages/poetry/puzzle/provider.py in search_for() at line 132
packages = self.search_for_vcs(dependency)
/usr/local/lib/python3.6/site-packages/poetry/puzzle/provider.py in search_for_vcs() at line 197
safe_rmtree(str(tmp_dir))
/usr/local/lib/python3.6/site-packages/poetry/utils/helpers.py in safe_rmtree() at line 102
shutil.rmtree(path, onerror=_on_rm_error)
/usr/local/lib/python3.6/shutil.py in rmtree() at line 477
onerror(os.lstat, path, sys.exc_info())
/usr/local/lib/python3.6/site-packages/poetry/utils/helpers.py in _on_rm_error() at line 97
os.chmod(path, stat.S_IWRITE)
install [--no-dev] [--dry-run] [-E|--extras EXTRAS] [--develop DEVELOP]
In my local environment it works just fine. Before, I had jinja2-cli = { git = "[email protected]:mattrobenolt/jinja2-cli", branch = "master" } in my pyproject.toml file (without .git extension), and adding the .git extension (as seen in another issue) didn't solve it.
Could it be because I install poetry in CI with pip install poetry instead of the recommended method?
I'm gonna try without branch = "master" and with allow-prereleases = true and report back.
Same error when installing poetry with recommended method, without branch = "master" or with allow-prereleases = true. Running low on ideas! Also it's possible to test locally with gitlab-runner (see how to install it):
git clone https://github.com/pawamoy/aria2p
cd aria2p
gitlab-runner exec docker check-safety
I would like to say that I didn't spend the last hour trying to debug this, only to find out I was using [email protected] instead of https://github.com, but I did.
So, when using [email protected] in a Docker container, of course SSH keys are not setup, so git clone fails, so the directory in /tmp does not exist, and then same_rmtree fails.
Final word: make sure to use an HTTPS URL instead of a git one, or remember to setup your SSH client if the git url is necessary (private repo, etc.).
Most helpful comment
I would like to say that I didn't spend the last hour trying to debug this, only to find out I was using
[email protected]instead ofhttps://github.com, but I did.So, when using
[email protected]in a Docker container, of course SSH keys are not setup, sogit clonefails, so the directory in/tmpdoes not exist, and thensame_rmtreefails.Final word: make sure to use an HTTPS URL instead of a git one, or remember to setup your SSH client if the git url is necessary (private repo, etc.).