Skip to content

Commit

Permalink
Ensure appveyor uses the latest pip version
Browse files Browse the repository at this point in the history
This commit solves an issue where pip ignores the version requirement
for importlib-metadata when installing twine [1]. Which in turn caused
our deploy-pipeline on Appveyor to fail.

Essentially whats going on is that pip finds an already installed,
older version (v3.4.0) of importlib-metadata when installing twine. The
dependency resolver in pip, prior to version 20.3, ignores twine's
minmum-requirement for importlib-metadata (v3.6.0) and keeps the old
version, as can be seen from the logs of the failing build:

        $ IF DEFINED PYTHON pip install --upgrade twine wheel
        ...
        Requirement already satisfied, skipping upgrade:
        importlib-metadata; python_version < "3.8" in
        c:\python36\lib\site-packages (from twine) (3.4.0)
        ...

This to-old importlib-metadata version causes twine to fail when we
later try to upload the wheels to pypi. In version 20.3 pip changed the
behavior of its dependency resolver, which no longer ignores the twine
requirements and will in fact upgrade the importlib-metadata version when
installing twine.

[1] pypa/twine#729
  • Loading branch information
ErlendHaa committed Mar 10, 2021
1 parent 7083c98 commit 78652a9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ matrix:
install:
- IF DEFINED PYTHON (IF "%platform%" == "x64" SET PYTHON=%PYTHON%-x64)
- IF DEFINED PYTHON SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
- IF DEFINED PYTHON pip install --upgrade pip --user
- IF DEFINED PYTHON pip install --upgrade
twine
wheel
Expand Down

0 comments on commit 78652a9

Please sign in to comment.