Skip to content

Commit

Permalink
Merge pull request #5019 from radarhere/python_pip
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Oct 30, 2020
2 parents 4f846ca + 0823b37 commit cfe805c
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 38 deletions.
9 changes: 4 additions & 5 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ init:

environment:
EXECUTABLE: python.exe
PIP_DIR: Scripts
TEST_OPTIONS:
DEPLOY: YES
matrix:
Expand All @@ -33,7 +32,7 @@ install:
c:\pillow\winbuild\build\build_dep_all.cmd
$host.SetShouldExit(0)
- 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:
- ps: |
Expand All @@ -44,13 +43,13 @@ build_script:

test_script:
- 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%
- '%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?

after_test:
- pip install codecov
- python -m pip install codecov
- codecov --file coverage.xml --name %PYTHON% --flags AppVeyor

matrix:
Expand All @@ -67,7 +66,7 @@ artifacts:

before_deploy:
- cd c:\pillow
- '%PYTHON%\%PIP_DIR%\pip.exe install wheel'
- '%PYTHON%\%EXECUTABLE% -m pip install wheel'
- cd c:\pillow\winbuild\
- c:\pillow\winbuild\build\build_pillow.cmd bdist_wheel
- cd c:\pillow
Expand Down
28 changes: 14 additions & 14 deletions .ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

pip install --upgrade pip
PYTHONOPTIMIZE=0 pip install cffi
pip install coverage
pip install olefile
pip install -U pytest
pip install -U pytest-cov
pip install pyroma
pip install test-image-results
pip install numpy
python3 -m pip install --upgrade pip
PYTHONOPTIMIZE=0 python3 -m pip install cffi
python3 -m pip install coverage
python3 -m pip install olefile
python3 -m pip install -U pytest
python3 -m pip install -U pytest-cov
python3 -m pip install pyroma
python3 -m pip install test-image-results
python3 -m pip install numpy

# 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.9" ]; then 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 [ "$GHA_PYTHON_VERSION" == "3.8" ]; then python3 -m 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 python3 -m pip install -U "setuptools>=49.3.2" ; fi

if [[ $TRAVIS_PYTHON_VERSION == 3.* ]]; then
# arm64, ppc64le, s390x CPUs:
# "ERROR: Could not find a version that satisfies the requirement pyqt5"
if [[ $TRAVIS_CPU_ARCH == "amd64" ]]; then
sudo apt-get -qq install libxcb-xinerama0 pyqt5-dev-tools
pip install pyqt5
python3 -m pip install pyqt5
fi
fi

# 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
pushd depends && ./install_webp.sh && popd
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/macos-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ set -e

brew install libtiff libjpeg openjpeg libimagequant webp little-cms2 freetype openblas

PYTHONOPTIMIZE=0 pip install cffi
pip install coverage
pip install olefile
pip install -U pytest
pip install -U pytest-cov
pip install pyroma
pip install test-image-results
PYTHONOPTIMIZE=0 python3 -m pip install cffi
python3 -m pip install coverage
python3 -m pip install olefile
python3 -m pip install -U pytest
python3 -m pip install -U pytest-cov
python3 -m pip install pyroma
python3 -m pip install test-image-results

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+:
if [ "$GHA_PYTHON_VERSION" == "3.8" ]; then 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.8" ]; then python3 -m 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
pushd depends && ./install_extra_test_images.sh && popd
2 changes: 1 addition & 1 deletion .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Print build system information
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

# TODO Remove when 3.8 / 3.9 includes setuptools 49.3.2+:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
echo "::set-output name=dir::$(python3 -m pip cache dir)"
- name: pip cache
uses: actions/cache@v2
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
- name: Docs
if: startsWith(matrix.os, 'ubuntu') && matrix.python-version == 3.8
run: |
pip install sphinx-removed-in sphinx-rtd-theme
python3 -m pip install sphinx-removed-in sphinx-rtd-theme
make doccheck
- name: After success
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ matrix:
install:
- |
if [ "$LINT" == "true" ]; then
pip install tox
python3 -m pip install tox
else
.ci/install.sh;
fi
Expand Down
2 changes: 1 addition & 1 deletion depends/diffcover-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ git fetch origin master:refs/remotes/origin/master

# CFLAGS=-O0 means build with no optimisation.
# 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
2 changes: 1 addition & 1 deletion docs/releasenotes/6.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
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.
``pip install olefile``).
``python3 -m pip install olefile``).

Removed deprecated ImageOps functions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Tox (https://tox.readthedocs.io/en/latest/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
# test suite on all supported python versions. To use it,
# "python3 -m pip install tox" and then run "tox" from this directory.

[tox]
envlist =
Expand Down
2 changes: 1 addition & 1 deletion winbuild/build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Pillow for the selected version of Python.
instead of installing Pillow.

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
--------------
Expand Down

0 comments on commit cfe805c

Please sign in to comment.