Invoke pip using Python

This commit is contained in:
Andrew Murray 2020-10-29 22:41:29 +11:00
parent a348a97282
commit 6a50e1076a
10 changed files with 37 additions and 37 deletions

View File

@ -33,7 +33,7 @@ install:
c:\pillow\winbuild\build\build_dep_all.cmd c:\pillow\winbuild\build\build_dep_all.cmd
$host.SetShouldExit(0) $host.SetShouldExit(0)
- path C:\pillow\winbuild\build\bin;%PATH% - path C:\pillow\winbuild\build\bin;%PATH%
- '%PYTHON%\%PIP_DIR%\pip.exe install -U "setuptools>=49.3.2"' - '%PYTHON%\%EXECUTABLE% -m pip install -U "setuptools>=49.3.2"'
build_script: build_script:
- ps: | - ps: |
@ -44,13 +44,13 @@ build_script:
test_script: test_script:
- cd c:\pillow - cd c:\pillow
- '%PYTHON%\%PIP_DIR%\pip.exe install pytest pytest-cov' - '%PYTHON%\%EXECUTABLE% -m pip install pytest pytest-cov'
- c:\"Program Files (x86)"\"Windows Kits"\10\Debuggers\x86\gflags.exe /p /enable %PYTHON%\%EXECUTABLE% - c:\"Program Files (x86)"\"Windows Kits"\10\Debuggers\x86\gflags.exe /p /enable %PYTHON%\%EXECUTABLE%
- '%PYTHON%\%EXECUTABLE% -m pytest -vx --cov PIL --cov Tests --cov-report term --cov-report xml Tests' - '%PYTHON%\%EXECUTABLE% -m pytest -vx --cov PIL --cov Tests --cov-report term --cov-report xml Tests'
#- '%PYTHON%\%EXECUTABLE% test-installed.py -v -s %TEST_OPTIONS%' TODO TEST_OPTIONS with pytest? #- '%PYTHON%\%EXECUTABLE% test-installed.py -v -s %TEST_OPTIONS%' TODO TEST_OPTIONS with pytest?
after_test: after_test:
- pip install codecov - python -m pip install codecov
- codecov --file coverage.xml --name %PYTHON% --flags AppVeyor - codecov --file coverage.xml --name %PYTHON% --flags AppVeyor
matrix: matrix:
@ -67,7 +67,7 @@ artifacts:
before_deploy: before_deploy:
- cd c:\pillow - cd c:\pillow
- '%PYTHON%\%PIP_DIR%\pip.exe install wheel' - '%PYTHON%\%EXECUTABLE% -m pip install wheel'
- cd c:\pillow\winbuild\ - cd c:\pillow\winbuild\
- c:\pillow\winbuild\build\build_pillow.cmd bdist_wheel - c:\pillow\winbuild\build\build_pillow.cmd bdist_wheel
- cd c:\pillow - cd c:\pillow

View File

@ -23,32 +23,32 @@ sudo apt-get -qq install libfreetype6-dev liblcms2-dev python3-tk\
if [[ $TRAVIS_CPU_ARCH == "s390x" ]]; then sudo chown $USER ~/.cache/pip/wheels ; fi if [[ $TRAVIS_CPU_ARCH == "s390x" ]]; then sudo chown $USER ~/.cache/pip/wheels ; fi
pip install --upgrade pip python3 -m pip install --upgrade pip
PYTHONOPTIMIZE=0 pip install cffi PYTHONOPTIMIZE=0 python3 -m pip install cffi
pip install coverage python3 -m pip install coverage
pip install olefile python3 -m pip install olefile
pip install -U pytest python3 -m pip install -U pytest
pip install -U pytest-cov python3 -m pip install -U pytest-cov
pip install pyroma python3 -m pip install pyroma
pip install test-image-results python3 -m pip install test-image-results
pip install numpy python3 -m pip install numpy
# TODO Remove when 3.8 / 3.9 / PyPy3 includes setuptools 49.3.2+: # TODO Remove when 3.8 / 3.9 / PyPy3 includes setuptools 49.3.2+:
if [ "$GHA_PYTHON_VERSION" == "3.8" ]; then pip install -U "setuptools>=49.3.2" ; fi if [ "$GHA_PYTHON_VERSION" == "3.8" ]; then python3 -m pip install -U "setuptools>=49.3.2" ; fi
if [ "$GHA_PYTHON_VERSION" == "3.9" ]; then pip install -U "setuptools>=49.3.2" ; fi if [ "$GHA_PYTHON_VERSION" == "3.9" ]; then python3 -m pip install -U "setuptools>=49.3.2" ; fi
if [ "$TRAVIS_PYTHON_VERSION" == "pypy3.6-7.3.1" ]; then pip install -U "setuptools>=49.3.2" ; fi if [ "$TRAVIS_PYTHON_VERSION" == "pypy3.6-7.3.1" ]; then python3 -m pip install -U "setuptools>=49.3.2" ; fi
if [[ $TRAVIS_PYTHON_VERSION == 3.* ]]; then if [[ $TRAVIS_PYTHON_VERSION == 3.* ]]; then
# arm64, ppc64le, s390x CPUs: # arm64, ppc64le, s390x CPUs:
# "ERROR: Could not find a version that satisfies the requirement pyqt5" # "ERROR: Could not find a version that satisfies the requirement pyqt5"
if [[ $TRAVIS_CPU_ARCH == "amd64" ]]; then if [[ $TRAVIS_CPU_ARCH == "amd64" ]]; then
sudo apt-get -qq install libxcb-xinerama0 pyqt5-dev-tools sudo apt-get -qq install libxcb-xinerama0 pyqt5-dev-tools
pip install pyqt5 python3 -m pip install pyqt5
fi fi
fi fi
# docs only on Python 3.8 # docs only on Python 3.8
if [ "$TRAVIS_PYTHON_VERSION" == "3.8" ]; then pip install -r requirements.txt ; fi if [ "$TRAVIS_PYTHON_VERSION" == "3.8" ]; then python3 -m pip install -r requirements.txt ; fi
# webp # webp
pushd depends && ./install_webp.sh && popd pushd depends && ./install_webp.sh && popd

View File

@ -4,20 +4,20 @@ set -e
brew install libtiff libjpeg openjpeg libimagequant webp little-cms2 freetype openblas brew install libtiff libjpeg openjpeg libimagequant webp little-cms2 freetype openblas
PYTHONOPTIMIZE=0 pip install cffi PYTHONOPTIMIZE=0 python3 -m pip install cffi
pip install coverage python3 -m pip install coverage
pip install olefile python3 -m pip install olefile
pip install -U pytest python3 -m pip install -U pytest
pip install -U pytest-cov python3 -m pip install -U pytest-cov
pip install pyroma python3 -m pip install pyroma
pip install test-image-results python3 -m pip install test-image-results
echo -e "[openblas]\nlibraries = openblas\nlibrary_dirs = /usr/local/opt/openblas/lib" >> ~/.numpy-site.cfg echo -e "[openblas]\nlibraries = openblas\nlibrary_dirs = /usr/local/opt/openblas/lib" >> ~/.numpy-site.cfg
pip install numpy python3 -m pip install numpy
# TODO Remove when 3.8 / 3.9 includes setuptools 49.3.2+: # TODO Remove when 3.8 / 3.9 includes setuptools 49.3.2+:
if [ "$GHA_PYTHON_VERSION" == "3.8" ]; then pip install -U "setuptools>=49.3.2" ; fi if [ "$GHA_PYTHON_VERSION" == "3.8" ]; then python3 -m pip install -U "setuptools>=49.3.2" ; fi
if [ "$GHA_PYTHON_VERSION" == "3.9" ]; then pip install -U "setuptools>=49.3.2" ; fi if [ "$GHA_PYTHON_VERSION" == "3.9" ]; then python3 -m pip install -U "setuptools>=49.3.2" ; fi
# extra test images # extra test images
pushd depends && ./install_extra_test_images.sh && popd pushd depends && ./install_extra_test_images.sh && popd

View File

@ -55,7 +55,7 @@ jobs:
- name: Print build system information - name: Print build system information
run: python .github/workflows/system-info.py run: python .github/workflows/system-info.py
- name: pip install wheel pytest pytest-cov - name: python -m pip install wheel pytest pytest-cov
run: python -m pip install wheel pytest pytest-cov run: python -m pip install wheel pytest pytest-cov
# TODO Remove when 3.8 / 3.9 includes setuptools 49.3.2+: # TODO Remove when 3.8 / 3.9 includes setuptools 49.3.2+:

View File

@ -44,7 +44,7 @@ jobs:
- name: Get pip cache dir - name: Get pip cache dir
id: pip-cache id: pip-cache
run: | run: |
echo "::set-output name=dir::$(pip cache dir)" echo "::set-output name=dir::$(python3 -m pip cache dir)"
- name: pip cache - name: pip cache
uses: actions/cache@v2 uses: actions/cache@v2
@ -96,7 +96,7 @@ jobs:
- name: Docs - name: Docs
if: startsWith(matrix.os, 'ubuntu') && matrix.python-version == 3.8 if: startsWith(matrix.os, 'ubuntu') && matrix.python-version == 3.8
run: | run: |
pip install sphinx-removed-in sphinx-rtd-theme python3 -m pip install sphinx-removed-in sphinx-rtd-theme
make doccheck make doccheck
- name: After success - name: After success

View File

@ -46,7 +46,7 @@ matrix:
install: install:
- | - |
if [ "$LINT" == "true" ]; then if [ "$LINT" == "true" ]; then
pip install tox python3 -m pip install tox
else else
.ci/install.sh; .ci/install.sh;
fi fi

View File

@ -5,4 +5,4 @@ git fetch origin master:refs/remotes/origin/master
# CFLAGS=-O0 means build with no optimisation. # CFLAGS=-O0 means build with no optimisation.
# Makes build much quicker for lxml and other dependencies. # Makes build much quicker for lxml and other dependencies.
time CFLAGS=-O0 pip install diff_cover time CFLAGS=-O0 python3 -m pip install diff_cover

View File

@ -17,7 +17,7 @@ Removed deprecated PIL.OleFileIO
PIL.OleFileIO was removed as a vendored file and in Pillow 4.0.0 (2017-01) in favour of PIL.OleFileIO was removed as a vendored file and in Pillow 4.0.0 (2017-01) in favour of
the upstream olefile Python package, and replaced with an ``ImportError``. The the upstream olefile Python package, and replaced with an ``ImportError``. The
deprecated file has now been removed from Pillow. If needed, install from PyPI (eg. deprecated file has now been removed from Pillow. If needed, install from PyPI (eg.
``pip install olefile``). ``python3 -m pip install olefile``).
Removed deprecated ImageOps functions Removed deprecated ImageOps functions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -1,7 +1,7 @@
# Tox (https://tox.readthedocs.io/en/latest/) is a tool for running tests # Tox (https://tox.readthedocs.io/en/latest/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the # in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox" # test suite on all supported python versions. To use it,
# and then run "tox" from this directory. # "python3 -m pip install tox" and then run "tox" from this directory.
[tox] [tox]
envlist = envlist =

View File

@ -82,7 +82,7 @@ Pillow for the selected version of Python.
instead of installing Pillow. instead of installing Pillow.
You can also use ``winbuild\build\build_pillow.cmd --inplace develop`` to build You can also use ``winbuild\build\build_pillow.cmd --inplace develop`` to build
and install Pillow in develop mode (instead of ``pip install --editable``). and install Pillow in develop mode (instead of ``python3 -m pip install --editable``).
Testing Pillow Testing Pillow
-------------- --------------