pip-tools
pip-tools copied to clipboard
CI fails on Windows against pip main branch
It fails on install pip from git pip install -e git+https://github.com/pypa/pip.git@main#egg=pip
:
2022-08-20T00:23:46.5591707Z ERROR: Exception:
2022-08-20T00:23:46.5592085Z Traceback (most recent call last):
2022-08-20T00:23:46.5602182Z File "D:\a\pip-tools\pip-tools\.tox\pipmain\lib\site-packages\pip\_internal\cli\base_command.py", line 167, in exc_logging_wrapper
2022-08-20T00:23:46.5603563Z status = run_func(*args)
2022-08-20T00:23:46.5604779Z File "D:\a\pip-tools\pip-tools\.tox\pipmain\lib\site-packages\pip\_internal\cli\req_command.py", line 247, in wrapper
2022-08-20T00:23:46.5606413Z return func(self, options, args)
2022-08-20T00:23:46.5607264Z File "D:\a\pip-tools\pip-tools\.tox\pipmain\lib\site-packages\pip\_internal\commands\install.py", line 461, in run
2022-08-20T00:23:46.5607827Z installed = install_given_reqs(
2022-08-20T00:23:46.5608584Z File "D:\a\pip-tools\pip-tools\.tox\pipmain\lib\site-packages\pip\_internal\req\__init__.py", line 73, in install_given_reqs
2022-08-20T00:23:46.5609135Z requirement.install(
2022-08-20T00:23:46.5609866Z File "D:\a\pip-tools\pip-tools\.tox\pipmain\lib\site-packages\pip\_internal\req\req_install.py", line 790, in install
2022-08-20T00:23:46.5610661Z install_wheel(
2022-08-20T00:23:46.5611440Z File "D:\a\pip-tools\pip-tools\.tox\pipmain\lib\site-packages\pip\_internal\operations\install\wheel.py", line 727, in install_wheel
2022-08-20T00:23:46.5611993Z _install_wheel(
2022-08-20T00:23:46.5612745Z File "D:\a\pip-tools\pip-tools\.tox\pipmain\lib\site-packages\pip\_internal\operations\install\wheel.py", line 644, in _install_wheel
2022-08-20T00:23:46.5613393Z generated_console_scripts = maker.make_multiple(scripts_to_generate)
2022-08-20T00:23:46.5614202Z File "D:\a\pip-tools\pip-tools\.tox\pipmain\lib\site-packages\pip\_vendor\distlib\scripts.py", line 436, in make_multiple
2022-08-20T00:23:46.5616623Z filenames.extend(self.make(specification, options))
2022-08-20T00:23:46.5617607Z File "D:\a\pip-tools\pip-tools\.tox\pipmain\lib\site-packages\pip\_internal\operations\install\wheel.py", line 425, in make
2022-08-20T00:23:46.5618204Z return super().make(specification, options)
2022-08-20T00:23:46.5618970Z File "D:\a\pip-tools\pip-tools\.tox\pipmain\lib\site-packages\pip\_vendor\distlib\scripts.py", line 425, in make
2022-08-20T00:23:46.5619562Z self._make_script(entry, filenames, options=options)
2022-08-20T00:23:46.5620328Z File "D:\a\pip-tools\pip-tools\.tox\pipmain\lib\site-packages\pip\_vendor\distlib\scripts.py", line 325, in _make_script
2022-08-20T00:23:46.5620950Z self._write_script(scriptnames, shebang, script, filenames, ext)
2022-08-20T00:23:46.5621749Z File "D:\a\pip-tools\pip-tools\.tox\pipmain\lib\site-packages\pip\_vendor\distlib\scripts.py", line 249, in _write_script
2022-08-20T00:23:46.5622388Z launcher = self._get_launcher('t')
2022-08-20T00:23:46.5623141Z File "D:\a\pip-tools\pip-tools\.tox\pipmain\lib\site-packages\pip\_vendor\distlib\scripts.py", line 404, in _get_launcher
2022-08-20T00:23:46.5623683Z raise ValueError(msg)
2022-08-20T00:23:46.5624134Z ValueError: Unable to find resource t64.exe in package pip._vendor.distlib
2022-08-20T00:23:46.5624468Z
2022-08-20T00:23:46.5625336Z =================================== log end ===================================
2022-08-20T00:23:46.5626536Z [31mERROR: could not install deps [-egit+https://github.com/pypa/pip.git@main#egg=pip]; v = InvocationError("'D:\\a\\pip-tools\\pip-tools\\.tox\\pipmain\\Scripts\\python.EXE' -m pip install --pre '-egit+https://github.com/pypa/pip.git@main#egg=pip'", 2)
2022-08-20T00:23:46.5627456Z [0m[31mERROR: invocation failed (exit code 1)
Links for additional context:
- https://github.com/jazzband/pip-tools/runs/7927818254?check_suite_focus=true#step:7:81
- https://github.com/pypa/pip/issues/11349
I think removing the pip first and installing it by tox is better. In some places, this solution said for windows. I would like to know your opinion @atugushev.
${{ runner.os }}-
- name: Install tox
run: pip install tox
+ - name: Uninstall pip
+ if: ${{ matrix.os }} == Windows
+ run: python -m pip uninstall pip
+ # see https://github.com/jazzband/pip-tools/issues/1671
- name: Prepare test environment
run: tox --notest -p auto --parallel-live
- name: Test pip ${{ matrix.pip-version }}
- https://github.com/pypa/pip/issues/8450#issuecomment-671451859
- https://www.programmersought.com/article/74769597727/
@mmdbalkhi thanks for the links. Let's try the solution. Would you like to open a PR?
I was testing in my repository (it was mistakenly pushed to PR), I think the problem cannot be solved from the ci side but must be done through tox. @atugushev
@atugushev Is this still true, I do not see any failure on CI.
Yeah, it's true https://github.com/jazzband/pip-tools/actions/runs/3201422174
I'm seeing: CI / Windows / pypy-3.7 / latest (pull_request) Failing after 4m
https://github.com/jazzband/pip-tools/actions/runs/3204754154/jobs/5236433127#step:6:55
see also https://github.com/jazzband/pip-tools/issues/1697