mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-01 08:27:30 +03:00 
			
		
		
		
	Invoke pip using Python
This commit is contained in:
		
							parent
							
								
									a348a97282
								
							
						
					
					
						commit
						6a50e1076a
					
				|  | @ -33,7 +33,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: | | ||||
|  | @ -44,13 +44,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: | ||||
|  | @ -67,7 +67,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 | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
							
								
								
									
										20
									
								
								.github/workflows/macos-install.sh
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								.github/workflows/macos-install.sh
									
									
									
									
										vendored
									
									
								
							|  | @ -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
									
								
								.github/workflows/test-windows.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/test-windows.yml
									
									
									
									
										vendored
									
									
								
							|  | @ -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+: | ||||
|  |  | |||
							
								
								
									
										4
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							|  | @ -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 | ||||
|  | @ -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 | ||||
|  |  | |||
|  | @ -46,7 +46,7 @@ matrix: | |||
| install: | ||||
|   - | | ||||
|     if [ "$LINT" == "true" ]; then | ||||
|       pip install tox | ||||
|       python3 -m pip install tox | ||||
|     else | ||||
|       .ci/install.sh; | ||||
|     fi | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
|  | @ -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 | ||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||||
|  |  | |||
							
								
								
									
										4
									
								
								tox.ini
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								tox.ini
									
									
									
									
									
								
							|  | @ -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 = | ||||
|  |  | |||
|  | @ -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 | ||||
| -------------- | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user