From e30433e4b2822c9d19078bd5676a2853c73f5aba Mon Sep 17 00:00:00 2001 From: hugovk Date: Thu, 26 Oct 2017 08:20:16 +0300 Subject: [PATCH 01/23] Test testing with pytest --- .travis/install.sh | 4 +++- .travis/script.sh | 3 ++- Tests/helper.py | 9 +++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.travis/install.sh b/.travis/install.sh index 64ce477f7..f1e36bb9c 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -8,7 +8,9 @@ sudo apt-get -qq install libfreetype6-dev liblcms2-dev python-tk\ libharfbuzz-dev libfribidi-dev pip install cffi -pip install nose +pip install nose # TODO remove +pip install pytest +pip install pytest-cov pip install check-manifest pip install olefile pip install pyroma diff --git a/.travis/script.sh b/.travis/script.sh index e1d522122..21a70ec7b 100755 --- a/.travis/script.sh +++ b/.travis/script.sh @@ -7,7 +7,8 @@ python setup.py clean CFLAGS="-coverage" python setup.py build_ext --inplace coverage run --append --include=PIL/* selftest.py -coverage run --append --include=PIL/* -m nose -vx Tests/test_*.py +# coverage run --append --include=PIL/* -m nose -vx Tests/test_*.py TODO remove +py.test -v --cov PIL --cov-report term Tests pushd /tmp/check-manifest && check-manifest --ignore ".coveragerc,.editorconfig,*.yml,*.yaml,tox.ini" && popd # Docs diff --git a/Tests/helper.py b/Tests/helper.py index b8b44b6f2..66f8e9d9d 100644 --- a/Tests/helper.py +++ b/Tests/helper.py @@ -64,8 +64,9 @@ class PillowTestCase(unittest.TestCase): try: ok = self.currentResult.wasSuccessful() except AttributeError: # for nosetests - proxy = self.currentResult - ok = (len(proxy.errors) + len(proxy.failures) == 0) + # proxy = self.currentResult + # ok = (len(proxy.errors) + len(proxy.failures) == 0) + ok = True # TODO pytest if ok: # only clean out tempfiles if test passed @@ -256,8 +257,8 @@ class PillowLeakTestCase(PillowTestCase): # linux # man 2 getrusage # ru_maxrss (since Linux 2.6.32) - # This is the maximum resident set size used (in kilobytes). - return mem # Kb + # This is the maximum resident set size used (in kilobytes). + return mem # Kb def _test_leak(self, core): start_mem = self._get_mem_usage() From ecf37e59f874ed3e3a43757ac0d3c32babf7c23e Mon Sep 17 00:00:00 2001 From: hugovk Date: Thu, 26 Oct 2017 08:46:19 +0300 Subject: [PATCH 02/23] --cov-append --- .travis/script.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis/script.sh b/.travis/script.sh index 21a70ec7b..74c48ea18 100755 --- a/.travis/script.sh +++ b/.travis/script.sh @@ -6,9 +6,9 @@ coverage erase python setup.py clean CFLAGS="-coverage" python setup.py build_ext --inplace -coverage run --append --include=PIL/* selftest.py -# coverage run --append --include=PIL/* -m nose -vx Tests/test_*.py TODO remove -py.test -v --cov PIL --cov-report term Tests +coverage run --append --include="PIL/*" selftest.py +# coverage run --append --include="PIL/*" -m nose -vx Tests/test_*.py TODO remove +py.test -v --cov PIL --cov-append --cov-report term Tests pushd /tmp/check-manifest && check-manifest --ignore ".coveragerc,.editorconfig,*.yml,*.yaml,tox.ini" && popd # Docs From cdab7f20390fee6eaaca2d097e4607e31dc0ec41 Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 26 Oct 2017 16:55:13 +0300 Subject: [PATCH 03/23] Run pytest as module --- .travis/install.sh | 7 +++---- .travis/script.sh | 3 +-- requirements.txt | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.travis/install.sh b/.travis/install.sh index f1e36bb9c..f546d3d43 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -7,14 +7,13 @@ sudo apt-get -qq install libfreetype6-dev liblcms2-dev python-tk\ python-qt4 ghostscript libffi-dev libjpeg-turbo-progs cmake imagemagick\ libharfbuzz-dev libfribidi-dev +pip install check-manifest pip install cffi -pip install nose # TODO remove +pip install coverage +pip install olefile pip install pytest pip install pytest-cov -pip install check-manifest -pip install olefile pip install pyroma -pip install coverage pip install test-image-results # docs only on Python 2.7 diff --git a/.travis/script.sh b/.travis/script.sh index 74c48ea18..a47307ca5 100755 --- a/.travis/script.sh +++ b/.travis/script.sh @@ -7,8 +7,7 @@ python setup.py clean CFLAGS="-coverage" python setup.py build_ext --inplace coverage run --append --include="PIL/*" selftest.py -# coverage run --append --include="PIL/*" -m nose -vx Tests/test_*.py TODO remove -py.test -v --cov PIL --cov-append --cov-report term Tests +python -m pytest -vx --cov PIL --cov-append --cov-report term Tests pushd /tmp/check-manifest && check-manifest --ignore ".coveragerc,.editorconfig,*.yml,*.yaml,tox.ini" && popd # Docs diff --git a/requirements.txt b/requirements.txt index 213f145ab..4cb3c0907 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,10 +11,10 @@ docutils jarn.viewdoc Jinja2 MarkupSafe -nose -nose-cov olefile pycodestyle +pytest +pytest-cov pyflakes Pygments pyroma From db760c1284dcc5ee1c121c84ed71b2dc67ff440d Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 26 Oct 2017 18:07:34 +0300 Subject: [PATCH 04/23] Use pytest instead of nose --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d27afaa0b..7310dd1d1 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ co: coverage: coverage erase coverage run --parallel-mode --include=PIL/* selftest.py - nosetests --with-cov --cov='PIL/' --cov-report=html Tests/test_*.py + python -m pytest --cov PIL --cov-append --cov-report html Tests # Doesn't combine properly before report, writing report instead of displaying invalid report. rm -r htmlcov || true coverage combine @@ -81,7 +81,7 @@ release-test: $(MAKE) install-req python setup.py develop python selftest.py - nosetests Tests/test_*.py + python -m pytest Tests python setup.py install python test-installed.py check-manifest From 3515ae3d9e71583ff9cb150f82e2611428341bdb Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 29 Oct 2017 15:11:00 +0200 Subject: [PATCH 05/23] Test with coverage on Windows, update 'setup.py test' --- .gitignore | 9 +++++++++ .travis/install.sh | 6 +++--- .travis/script.sh | 4 ++-- Makefile | 7 ++----- appveyor.yml | 9 +++++++-- setup.cfg | 4 ++++ setup.py | 6 +++++- winbuild/appveyor_install_msys2_deps.sh | 4 ++-- winbuild/build.py | 4 ++-- 9 files changed, 36 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index aa45f946f..242f50845 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ __pycache__/ *.so # Distribution / packaging +.eggs/ .Python env/ bin/ @@ -69,3 +70,11 @@ docs/_build/ #OS .DS_Store +# JetBrains +.idea + +# Extra test images installed from pillow-depends/test_images +Tests/images/README.md +Tests/images/msp +Tests/images/picins +Tests/images/sunraster diff --git a/.travis/install.sh b/.travis/install.sh index f546d3d43..cad0e3c32 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -7,12 +7,12 @@ sudo apt-get -qq install libfreetype6-dev liblcms2-dev python-tk\ python-qt4 ghostscript libffi-dev libjpeg-turbo-progs cmake imagemagick\ libharfbuzz-dev libfribidi-dev -pip install check-manifest pip install cffi +pip install check-manifest pip install coverage pip install olefile -pip install pytest -pip install pytest-cov +pip install -U pytest +pip install -U pytest-cov pip install pyroma pip install test-image-results diff --git a/.travis/script.sh b/.travis/script.sh index a47307ca5..1473ab079 100755 --- a/.travis/script.sh +++ b/.travis/script.sh @@ -6,8 +6,8 @@ coverage erase python setup.py clean CFLAGS="-coverage" python setup.py build_ext --inplace -coverage run --append --include="PIL/*" selftest.py -python -m pytest -vx --cov PIL --cov-append --cov-report term Tests +python selftest.py +python setup.py test pushd /tmp/check-manifest && check-manifest --ignore ".coveragerc,.editorconfig,*.yml,*.yaml,tox.ini" && popd # Docs diff --git a/Makefile b/Makefile index 7310dd1d1..8e60024ae 100644 --- a/Makefile +++ b/Makefile @@ -15,12 +15,9 @@ co: done coverage: - coverage erase - coverage run --parallel-mode --include=PIL/* selftest.py - python -m pytest --cov PIL --cov-append --cov-report html Tests -# Doesn't combine properly before report, writing report instead of displaying invalid report. + python selftest.py + python setup.py test rm -r htmlcov || true - coverage combine coverage report doc: diff --git a/appveyor.yml b/appveyor.yml index d966c88ff..a34d4690a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -74,8 +74,13 @@ build_script: test_script: - cd c:\pillow -- '%PYTHON%\%PIP_DIR%\pip.exe install nose' -- '%PYTHON%\%EXECUTABLE% test-installed.py -v -s %TEST_OPTIONS%' +- '%PYTHON%\%PIP_DIR%\pip.exe install pytest pytest-cov' +- '%PYTHON%\%EXECUTABLE% -m pytest -vx --cov PIL --cov-append --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 +- codecov --file coverage.xml --name %PYTHON% matrix: fast_finish: true diff --git a/setup.cfg b/setup.cfg index 0c9e0fc14..fb2d177d6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,6 @@ +[aliases] +test=pytest [metadata] license_file = LICENSE +[tool:pytest] +addopts = -vx --cov PIL --cov-append --cov-report term Tests diff --git a/setup.py b/setup.py index 9319b7372..61eba2313 100755 --- a/setup.py +++ b/setup.py @@ -751,6 +751,9 @@ def debug_build(): return hasattr(sys, 'gettotalrefcount') +needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv) +pytest_runner = ['pytest-runner'] if needs_pytest else [] + try: setup(name=NAME, version=PILLOW_VERSION, @@ -782,7 +785,8 @@ try: ext_modules=[Extension("PIL._imaging", ["_imaging.c"])], include_package_data=True, packages=find_packages(), - test_suite='nose.collector', + setup_requires=pytest_runner, + tests_require=['pytest'], keywords=["Imaging", ], license='Standard PIL License', zip_safe=not (debug_build() or PLATFORM_MINGW), ) diff --git a/winbuild/appveyor_install_msys2_deps.sh b/winbuild/appveyor_install_msys2_deps.sh index 52b814433..b13dc9e98 100644 --- a/winbuild/appveyor_install_msys2_deps.sh +++ b/winbuild/appveyor_install_msys2_deps.sh @@ -7,5 +7,5 @@ pacman -S --noconfirm mingw32/mingw-w64-i686-python3 \ mingw32/mingw-w64-i686-python2-setuptools \ mingw-w64-i686-libjpeg-turbo -/mingw32/bin/pip install nose olefile -/mingw32/bin/pip3 install nose olefile +/mingw32/bin/pip install pytest pytest-cov olefile +/mingw32/bin/pip3 install pytest pytest-cov olefile diff --git a/winbuild/build.py b/winbuild/build.py index 3d6c6e57f..859a40277 100755 --- a/winbuild/build.py +++ b/winbuild/build.py @@ -16,7 +16,7 @@ def setup_vms(): for arch in ('', X64_EXT): ret.append("virtualenv -p c:/Python%s%s/python.exe --clear %s%s%s" % (py, arch, VIRT_BASE, py, arch)) - ret.append(r"%s%s%s\Scripts\pip.exe install nose" % + ret.append(r"%s%s%s\Scripts\pip.exe install pytest pytest-cov" % (VIRT_BASE, py, arch)) return "\n".join(ret) @@ -76,7 +76,7 @@ def build_one(py_ver, compiler): args['executable'] = "python.exe" if 'EXECUTABLE' in os.environ: args['executable'] = "%EXECUTABLE%" - + args['py_ver'] = py_ver if '34' in py_ver: args['tcl_ver'] = '86' From 19bc6f0b9622e876fca56eb1f229b78f9ef5f776 Mon Sep 17 00:00:00 2001 From: hugovk Date: Wed, 1 Nov 2017 22:29:45 +0200 Subject: [PATCH 06/23] No need for --cov-append --- appveyor.yml | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index a34d4690a..94886c8b6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -75,7 +75,7 @@ build_script: test_script: - cd c:\pillow - '%PYTHON%\%PIP_DIR%\pip.exe install pytest pytest-cov' -- '%PYTHON%\%EXECUTABLE% -m pytest -vx --cov PIL --cov-append --cov-report term --cov-report xml Tests' +- '%PYTHON%\%EXECUTABLE% -m pytest -vx --cov PIL --cov-report term --cov-report xml Tests' #- '%PYTHON%\%EXECUTABLE% test-installed.py -v -s %TEST_OPTIONS%' TODO TEST_OPTIONS with pytest? after_test: diff --git a/setup.cfg b/setup.cfg index fb2d177d6..4a1338396 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,4 +3,4 @@ test=pytest [metadata] license_file = LICENSE [tool:pytest] -addopts = -vx --cov PIL --cov-append --cov-report term Tests +addopts = -vx --cov PIL --cov-report term Tests From 20d00c5fe9658ad0c0f307e1ba1a8d076bb89c42 Mon Sep 17 00:00:00 2001 From: hugovk Date: Wed, 1 Nov 2017 23:31:24 +0200 Subject: [PATCH 07/23] Update test instructions --- Tests/README.rst | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Tests/README.rst b/Tests/README.rst index 0985e0f26..f0118c629 100644 --- a/Tests/README.rst +++ b/Tests/README.rst @@ -8,7 +8,7 @@ Dependencies Install:: - pip install coverage nose + pip install pytest pytest-cov Execution --------- @@ -21,12 +21,11 @@ To run an individual test:: Run all the tests from the root of the Pillow source distribution:: - nosetests -vx Tests/test_*.py + pytest -vx Tests Or with coverage:: - coverage run --append --include=PIL/* -m nose -vx Tests/test_*.py - coverage report + pytest -vx --cov PIL --cov-report term Tests coverage html open htmlcov/index.html @@ -39,6 +38,3 @@ To run an individual test:: Run all the tests from the root of the Pillow source distribution:: ./test-installed.py - - - From 6a83675fe7770a59c50b94b327265d37bd5af6ed Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 6 Nov 2017 18:40:23 +0200 Subject: [PATCH 08/23] Update with pytest --- test-installed.py | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/test-installed.py b/test-installed.py index c5aff1360..7269b3494 100755 --- a/test-installed.py +++ b/test-installed.py @@ -1,8 +1,8 @@ #!/usr/bin/env python -import nose import os import sys -import glob + +import pytest # monkey with the path, removing the local directory but adding the Tests/ # directory for helper.py and the other local imports there. @@ -13,23 +13,20 @@ sys.path.insert(0, os.path.abspath('./Tests')) # if there's no test selected (mostly) choose a working default. # Something is required, because if we import the tests from the local # directory, once again, we've got the non-installed PIL in the way -for arg in sys.argv[1:]: - if '.py' in arg: +for i, arg in enumerate(sys.argv[1:]): + print(i, arg) + if arg.startswith('Tests/test_') and arg.endswith('.py'): + print("bingo") + sys.argv.insert(i+1, '-k') break else: - sys.argv.extend(glob.glob('Tests/test*.py')) + sys.argv.append('Tests') -# Make sure that nose doesn't muck with our paths. -if ('--no-path-adjustment' not in sys.argv) and ('-P' not in sys.argv): - sys.argv.insert(1, '--no-path-adjustment') - -if 'NOSE_PROCESSES' not in os.environ: - for arg in sys.argv: - if '--processes' in arg: - break - else: # for - sys.argv.insert(1, '--processes=-1') # -1 == number of cores - sys.argv.insert(1, '--process-timeout=30') +# for arg in sys.argv: +# if '-n' in arg or '--numprocesses' in arg: +# break +# else: # for +# sys.argv.extend(['--numprocesses' ,'auto']) # auto-detect number of CPUs if __name__ == '__main__': - nose.main() + pytest.main() From b609ee5cbd4b13d73726c4553902cacfc4c48dac Mon Sep 17 00:00:00 2001 From: Hugo Date: Tue, 7 Nov 2017 12:35:46 +0200 Subject: [PATCH 09/23] Remove unused/unrunnable profile-installed.py --- profile-installed.py | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100755 profile-installed.py diff --git a/profile-installed.py b/profile-installed.py deleted file mode 100755 index e3a04c21c..000000000 --- a/profile-installed.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python -import os -import sys -import glob - -import profile - -# monkey with the path, removing the local directory but adding the Tests/ -# directory for helper.py and the other local imports there. - -del(sys.path[0]) -sys.path.insert(0, os.path.abspath('./Tests')) - -# if there's no test selected (mostly) choose a working default. -# Something is required, because if we import the tests from the local -# directory, once again, we've got the non-installed PIL in the way -if len(sys.argv) == 1: - sys.argv.extend(glob.glob('Tests/test*.py')) - -# Make sure that nose doesn't muck with our paths. -if ('--no-path-adjustment' not in sys.argv) and ('-P' not in sys.argv): - sys.argv.insert(1, '--no-path-adjustment') - -if __name__ == '__main__': - profile.run("nose.main()", sort=2) From 96df8a8fdacfb68ddb52e53394d462763c92cd2f Mon Sep 17 00:00:00 2001 From: hugovk Date: Wed, 15 Nov 2017 22:22:52 +0200 Subject: [PATCH 10/23] Test with multiprocessing --- test-installed.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test-installed.py b/test-installed.py index 7269b3494..35a3b4ccc 100755 --- a/test-installed.py +++ b/test-installed.py @@ -14,19 +14,18 @@ sys.path.insert(0, os.path.abspath('./Tests')) # Something is required, because if we import the tests from the local # directory, once again, we've got the non-installed PIL in the way for i, arg in enumerate(sys.argv[1:]): - print(i, arg) if arg.startswith('Tests/test_') and arg.endswith('.py'): - print("bingo") sys.argv.insert(i+1, '-k') break else: sys.argv.append('Tests') -# for arg in sys.argv: -# if '-n' in arg or '--numprocesses' in arg: -# break -# else: # for -# sys.argv.extend(['--numprocesses' ,'auto']) # auto-detect number of CPUs +for arg in sys.argv: + if '-n' in arg or '--numprocesses' in arg: + break +else: # for + sys.argv.extend(['--numprocesses', 'auto']) # auto-detect number of CPUs + if __name__ == '__main__': pytest.main() From a3286391c35f5b3a4298b2a54f8c0ad8160af9de Mon Sep 17 00:00:00 2001 From: hugovk Date: Thu, 16 Nov 2017 18:27:07 +0200 Subject: [PATCH 11/23] 'Make test' calls 'pytest -qq' directly --- Makefile | 2 +- test-installed.py | 31 ------------------------------- 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100755 test-installed.py diff --git a/Makefile b/Makefile index 8e60024ae..7d9d34472 100644 --- a/Makefile +++ b/Makefile @@ -89,7 +89,7 @@ sdist: python setup.py sdist --format=gztar test: - python test-installed.py + pytest -qq # https://docs.python.org/2/distutils/packageindex.html#the-pypirc-file upload-test: diff --git a/test-installed.py b/test-installed.py deleted file mode 100755 index 35a3b4ccc..000000000 --- a/test-installed.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python -import os -import sys - -import pytest - -# monkey with the path, removing the local directory but adding the Tests/ -# directory for helper.py and the other local imports there. - -del(sys.path[0]) -sys.path.insert(0, os.path.abspath('./Tests')) - -# if there's no test selected (mostly) choose a working default. -# Something is required, because if we import the tests from the local -# directory, once again, we've got the non-installed PIL in the way -for i, arg in enumerate(sys.argv[1:]): - if arg.startswith('Tests/test_') and arg.endswith('.py'): - sys.argv.insert(i+1, '-k') - break -else: - sys.argv.append('Tests') - -for arg in sys.argv: - if '-n' in arg or '--numprocesses' in arg: - break -else: # for - sys.argv.extend(['--numprocesses', 'auto']) # auto-detect number of CPUs - - -if __name__ == '__main__': - pytest.main() From 559216356476b2de1aa0a82d177b05efbc00d920 Mon Sep 17 00:00:00 2001 From: hugovk Date: Tue, 12 Dec 2017 22:55:11 +0200 Subject: [PATCH 12/23] pytest no longer supports EOL Python 3.3 --- .travis.yml | 1 - Tests/test_image_access.py | 8 ++++---- appveyor.yml | 2 -- docs/installation.rst | 10 ++++++---- mp_compile.py | 11 ++--------- setup.py | 3 +-- winbuild/README.md | 14 +++++++------- winbuild/get_pythons.py | 2 +- 8 files changed, 21 insertions(+), 30 deletions(-) diff --git a/.travis.yml b/.travis.yml index ef7adc63d..d208c4165 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,6 @@ matrix: - python: "2.7_with_system_site_packages" # For PyQt4 - python: '3.5' - python: '3.4' - - python: '3.3' - python: '3.7-dev' - env: DOCKER="alpine" - env: DOCKER="arch" # contains PyQt5 diff --git a/Tests/test_image_access.py b/Tests/test_image_access.py index 9cb27774d..d0fcea1d4 100644 --- a/Tests/test_image_access.py +++ b/Tests/test_image_access.py @@ -251,7 +251,7 @@ class TestCffi(AccessTest): class TestEmbeddable(unittest.TestCase): @unittest.skipIf(not sys.platform.startswith('win32') or - sys.version_info[:2] in ((3, 3), (3, 4)) or + sys.version_info[:2] == (3, 4) or on_appveyor(), # failing on appveyor when run from # subprocess, not from shell "requires Python 2.7 or >=3.5 for Windows") @@ -293,7 +293,7 @@ int main(int argc, char* argv[]) compiler = ccompiler.new_compiler() compiler.add_include_dir(sysconfig.get_python_inc()) - + libdir = sysconfig.get_config_var('LIBDIR') or sysconfig.get_python_inc().replace('include', 'libs') print (libdir) compiler.add_library_dir(libdir) @@ -302,10 +302,10 @@ int main(int argc, char* argv[]) env = os.environ.copy() env["PATH"] = sys.prefix + ';' + env["PATH"] - + # do not display the Windows Error Reporting dialog ctypes.windll.kernel32.SetErrorMode(0x0002) - + process = subprocess.Popen(['embed_pil.exe'], env=env) process.communicate() self.assertEqual(process.returncode, 0) diff --git a/appveyor.yml b/appveyor.yml index 94886c8b6..8e995e601 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,8 +21,6 @@ environment: - PYTHON: C:/Python34 - PYTHON: C:/Python27 - PYTHON: C:/Python34-x64 - - PYTHON: C:/Python33 - - PYTHON: C:/Python33-x64 - PYTHON: C:/msys64/mingw32 EXECUTABLE: bin/python3 PIP_DIR: bin diff --git a/docs/installation.rst b/docs/installation.rst index 2d0ad8764..cfd50bbab 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -17,7 +17,9 @@ Notes .. note:: Pillow >= 2.0.0 < 4.0.0 supports Python versions 2.6, 2.7, 3.2, 3.3, 3.4, 3.5 -.. note:: Pillow >= 4.0.0 supports Python versions 2.7, 3.3, 3.4, 3.5, 3.6 +.. note:: Pillow >= 4.0.0 < 4.4.0 supports Python versions 2.7, 3.3, 3.4, 3.5, 3.6 + +.. note:: Pillow >= 4.4.0 supports Python versions 2.7, 3.4, 3.5, 3.6 Basic Installation ------------------ @@ -382,16 +384,16 @@ These platforms are built and tested for every change. +----------------------------------+-------------------------------+-----------------------+ | Fedora 26 | 2.7 |x86-64 | +----------------------------------+-------------------------------+-----------------------+ -| Mac OS X 10.10 Yosemite* | 2.7, 3.3, 3.4, 3.5, 3.6 |x86-64 | +| Mac OS X 10.10 Yosemite* | 2.7, 3.4, 3.5, 3.6 |x86-64 | +----------------------------------+-------------------------------+-----------------------+ | Ubuntu Linux 16.04 LTS | 2.7 |x86-64 | +----------------------------------+-------------------------------+-----------------------+ -| Ubuntu Linux 14.04 LTS | 2.7, 3.3, 3.4, 3.5, 3.6, |x86-64 | +| Ubuntu Linux 14.04 LTS | 2.7, 3.4, 3.5, 3.6, |x86-64 | | | pypy, pypy3 | | | | | | | | 2.7 |x86 | +----------------------------------+-------------------------------+-----------------------+ -| Windows Server 2012 R2 | 2.7, 3.3, 3.4 |x86, x86-64 | +| Windows Server 2012 R2 | 2.7, 3.4 |x86, x86-64 | | | | | | | pypy, 3.5/mingw |x86 | +----------------------------------+-------------------------------+-----------------------+ diff --git a/mp_compile.py b/mp_compile.py index 59f14a651..5fac2399f 100644 --- a/mp_compile.py +++ b/mp_compile.py @@ -54,19 +54,12 @@ def _mp_compile(self, sources, output_dir=None, macros=None, def install(): - fl_pypy3 = (hasattr(sys, 'pypy_version_info') and - (3, 0) < sys.version_info < (3, 3)) fl_win = sys.platform.startswith('win') fl_cygwin = sys.platform.startswith('cygwin') - if fl_pypy3: - # see https://github.com/travis-ci/travis-ci/issues/3587 - print("Single threaded build for pypy3") - return - if fl_win or fl_cygwin: - # windows barfs on multiprocessing installs - print("Single threaded build for windows") + # Windows barfs on multiprocessing installs + print("Single threaded build for Windows") return if MAX_PROCS != 1: diff --git a/setup.py b/setup.py index 61eba2313..5c36302bd 100755 --- a/setup.py +++ b/setup.py @@ -773,14 +773,13 @@ try: "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ], - python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*", + python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", cmdclass={"build_ext": pil_build_ext}, ext_modules=[Extension("PIL._imaging", ["_imaging.c"])], include_package_data=True, diff --git a/winbuild/README.md b/winbuild/README.md index 89d60de62..5ecbf18c6 100644 --- a/winbuild/README.md +++ b/winbuild/README.md @@ -1,18 +1,18 @@ Quick README ------------- +------------ -For more extensive info, see the windows build instructions `docs/build.rst`. +For more extensive info, see the Windows build instructions `docs/build.rst`. -* See https://github.com/python-pillow/Pillow/issues/553#issuecomment-37877416 and https://github.com/matplotlib/matplotlib/issues/1717#issuecomment-13343859 +* See https://github.com/python-pillow/Pillow/issues/553#issuecomment-37877416 and https://github.com/matplotlib/matplotlib/issues/1717#issuecomment-13343859 * Works best with Python 3.4, due to virtualenv and pip batteries included. Python3+ required for fetch command. * Check config.py for virtual env paths, suffix for 64-bit releases. Defaults to `x64`, set `X64_EXT` to change. * When running in CI with one Python per invocation, set the `PYTHON` env variable to the Python folder. (e.g. `PYTHON`=`c:\Python27\`) This overrides the matrix in config.py and will just build and test for the specific Python. * `python get_pythons.py` downloads all the Python releases, and their signatures. (Manually) Install in `c:\PythonXX[x64]\`. -* `python build_dep.py` downloads and creates a build script for all the dependencies, in 32 and 64 bit versions, and with both compiler versions. +* `python build_dep.py` downloads and creates a build script for all the dependencies, in 32 and 64-bit versions, and with both compiler versions. * (in powershell) `build_deps.cmd` invokes the dependency build. * `python build.py --clean` makes Pillow for the matrix of Pythons. * `python test.py` runs the tests on Pillow in all the virtual envs. -* Currently working with zlib, libjpeg, freetype, and libtiff on Python 2.7, 3.3, and 3.4, both 32 and 64 bit, on a local win7 pro machine and appveyor.com -* Webp is built, not detected. -* LCMS, OpenJpeg and libimagequant are not building. +* Currently working with zlib, libjpeg, freetype, and libtiff on Python 2.7, and 3.4, both 32 and 64-bit, on a local win7 pro machine and appveyor.com +* WebP is built, not detected. +* LCMS, OpenJPEG and libimagequant are not building. diff --git a/winbuild/get_pythons.py b/winbuild/get_pythons.py index 481283df3..448450afb 100644 --- a/winbuild/get_pythons.py +++ b/winbuild/get_pythons.py @@ -2,7 +2,7 @@ from fetch import fetch import os if __name__ == '__main__': - for version in ['2.7.10', '3.3.5', '3.4.3']: + for version in ['2.7.10', '3.4.3']: for platform in ['', '.amd64']: for extension in ['', '.asc']: fetch('https://www.python.org/ftp/python/%s/python-%s%s.msi%s' From 3c8cfa819789b6d575c760e7e788da2725558200 Mon Sep 17 00:00:00 2001 From: Hugo Date: Wed, 13 Dec 2017 14:59:25 +0200 Subject: [PATCH 13/23] Major version bump and release note for dropped Python 3.3 --- CHANGES.rst | 2 +- PIL/version.py | 2 +- docs/installation.rst | 4 ++-- docs/releasenotes/{4.4.0.rst => 5.0.0.rst} | 14 ++++++++++++-- docs/releasenotes/index.rst | 2 +- 5 files changed, 17 insertions(+), 7 deletions(-) rename docs/releasenotes/{4.4.0.rst => 5.0.0.rst} (64%) diff --git a/CHANGES.rst b/CHANGES.rst index a995616e9..c32cbe826 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,7 +2,7 @@ Changelog (Pillow) ================== -4.4.0 (unreleased) +5.0.0 (unreleased) ------------------ - Dynamically link libraqm #2753 diff --git a/PIL/version.py b/PIL/version.py index 0718fd601..b89052c73 100644 --- a/PIL/version.py +++ b/PIL/version.py @@ -1,2 +1,2 @@ # Master version for Pillow -__version__ = '4.4.0.dev0' +__version__ = '5.0.0.dev0' diff --git a/docs/installation.rst b/docs/installation.rst index cfd50bbab..3ed48f413 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -17,9 +17,9 @@ Notes .. note:: Pillow >= 2.0.0 < 4.0.0 supports Python versions 2.6, 2.7, 3.2, 3.3, 3.4, 3.5 -.. note:: Pillow >= 4.0.0 < 4.4.0 supports Python versions 2.7, 3.3, 3.4, 3.5, 3.6 +.. note:: Pillow >= 4.0.0 < 5.0.0 supports Python versions 2.7, 3.3, 3.4, 3.5, 3.6 -.. note:: Pillow >= 4.4.0 supports Python versions 2.7, 3.4, 3.5, 3.6 +.. note:: Pillow >= 5.0.0 supports Python versions 2.7, 3.4, 3.5, 3.6 Basic Installation ------------------ diff --git a/docs/releasenotes/4.4.0.rst b/docs/releasenotes/5.0.0.rst similarity index 64% rename from docs/releasenotes/4.4.0.rst rename to docs/releasenotes/5.0.0.rst index 101a513df..886b673c0 100644 --- a/docs/releasenotes/4.4.0.rst +++ b/docs/releasenotes/5.0.0.rst @@ -1,6 +1,17 @@ -4.4.0 +5.0.0 ----- +Backwards Incompatible Changes +============================== + +Python 3.3 Dropped +^^^^^^^^^^^^^^^^^^ + +Python 3.3 is EOL and no longer supported due to moving testing from nose, +which is deprecated, to pytest, which doesn't support Python 3.3. We will not +be creating binaries, testing, or retaining compatibility with this version. +The final version of Pillow for Python 3.3 is 4.3.0. + API Changes =========== @@ -17,7 +28,6 @@ Further, the vendored version was removed in Pillow 4.0.0 and replaced with a deprecation warning that PIL.OleFileIO would be removed in a future version. This warning has been upgraded to an import error pending future removal. - API Additions ============= diff --git a/docs/releasenotes/index.rst b/docs/releasenotes/index.rst index 27fc61870..0ee853fca 100644 --- a/docs/releasenotes/index.rst +++ b/docs/releasenotes/index.rst @@ -6,7 +6,7 @@ Release Notes .. toctree:: :maxdepth: 2 - 4.4.0 + 5.0.0 4.3.0 4.2.1 4.2.0 From b55ea4014e65c871728f3e284cb895e9a30cd57e Mon Sep 17 00:00:00 2001 From: Hugo Date: Wed, 13 Dec 2017 15:49:21 +0200 Subject: [PATCH 14/23] Calls pytest directly --- Makefile | 2 +- Tests/README.rst | 4 ++-- tox.ini | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 7d9d34472..bdf7ce9b4 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,7 @@ release-test: python selftest.py python -m pytest Tests python setup.py install - python test-installed.py + python -m pytest -qq check-manifest pyroma . viewdoc diff --git a/Tests/README.rst b/Tests/README.rst index f0118c629..68c001fdd 100644 --- a/Tests/README.rst +++ b/Tests/README.rst @@ -33,8 +33,8 @@ Or with coverage:: To run an individual test:: - ./test-installed.py Tests/test_image.py + pytest Tests/test_image.py Run all the tests from the root of the Pillow source distribution:: - ./test-installed.py + pytest diff --git a/tox.ini b/tox.ini index 84ac7135e..0d2e41765 100644 --- a/tox.ini +++ b/tox.ini @@ -11,4 +11,4 @@ commands = {envpython} setup.py clean {envpython} setup.py build_ext --inplace {envpython} selftest.py - {envpython} test-installed.py --installed + {envpython} -m pytest -qq From 7df920303c8995f8b54b7d2ae74aef1e4923d462 Mon Sep 17 00:00:00 2001 From: Hugo Date: Wed, 13 Dec 2017 15:53:15 +0200 Subject: [PATCH 15/23] Remove nose-specific code --- Tests/helper.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Tests/helper.py b/Tests/helper.py index 66f8e9d9d..fdeb00c0c 100644 --- a/Tests/helper.py +++ b/Tests/helper.py @@ -63,10 +63,8 @@ class PillowTestCase(unittest.TestCase): def delete_tempfile(self, path): try: ok = self.currentResult.wasSuccessful() - except AttributeError: # for nosetests - # proxy = self.currentResult - # ok = (len(proxy.errors) + len(proxy.failures) == 0) - ok = True # TODO pytest + except AttributeError: # for pytest + ok = True if ok: # only clean out tempfiles if test passed @@ -211,10 +209,6 @@ class PillowTestCase(unittest.TestCase): if skip: self.skipTest(msg or "Known Bad Test") - def shortDescription(self): - # Prevents `nose -v` printing docstrings - return None - def tempfile(self, template): assert template[:5] in ("temp.", "temp_") fd, path = tempfile.mkstemp(template[4:], template[:4]) From 0bb3f4fee9929f55c970a088026894116b1740fd Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 27 Dec 2017 22:23:17 +0000 Subject: [PATCH 16/23] source layout reorg --- MANIFEST.in | 3 +-- setup.py | 27 ++++++++++--------- {PIL => src/PIL}/BdfFontFile.py | 0 {PIL => src/PIL}/BmpImagePlugin.py | 0 {PIL => src/PIL}/BufrStubImagePlugin.py | 0 {PIL => src/PIL}/ContainerIO.py | 0 {PIL => src/PIL}/CurImagePlugin.py | 0 {PIL => src/PIL}/DcxImagePlugin.py | 0 {PIL => src/PIL}/DdsImagePlugin.py | 0 {PIL => src/PIL}/EpsImagePlugin.py | 0 {PIL => src/PIL}/ExifTags.py | 0 {PIL => src/PIL}/FitsStubImagePlugin.py | 0 {PIL => src/PIL}/FliImagePlugin.py | 0 {PIL => src/PIL}/FontFile.py | 0 {PIL => src/PIL}/FpxImagePlugin.py | 0 {PIL => src/PIL}/FtexImagePlugin.py | 0 {PIL => src/PIL}/GbrImagePlugin.py | 0 {PIL => src/PIL}/GdImageFile.py | 0 {PIL => src/PIL}/GifImagePlugin.py | 0 {PIL => src/PIL}/GimpGradientFile.py | 0 {PIL => src/PIL}/GimpPaletteFile.py | 0 {PIL => src/PIL}/GribStubImagePlugin.py | 0 {PIL => src/PIL}/Hdf5StubImagePlugin.py | 0 {PIL => src/PIL}/IcnsImagePlugin.py | 0 {PIL => src/PIL}/IcoImagePlugin.py | 0 {PIL => src/PIL}/ImImagePlugin.py | 0 {PIL => src/PIL}/Image.py | 0 {PIL => src/PIL}/ImageChops.py | 0 {PIL => src/PIL}/ImageCms.py | 0 {PIL => src/PIL}/ImageColor.py | 0 {PIL => src/PIL}/ImageDraw.py | 0 {PIL => src/PIL}/ImageDraw2.py | 0 {PIL => src/PIL}/ImageEnhance.py | 0 {PIL => src/PIL}/ImageFile.py | 0 {PIL => src/PIL}/ImageFilter.py | 0 {PIL => src/PIL}/ImageFont.py | 0 {PIL => src/PIL}/ImageGrab.py | 0 {PIL => src/PIL}/ImageMath.py | 0 {PIL => src/PIL}/ImageMode.py | 0 {PIL => src/PIL}/ImageMorph.py | 0 {PIL => src/PIL}/ImageOps.py | 0 {PIL => src/PIL}/ImagePalette.py | 0 {PIL => src/PIL}/ImagePath.py | 0 {PIL => src/PIL}/ImageQt.py | 0 {PIL => src/PIL}/ImageSequence.py | 0 {PIL => src/PIL}/ImageShow.py | 0 {PIL => src/PIL}/ImageStat.py | 0 {PIL => src/PIL}/ImageTk.py | 0 {PIL => src/PIL}/ImageTransform.py | 0 {PIL => src/PIL}/ImageWin.py | 0 {PIL => src/PIL}/ImtImagePlugin.py | 0 {PIL => src/PIL}/IptcImagePlugin.py | 0 {PIL => src/PIL}/Jpeg2KImagePlugin.py | 0 {PIL => src/PIL}/JpegImagePlugin.py | 0 {PIL => src/PIL}/JpegPresets.py | 0 {PIL => src/PIL}/McIdasImagePlugin.py | 0 {PIL => src/PIL}/MicImagePlugin.py | 0 {PIL => src/PIL}/MpegImagePlugin.py | 0 {PIL => src/PIL}/MpoImagePlugin.py | 0 {PIL => src/PIL}/MspImagePlugin.py | 0 {PIL => src/PIL}/OleFileIO.py | 0 {PIL => src/PIL}/PSDraw.py | 0 {PIL => src/PIL}/PaletteFile.py | 0 {PIL => src/PIL}/PalmImagePlugin.py | 0 {PIL => src/PIL}/PcdImagePlugin.py | 0 {PIL => src/PIL}/PcfFontFile.py | 0 {PIL => src/PIL}/PcxImagePlugin.py | 0 {PIL => src/PIL}/PdfImagePlugin.py | 0 {PIL => src/PIL}/PixarImagePlugin.py | 0 {PIL => src/PIL}/PngImagePlugin.py | 0 {PIL => src/PIL}/PpmImagePlugin.py | 0 {PIL => src/PIL}/PsdImagePlugin.py | 0 {PIL => src/PIL}/PyAccess.py | 0 {PIL => src/PIL}/SgiImagePlugin.py | 0 {PIL => src/PIL}/SpiderImagePlugin.py | 0 {PIL => src/PIL}/SunImagePlugin.py | 0 {PIL => src/PIL}/TarIO.py | 0 {PIL => src/PIL}/TgaImagePlugin.py | 0 {PIL => src/PIL}/TiffImagePlugin.py | 0 {PIL => src/PIL}/TiffTags.py | 0 {PIL => src/PIL}/WalImageFile.py | 0 {PIL => src/PIL}/WebPImagePlugin.py | 0 {PIL => src/PIL}/WmfImagePlugin.py | 0 {PIL => src/PIL}/XVThumbImagePlugin.py | 0 {PIL => src/PIL}/XbmImagePlugin.py | 0 {PIL => src/PIL}/XpmImagePlugin.py | 0 {PIL => src/PIL}/__init__.py | 0 {PIL => src/PIL}/_binary.py | 0 {PIL => src/PIL}/_tkinter_finder.py | 0 {PIL => src/PIL}/_util.py | 0 {PIL => src/PIL}/features.py | 0 {PIL => src/PIL}/version.py | 0 _imaging.c => src/_imaging.c | 0 _imagingcms.c => src/_imagingcms.c | 0 _imagingft.c => src/_imagingft.c | 0 _imagingmath.c => src/_imagingmath.c | 0 _imagingmorph.c => src/_imagingmorph.c | 0 _imagingtk.c => src/_imagingtk.c | 0 _webp.c => src/_webp.c | 0 decode.c => src/decode.c | 0 display.c => src/display.c | 0 encode.c => src/encode.c | 0 {libImaging => src/libImaging}/Access.c | 0 .../libImaging}/AlphaComposite.c | 0 {libImaging => src/libImaging}/Bands.c | 0 {libImaging => src/libImaging}/BcnDecode.c | 0 {libImaging => src/libImaging}/Bit.h | 0 {libImaging => src/libImaging}/BitDecode.c | 0 {libImaging => src/libImaging}/Blend.c | 0 {libImaging => src/libImaging}/BoxBlur.c | 0 {libImaging => src/libImaging}/Chops.c | 0 {libImaging => src/libImaging}/Convert.c | 0 {libImaging => src/libImaging}/ConvertYCbCr.c | 0 {libImaging => src/libImaging}/Copy.c | 0 {libImaging => src/libImaging}/Crc32.c | 0 {libImaging => src/libImaging}/Crop.c | 0 {libImaging => src/libImaging}/Dib.c | 0 {libImaging => src/libImaging}/Draw.c | 0 {libImaging => src/libImaging}/Effects.c | 0 {libImaging => src/libImaging}/EpsEncode.c | 0 {libImaging => src/libImaging}/Except.c | 0 {libImaging => src/libImaging}/File.c | 0 {libImaging => src/libImaging}/Fill.c | 0 {libImaging => src/libImaging}/Filter.c | 0 {libImaging => src/libImaging}/FliDecode.c | 0 {libImaging => src/libImaging}/Geometry.c | 0 {libImaging => src/libImaging}/GetBBox.c | 0 {libImaging => src/libImaging}/Gif.h | 0 {libImaging => src/libImaging}/GifDecode.c | 0 {libImaging => src/libImaging}/GifEncode.c | 0 {libImaging => src/libImaging}/HexDecode.c | 0 {libImaging => src/libImaging}/Histo.c | 0 {libImaging => src/libImaging}/ImDib.h | 0 {libImaging => src/libImaging}/ImPlatform.h | 0 {libImaging => src/libImaging}/Imaging.h | 0 {libImaging => src/libImaging}/ImagingUtils.h | 0 {libImaging => src/libImaging}/Jpeg.h | 0 {libImaging => src/libImaging}/Jpeg2K.h | 0 {libImaging => src/libImaging}/Jpeg2KDecode.c | 0 {libImaging => src/libImaging}/Jpeg2KEncode.c | 0 {libImaging => src/libImaging}/JpegDecode.c | 0 {libImaging => src/libImaging}/JpegEncode.c | 0 {libImaging => src/libImaging}/Matrix.c | 0 {libImaging => src/libImaging}/ModeFilter.c | 0 {libImaging => src/libImaging}/Negative.c | 0 {libImaging => src/libImaging}/Offset.c | 0 {libImaging => src/libImaging}/Pack.c | 0 {libImaging => src/libImaging}/PackDecode.c | 0 {libImaging => src/libImaging}/Palette.c | 0 {libImaging => src/libImaging}/Paste.c | 0 {libImaging => src/libImaging}/PcdDecode.c | 0 {libImaging => src/libImaging}/PcxDecode.c | 0 {libImaging => src/libImaging}/PcxEncode.c | 0 {libImaging => src/libImaging}/Point.c | 0 {libImaging => src/libImaging}/Quant.c | 0 {libImaging => src/libImaging}/QuantHash.c | 0 {libImaging => src/libImaging}/QuantHash.h | 0 {libImaging => src/libImaging}/QuantHeap.c | 0 {libImaging => src/libImaging}/QuantHeap.h | 0 {libImaging => src/libImaging}/QuantOctree.c | 0 {libImaging => src/libImaging}/QuantOctree.h | 0 .../libImaging}/QuantPngQuant.c | 0 .../libImaging}/QuantPngQuant.h | 0 {libImaging => src/libImaging}/QuantTypes.h | 0 {libImaging => src/libImaging}/RankFilter.c | 0 {libImaging => src/libImaging}/Raw.h | 0 {libImaging => src/libImaging}/RawDecode.c | 0 {libImaging => src/libImaging}/RawEncode.c | 0 {libImaging => src/libImaging}/Resample.c | 0 {libImaging => src/libImaging}/Sgi.h | 0 {libImaging => src/libImaging}/SgiRleDecode.c | 0 {libImaging => src/libImaging}/Storage.c | 0 {libImaging => src/libImaging}/SunRleDecode.c | 0 {libImaging => src/libImaging}/TgaRleDecode.c | 0 {libImaging => src/libImaging}/TiffDecode.c | 0 {libImaging => src/libImaging}/TiffDecode.h | 0 {libImaging => src/libImaging}/Unpack.c | 0 {libImaging => src/libImaging}/UnpackYCC.c | 0 {libImaging => src/libImaging}/UnsharpMask.c | 0 {libImaging => src/libImaging}/XbmDecode.c | 0 {libImaging => src/libImaging}/XbmEncode.c | 0 {libImaging => src/libImaging}/Zip.h | 0 {libImaging => src/libImaging}/ZipDecode.c | 0 {libImaging => src/libImaging}/ZipEncode.c | 0 {libImaging => src/libImaging}/codec_fd.c | 0 map.c => src/map.c | 0 outline.c => src/outline.c | 0 path.c => src/path.c | 0 py3.h => src/py3.h | 0 189 files changed, 15 insertions(+), 15 deletions(-) rename {PIL => src/PIL}/BdfFontFile.py (100%) rename {PIL => src/PIL}/BmpImagePlugin.py (100%) rename {PIL => src/PIL}/BufrStubImagePlugin.py (100%) rename {PIL => src/PIL}/ContainerIO.py (100%) rename {PIL => src/PIL}/CurImagePlugin.py (100%) rename {PIL => src/PIL}/DcxImagePlugin.py (100%) rename {PIL => src/PIL}/DdsImagePlugin.py (100%) rename {PIL => src/PIL}/EpsImagePlugin.py (100%) rename {PIL => src/PIL}/ExifTags.py (100%) rename {PIL => src/PIL}/FitsStubImagePlugin.py (100%) rename {PIL => src/PIL}/FliImagePlugin.py (100%) rename {PIL => src/PIL}/FontFile.py (100%) rename {PIL => src/PIL}/FpxImagePlugin.py (100%) rename {PIL => src/PIL}/FtexImagePlugin.py (100%) rename {PIL => src/PIL}/GbrImagePlugin.py (100%) rename {PIL => src/PIL}/GdImageFile.py (100%) rename {PIL => src/PIL}/GifImagePlugin.py (100%) rename {PIL => src/PIL}/GimpGradientFile.py (100%) rename {PIL => src/PIL}/GimpPaletteFile.py (100%) rename {PIL => src/PIL}/GribStubImagePlugin.py (100%) rename {PIL => src/PIL}/Hdf5StubImagePlugin.py (100%) rename {PIL => src/PIL}/IcnsImagePlugin.py (100%) rename {PIL => src/PIL}/IcoImagePlugin.py (100%) rename {PIL => src/PIL}/ImImagePlugin.py (100%) rename {PIL => src/PIL}/Image.py (100%) rename {PIL => src/PIL}/ImageChops.py (100%) rename {PIL => src/PIL}/ImageCms.py (100%) rename {PIL => src/PIL}/ImageColor.py (100%) rename {PIL => src/PIL}/ImageDraw.py (100%) rename {PIL => src/PIL}/ImageDraw2.py (100%) rename {PIL => src/PIL}/ImageEnhance.py (100%) rename {PIL => src/PIL}/ImageFile.py (100%) rename {PIL => src/PIL}/ImageFilter.py (100%) rename {PIL => src/PIL}/ImageFont.py (100%) rename {PIL => src/PIL}/ImageGrab.py (100%) rename {PIL => src/PIL}/ImageMath.py (100%) rename {PIL => src/PIL}/ImageMode.py (100%) rename {PIL => src/PIL}/ImageMorph.py (100%) rename {PIL => src/PIL}/ImageOps.py (100%) rename {PIL => src/PIL}/ImagePalette.py (100%) rename {PIL => src/PIL}/ImagePath.py (100%) rename {PIL => src/PIL}/ImageQt.py (100%) rename {PIL => src/PIL}/ImageSequence.py (100%) rename {PIL => src/PIL}/ImageShow.py (100%) rename {PIL => src/PIL}/ImageStat.py (100%) rename {PIL => src/PIL}/ImageTk.py (100%) rename {PIL => src/PIL}/ImageTransform.py (100%) rename {PIL => src/PIL}/ImageWin.py (100%) rename {PIL => src/PIL}/ImtImagePlugin.py (100%) rename {PIL => src/PIL}/IptcImagePlugin.py (100%) rename {PIL => src/PIL}/Jpeg2KImagePlugin.py (100%) rename {PIL => src/PIL}/JpegImagePlugin.py (100%) rename {PIL => src/PIL}/JpegPresets.py (100%) rename {PIL => src/PIL}/McIdasImagePlugin.py (100%) rename {PIL => src/PIL}/MicImagePlugin.py (100%) rename {PIL => src/PIL}/MpegImagePlugin.py (100%) rename {PIL => src/PIL}/MpoImagePlugin.py (100%) rename {PIL => src/PIL}/MspImagePlugin.py (100%) rename {PIL => src/PIL}/OleFileIO.py (100%) rename {PIL => src/PIL}/PSDraw.py (100%) rename {PIL => src/PIL}/PaletteFile.py (100%) rename {PIL => src/PIL}/PalmImagePlugin.py (100%) rename {PIL => src/PIL}/PcdImagePlugin.py (100%) rename {PIL => src/PIL}/PcfFontFile.py (100%) rename {PIL => src/PIL}/PcxImagePlugin.py (100%) rename {PIL => src/PIL}/PdfImagePlugin.py (100%) rename {PIL => src/PIL}/PixarImagePlugin.py (100%) rename {PIL => src/PIL}/PngImagePlugin.py (100%) rename {PIL => src/PIL}/PpmImagePlugin.py (100%) rename {PIL => src/PIL}/PsdImagePlugin.py (100%) rename {PIL => src/PIL}/PyAccess.py (100%) rename {PIL => src/PIL}/SgiImagePlugin.py (100%) rename {PIL => src/PIL}/SpiderImagePlugin.py (100%) rename {PIL => src/PIL}/SunImagePlugin.py (100%) rename {PIL => src/PIL}/TarIO.py (100%) rename {PIL => src/PIL}/TgaImagePlugin.py (100%) rename {PIL => src/PIL}/TiffImagePlugin.py (100%) rename {PIL => src/PIL}/TiffTags.py (100%) rename {PIL => src/PIL}/WalImageFile.py (100%) rename {PIL => src/PIL}/WebPImagePlugin.py (100%) rename {PIL => src/PIL}/WmfImagePlugin.py (100%) rename {PIL => src/PIL}/XVThumbImagePlugin.py (100%) rename {PIL => src/PIL}/XbmImagePlugin.py (100%) rename {PIL => src/PIL}/XpmImagePlugin.py (100%) rename {PIL => src/PIL}/__init__.py (100%) rename {PIL => src/PIL}/_binary.py (100%) rename {PIL => src/PIL}/_tkinter_finder.py (100%) rename {PIL => src/PIL}/_util.py (100%) rename {PIL => src/PIL}/features.py (100%) rename {PIL => src/PIL}/version.py (100%) rename _imaging.c => src/_imaging.c (100%) rename _imagingcms.c => src/_imagingcms.c (100%) rename _imagingft.c => src/_imagingft.c (100%) rename _imagingmath.c => src/_imagingmath.c (100%) rename _imagingmorph.c => src/_imagingmorph.c (100%) rename _imagingtk.c => src/_imagingtk.c (100%) rename _webp.c => src/_webp.c (100%) rename decode.c => src/decode.c (100%) rename display.c => src/display.c (100%) rename encode.c => src/encode.c (100%) rename {libImaging => src/libImaging}/Access.c (100%) rename {libImaging => src/libImaging}/AlphaComposite.c (100%) rename {libImaging => src/libImaging}/Bands.c (100%) rename {libImaging => src/libImaging}/BcnDecode.c (100%) rename {libImaging => src/libImaging}/Bit.h (100%) rename {libImaging => src/libImaging}/BitDecode.c (100%) rename {libImaging => src/libImaging}/Blend.c (100%) rename {libImaging => src/libImaging}/BoxBlur.c (100%) rename {libImaging => src/libImaging}/Chops.c (100%) rename {libImaging => src/libImaging}/Convert.c (100%) rename {libImaging => src/libImaging}/ConvertYCbCr.c (100%) rename {libImaging => src/libImaging}/Copy.c (100%) rename {libImaging => src/libImaging}/Crc32.c (100%) rename {libImaging => src/libImaging}/Crop.c (100%) rename {libImaging => src/libImaging}/Dib.c (100%) rename {libImaging => src/libImaging}/Draw.c (100%) rename {libImaging => src/libImaging}/Effects.c (100%) rename {libImaging => src/libImaging}/EpsEncode.c (100%) rename {libImaging => src/libImaging}/Except.c (100%) rename {libImaging => src/libImaging}/File.c (100%) rename {libImaging => src/libImaging}/Fill.c (100%) rename {libImaging => src/libImaging}/Filter.c (100%) rename {libImaging => src/libImaging}/FliDecode.c (100%) rename {libImaging => src/libImaging}/Geometry.c (100%) rename {libImaging => src/libImaging}/GetBBox.c (100%) rename {libImaging => src/libImaging}/Gif.h (100%) rename {libImaging => src/libImaging}/GifDecode.c (100%) rename {libImaging => src/libImaging}/GifEncode.c (100%) rename {libImaging => src/libImaging}/HexDecode.c (100%) rename {libImaging => src/libImaging}/Histo.c (100%) rename {libImaging => src/libImaging}/ImDib.h (100%) rename {libImaging => src/libImaging}/ImPlatform.h (100%) rename {libImaging => src/libImaging}/Imaging.h (100%) rename {libImaging => src/libImaging}/ImagingUtils.h (100%) rename {libImaging => src/libImaging}/Jpeg.h (100%) rename {libImaging => src/libImaging}/Jpeg2K.h (100%) rename {libImaging => src/libImaging}/Jpeg2KDecode.c (100%) rename {libImaging => src/libImaging}/Jpeg2KEncode.c (100%) rename {libImaging => src/libImaging}/JpegDecode.c (100%) rename {libImaging => src/libImaging}/JpegEncode.c (100%) rename {libImaging => src/libImaging}/Matrix.c (100%) rename {libImaging => src/libImaging}/ModeFilter.c (100%) rename {libImaging => src/libImaging}/Negative.c (100%) rename {libImaging => src/libImaging}/Offset.c (100%) rename {libImaging => src/libImaging}/Pack.c (100%) rename {libImaging => src/libImaging}/PackDecode.c (100%) rename {libImaging => src/libImaging}/Palette.c (100%) rename {libImaging => src/libImaging}/Paste.c (100%) rename {libImaging => src/libImaging}/PcdDecode.c (100%) rename {libImaging => src/libImaging}/PcxDecode.c (100%) rename {libImaging => src/libImaging}/PcxEncode.c (100%) rename {libImaging => src/libImaging}/Point.c (100%) rename {libImaging => src/libImaging}/Quant.c (100%) rename {libImaging => src/libImaging}/QuantHash.c (100%) rename {libImaging => src/libImaging}/QuantHash.h (100%) rename {libImaging => src/libImaging}/QuantHeap.c (100%) rename {libImaging => src/libImaging}/QuantHeap.h (100%) rename {libImaging => src/libImaging}/QuantOctree.c (100%) rename {libImaging => src/libImaging}/QuantOctree.h (100%) rename {libImaging => src/libImaging}/QuantPngQuant.c (100%) rename {libImaging => src/libImaging}/QuantPngQuant.h (100%) rename {libImaging => src/libImaging}/QuantTypes.h (100%) rename {libImaging => src/libImaging}/RankFilter.c (100%) rename {libImaging => src/libImaging}/Raw.h (100%) rename {libImaging => src/libImaging}/RawDecode.c (100%) rename {libImaging => src/libImaging}/RawEncode.c (100%) rename {libImaging => src/libImaging}/Resample.c (100%) rename {libImaging => src/libImaging}/Sgi.h (100%) rename {libImaging => src/libImaging}/SgiRleDecode.c (100%) rename {libImaging => src/libImaging}/Storage.c (100%) rename {libImaging => src/libImaging}/SunRleDecode.c (100%) rename {libImaging => src/libImaging}/TgaRleDecode.c (100%) rename {libImaging => src/libImaging}/TiffDecode.c (100%) rename {libImaging => src/libImaging}/TiffDecode.h (100%) rename {libImaging => src/libImaging}/Unpack.c (100%) rename {libImaging => src/libImaging}/UnpackYCC.c (100%) rename {libImaging => src/libImaging}/UnsharpMask.c (100%) rename {libImaging => src/libImaging}/XbmDecode.c (100%) rename {libImaging => src/libImaging}/XbmEncode.c (100%) rename {libImaging => src/libImaging}/Zip.h (100%) rename {libImaging => src/libImaging}/ZipDecode.c (100%) rename {libImaging => src/libImaging}/ZipEncode.c (100%) rename {libImaging => src/libImaging}/codec_fd.c (100%) rename map.c => src/map.c (100%) rename outline.c => src/outline.c (100%) rename path.c => src/path.c (100%) rename py3.h => src/py3.h (100%) diff --git a/MANIFEST.in b/MANIFEST.in index a266f380b..865e51697 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -10,9 +10,8 @@ include *.txt include LICENSE include Makefile graft Tests -graft PIL +graft src graft Tk -graft libImaging graft depends graft winbuild graft docs diff --git a/setup.py b/setup.py index 5c36302bd..98d482738 100755 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ import warnings from distutils import ccompiler, sysconfig from distutils.command.build_ext import build_ext -from setuptools import Extension, find_packages, setup +from setuptools import Extension, setup # monkey patch import hook. Even though flake8 says it's not used, it is. # comment this out to disable multi threaded builds. @@ -122,7 +122,7 @@ def _read(file): def get_version(): - version_file = 'PIL/version.py' + version_file = 'src/PIL/version.py' with open(version_file, 'r') as f: exec(compile(f.read(), version_file, 'exec')) return locals()['__version__'] @@ -223,7 +223,7 @@ class pil_build_ext(build_ext): library_dirs = [] include_dirs = [] - _add_directory(include_dirs, "libImaging") + _add_directory(include_dirs, "src/libImaging") pkg_config = None if _cmd_exists('pkg-config'): @@ -583,11 +583,11 @@ class pil_build_ext(build_ext): # # core library - files = ["_imaging.c"] + files = ["src/_imaging.c"] for src_file in _IMAGING: - files.append(src_file + ".c") + files.append("src/" + src_file + ".c") for src_file in _LIB_IMAGING: - files.append(os.path.join("libImaging", src_file + ".c")) + files.append(os.path.join("src/libImaging", src_file + ".c")) libs = [] defs = [] @@ -630,7 +630,7 @@ class pil_build_ext(build_ext): libs = ["freetype"] defs = [] exts.append(Extension( - "PIL._imagingft", ["_imagingft.c"], libraries=libs, + "PIL._imagingft", ["src/_imagingft.c"], libraries=libs, define_macros=defs)) if feature.lcms: @@ -638,7 +638,7 @@ class pil_build_ext(build_ext): if sys.platform == "win32": extra.extend(["user32", "gdi32"]) exts.append(Extension("PIL._imagingcms", - ["_imagingcms.c"], + ["src/_imagingcms.c"], libraries=[feature.lcms] + extra)) if feature.webp: @@ -651,18 +651,18 @@ class pil_build_ext(build_ext): libs.append(feature.webpmux.replace('pmux', 'pdemux')) exts.append(Extension("PIL._webp", - ["_webp.c"], + ["src/_webp.c"], libraries=libs, define_macros=defs)) tk_libs = ['psapi'] if sys.platform == 'win32' else [] exts.append(Extension("PIL._imagingtk", - ["_imagingtk.c", "Tk/tkImaging.c"], + ["src/_imagingtk.c", "Tk/tkImaging.c"], include_dirs=['Tk'], libraries=tk_libs)) - exts.append(Extension("PIL._imagingmath", ["_imagingmath.c"])) - exts.append(Extension("PIL._imagingmorph", ["_imagingmorph.c"])) + exts.append(Extension("PIL._imagingmath", ["src/_imagingmath.c"])) + exts.append(Extension("PIL._imagingmorph", ["src/_imagingmorph.c"])) self.extensions[:] = exts @@ -783,9 +783,10 @@ try: cmdclass={"build_ext": pil_build_ext}, ext_modules=[Extension("PIL._imaging", ["_imaging.c"])], include_package_data=True, - packages=find_packages(), setup_requires=pytest_runner, tests_require=['pytest'], + packages=["PIL"], + package_dir={'':'src'}, keywords=["Imaging", ], license='Standard PIL License', zip_safe=not (debug_build() or PLATFORM_MINGW), ) diff --git a/PIL/BdfFontFile.py b/src/PIL/BdfFontFile.py similarity index 100% rename from PIL/BdfFontFile.py rename to src/PIL/BdfFontFile.py diff --git a/PIL/BmpImagePlugin.py b/src/PIL/BmpImagePlugin.py similarity index 100% rename from PIL/BmpImagePlugin.py rename to src/PIL/BmpImagePlugin.py diff --git a/PIL/BufrStubImagePlugin.py b/src/PIL/BufrStubImagePlugin.py similarity index 100% rename from PIL/BufrStubImagePlugin.py rename to src/PIL/BufrStubImagePlugin.py diff --git a/PIL/ContainerIO.py b/src/PIL/ContainerIO.py similarity index 100% rename from PIL/ContainerIO.py rename to src/PIL/ContainerIO.py diff --git a/PIL/CurImagePlugin.py b/src/PIL/CurImagePlugin.py similarity index 100% rename from PIL/CurImagePlugin.py rename to src/PIL/CurImagePlugin.py diff --git a/PIL/DcxImagePlugin.py b/src/PIL/DcxImagePlugin.py similarity index 100% rename from PIL/DcxImagePlugin.py rename to src/PIL/DcxImagePlugin.py diff --git a/PIL/DdsImagePlugin.py b/src/PIL/DdsImagePlugin.py similarity index 100% rename from PIL/DdsImagePlugin.py rename to src/PIL/DdsImagePlugin.py diff --git a/PIL/EpsImagePlugin.py b/src/PIL/EpsImagePlugin.py similarity index 100% rename from PIL/EpsImagePlugin.py rename to src/PIL/EpsImagePlugin.py diff --git a/PIL/ExifTags.py b/src/PIL/ExifTags.py similarity index 100% rename from PIL/ExifTags.py rename to src/PIL/ExifTags.py diff --git a/PIL/FitsStubImagePlugin.py b/src/PIL/FitsStubImagePlugin.py similarity index 100% rename from PIL/FitsStubImagePlugin.py rename to src/PIL/FitsStubImagePlugin.py diff --git a/PIL/FliImagePlugin.py b/src/PIL/FliImagePlugin.py similarity index 100% rename from PIL/FliImagePlugin.py rename to src/PIL/FliImagePlugin.py diff --git a/PIL/FontFile.py b/src/PIL/FontFile.py similarity index 100% rename from PIL/FontFile.py rename to src/PIL/FontFile.py diff --git a/PIL/FpxImagePlugin.py b/src/PIL/FpxImagePlugin.py similarity index 100% rename from PIL/FpxImagePlugin.py rename to src/PIL/FpxImagePlugin.py diff --git a/PIL/FtexImagePlugin.py b/src/PIL/FtexImagePlugin.py similarity index 100% rename from PIL/FtexImagePlugin.py rename to src/PIL/FtexImagePlugin.py diff --git a/PIL/GbrImagePlugin.py b/src/PIL/GbrImagePlugin.py similarity index 100% rename from PIL/GbrImagePlugin.py rename to src/PIL/GbrImagePlugin.py diff --git a/PIL/GdImageFile.py b/src/PIL/GdImageFile.py similarity index 100% rename from PIL/GdImageFile.py rename to src/PIL/GdImageFile.py diff --git a/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py similarity index 100% rename from PIL/GifImagePlugin.py rename to src/PIL/GifImagePlugin.py diff --git a/PIL/GimpGradientFile.py b/src/PIL/GimpGradientFile.py similarity index 100% rename from PIL/GimpGradientFile.py rename to src/PIL/GimpGradientFile.py diff --git a/PIL/GimpPaletteFile.py b/src/PIL/GimpPaletteFile.py similarity index 100% rename from PIL/GimpPaletteFile.py rename to src/PIL/GimpPaletteFile.py diff --git a/PIL/GribStubImagePlugin.py b/src/PIL/GribStubImagePlugin.py similarity index 100% rename from PIL/GribStubImagePlugin.py rename to src/PIL/GribStubImagePlugin.py diff --git a/PIL/Hdf5StubImagePlugin.py b/src/PIL/Hdf5StubImagePlugin.py similarity index 100% rename from PIL/Hdf5StubImagePlugin.py rename to src/PIL/Hdf5StubImagePlugin.py diff --git a/PIL/IcnsImagePlugin.py b/src/PIL/IcnsImagePlugin.py similarity index 100% rename from PIL/IcnsImagePlugin.py rename to src/PIL/IcnsImagePlugin.py diff --git a/PIL/IcoImagePlugin.py b/src/PIL/IcoImagePlugin.py similarity index 100% rename from PIL/IcoImagePlugin.py rename to src/PIL/IcoImagePlugin.py diff --git a/PIL/ImImagePlugin.py b/src/PIL/ImImagePlugin.py similarity index 100% rename from PIL/ImImagePlugin.py rename to src/PIL/ImImagePlugin.py diff --git a/PIL/Image.py b/src/PIL/Image.py similarity index 100% rename from PIL/Image.py rename to src/PIL/Image.py diff --git a/PIL/ImageChops.py b/src/PIL/ImageChops.py similarity index 100% rename from PIL/ImageChops.py rename to src/PIL/ImageChops.py diff --git a/PIL/ImageCms.py b/src/PIL/ImageCms.py similarity index 100% rename from PIL/ImageCms.py rename to src/PIL/ImageCms.py diff --git a/PIL/ImageColor.py b/src/PIL/ImageColor.py similarity index 100% rename from PIL/ImageColor.py rename to src/PIL/ImageColor.py diff --git a/PIL/ImageDraw.py b/src/PIL/ImageDraw.py similarity index 100% rename from PIL/ImageDraw.py rename to src/PIL/ImageDraw.py diff --git a/PIL/ImageDraw2.py b/src/PIL/ImageDraw2.py similarity index 100% rename from PIL/ImageDraw2.py rename to src/PIL/ImageDraw2.py diff --git a/PIL/ImageEnhance.py b/src/PIL/ImageEnhance.py similarity index 100% rename from PIL/ImageEnhance.py rename to src/PIL/ImageEnhance.py diff --git a/PIL/ImageFile.py b/src/PIL/ImageFile.py similarity index 100% rename from PIL/ImageFile.py rename to src/PIL/ImageFile.py diff --git a/PIL/ImageFilter.py b/src/PIL/ImageFilter.py similarity index 100% rename from PIL/ImageFilter.py rename to src/PIL/ImageFilter.py diff --git a/PIL/ImageFont.py b/src/PIL/ImageFont.py similarity index 100% rename from PIL/ImageFont.py rename to src/PIL/ImageFont.py diff --git a/PIL/ImageGrab.py b/src/PIL/ImageGrab.py similarity index 100% rename from PIL/ImageGrab.py rename to src/PIL/ImageGrab.py diff --git a/PIL/ImageMath.py b/src/PIL/ImageMath.py similarity index 100% rename from PIL/ImageMath.py rename to src/PIL/ImageMath.py diff --git a/PIL/ImageMode.py b/src/PIL/ImageMode.py similarity index 100% rename from PIL/ImageMode.py rename to src/PIL/ImageMode.py diff --git a/PIL/ImageMorph.py b/src/PIL/ImageMorph.py similarity index 100% rename from PIL/ImageMorph.py rename to src/PIL/ImageMorph.py diff --git a/PIL/ImageOps.py b/src/PIL/ImageOps.py similarity index 100% rename from PIL/ImageOps.py rename to src/PIL/ImageOps.py diff --git a/PIL/ImagePalette.py b/src/PIL/ImagePalette.py similarity index 100% rename from PIL/ImagePalette.py rename to src/PIL/ImagePalette.py diff --git a/PIL/ImagePath.py b/src/PIL/ImagePath.py similarity index 100% rename from PIL/ImagePath.py rename to src/PIL/ImagePath.py diff --git a/PIL/ImageQt.py b/src/PIL/ImageQt.py similarity index 100% rename from PIL/ImageQt.py rename to src/PIL/ImageQt.py diff --git a/PIL/ImageSequence.py b/src/PIL/ImageSequence.py similarity index 100% rename from PIL/ImageSequence.py rename to src/PIL/ImageSequence.py diff --git a/PIL/ImageShow.py b/src/PIL/ImageShow.py similarity index 100% rename from PIL/ImageShow.py rename to src/PIL/ImageShow.py diff --git a/PIL/ImageStat.py b/src/PIL/ImageStat.py similarity index 100% rename from PIL/ImageStat.py rename to src/PIL/ImageStat.py diff --git a/PIL/ImageTk.py b/src/PIL/ImageTk.py similarity index 100% rename from PIL/ImageTk.py rename to src/PIL/ImageTk.py diff --git a/PIL/ImageTransform.py b/src/PIL/ImageTransform.py similarity index 100% rename from PIL/ImageTransform.py rename to src/PIL/ImageTransform.py diff --git a/PIL/ImageWin.py b/src/PIL/ImageWin.py similarity index 100% rename from PIL/ImageWin.py rename to src/PIL/ImageWin.py diff --git a/PIL/ImtImagePlugin.py b/src/PIL/ImtImagePlugin.py similarity index 100% rename from PIL/ImtImagePlugin.py rename to src/PIL/ImtImagePlugin.py diff --git a/PIL/IptcImagePlugin.py b/src/PIL/IptcImagePlugin.py similarity index 100% rename from PIL/IptcImagePlugin.py rename to src/PIL/IptcImagePlugin.py diff --git a/PIL/Jpeg2KImagePlugin.py b/src/PIL/Jpeg2KImagePlugin.py similarity index 100% rename from PIL/Jpeg2KImagePlugin.py rename to src/PIL/Jpeg2KImagePlugin.py diff --git a/PIL/JpegImagePlugin.py b/src/PIL/JpegImagePlugin.py similarity index 100% rename from PIL/JpegImagePlugin.py rename to src/PIL/JpegImagePlugin.py diff --git a/PIL/JpegPresets.py b/src/PIL/JpegPresets.py similarity index 100% rename from PIL/JpegPresets.py rename to src/PIL/JpegPresets.py diff --git a/PIL/McIdasImagePlugin.py b/src/PIL/McIdasImagePlugin.py similarity index 100% rename from PIL/McIdasImagePlugin.py rename to src/PIL/McIdasImagePlugin.py diff --git a/PIL/MicImagePlugin.py b/src/PIL/MicImagePlugin.py similarity index 100% rename from PIL/MicImagePlugin.py rename to src/PIL/MicImagePlugin.py diff --git a/PIL/MpegImagePlugin.py b/src/PIL/MpegImagePlugin.py similarity index 100% rename from PIL/MpegImagePlugin.py rename to src/PIL/MpegImagePlugin.py diff --git a/PIL/MpoImagePlugin.py b/src/PIL/MpoImagePlugin.py similarity index 100% rename from PIL/MpoImagePlugin.py rename to src/PIL/MpoImagePlugin.py diff --git a/PIL/MspImagePlugin.py b/src/PIL/MspImagePlugin.py similarity index 100% rename from PIL/MspImagePlugin.py rename to src/PIL/MspImagePlugin.py diff --git a/PIL/OleFileIO.py b/src/PIL/OleFileIO.py similarity index 100% rename from PIL/OleFileIO.py rename to src/PIL/OleFileIO.py diff --git a/PIL/PSDraw.py b/src/PIL/PSDraw.py similarity index 100% rename from PIL/PSDraw.py rename to src/PIL/PSDraw.py diff --git a/PIL/PaletteFile.py b/src/PIL/PaletteFile.py similarity index 100% rename from PIL/PaletteFile.py rename to src/PIL/PaletteFile.py diff --git a/PIL/PalmImagePlugin.py b/src/PIL/PalmImagePlugin.py similarity index 100% rename from PIL/PalmImagePlugin.py rename to src/PIL/PalmImagePlugin.py diff --git a/PIL/PcdImagePlugin.py b/src/PIL/PcdImagePlugin.py similarity index 100% rename from PIL/PcdImagePlugin.py rename to src/PIL/PcdImagePlugin.py diff --git a/PIL/PcfFontFile.py b/src/PIL/PcfFontFile.py similarity index 100% rename from PIL/PcfFontFile.py rename to src/PIL/PcfFontFile.py diff --git a/PIL/PcxImagePlugin.py b/src/PIL/PcxImagePlugin.py similarity index 100% rename from PIL/PcxImagePlugin.py rename to src/PIL/PcxImagePlugin.py diff --git a/PIL/PdfImagePlugin.py b/src/PIL/PdfImagePlugin.py similarity index 100% rename from PIL/PdfImagePlugin.py rename to src/PIL/PdfImagePlugin.py diff --git a/PIL/PixarImagePlugin.py b/src/PIL/PixarImagePlugin.py similarity index 100% rename from PIL/PixarImagePlugin.py rename to src/PIL/PixarImagePlugin.py diff --git a/PIL/PngImagePlugin.py b/src/PIL/PngImagePlugin.py similarity index 100% rename from PIL/PngImagePlugin.py rename to src/PIL/PngImagePlugin.py diff --git a/PIL/PpmImagePlugin.py b/src/PIL/PpmImagePlugin.py similarity index 100% rename from PIL/PpmImagePlugin.py rename to src/PIL/PpmImagePlugin.py diff --git a/PIL/PsdImagePlugin.py b/src/PIL/PsdImagePlugin.py similarity index 100% rename from PIL/PsdImagePlugin.py rename to src/PIL/PsdImagePlugin.py diff --git a/PIL/PyAccess.py b/src/PIL/PyAccess.py similarity index 100% rename from PIL/PyAccess.py rename to src/PIL/PyAccess.py diff --git a/PIL/SgiImagePlugin.py b/src/PIL/SgiImagePlugin.py similarity index 100% rename from PIL/SgiImagePlugin.py rename to src/PIL/SgiImagePlugin.py diff --git a/PIL/SpiderImagePlugin.py b/src/PIL/SpiderImagePlugin.py similarity index 100% rename from PIL/SpiderImagePlugin.py rename to src/PIL/SpiderImagePlugin.py diff --git a/PIL/SunImagePlugin.py b/src/PIL/SunImagePlugin.py similarity index 100% rename from PIL/SunImagePlugin.py rename to src/PIL/SunImagePlugin.py diff --git a/PIL/TarIO.py b/src/PIL/TarIO.py similarity index 100% rename from PIL/TarIO.py rename to src/PIL/TarIO.py diff --git a/PIL/TgaImagePlugin.py b/src/PIL/TgaImagePlugin.py similarity index 100% rename from PIL/TgaImagePlugin.py rename to src/PIL/TgaImagePlugin.py diff --git a/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py similarity index 100% rename from PIL/TiffImagePlugin.py rename to src/PIL/TiffImagePlugin.py diff --git a/PIL/TiffTags.py b/src/PIL/TiffTags.py similarity index 100% rename from PIL/TiffTags.py rename to src/PIL/TiffTags.py diff --git a/PIL/WalImageFile.py b/src/PIL/WalImageFile.py similarity index 100% rename from PIL/WalImageFile.py rename to src/PIL/WalImageFile.py diff --git a/PIL/WebPImagePlugin.py b/src/PIL/WebPImagePlugin.py similarity index 100% rename from PIL/WebPImagePlugin.py rename to src/PIL/WebPImagePlugin.py diff --git a/PIL/WmfImagePlugin.py b/src/PIL/WmfImagePlugin.py similarity index 100% rename from PIL/WmfImagePlugin.py rename to src/PIL/WmfImagePlugin.py diff --git a/PIL/XVThumbImagePlugin.py b/src/PIL/XVThumbImagePlugin.py similarity index 100% rename from PIL/XVThumbImagePlugin.py rename to src/PIL/XVThumbImagePlugin.py diff --git a/PIL/XbmImagePlugin.py b/src/PIL/XbmImagePlugin.py similarity index 100% rename from PIL/XbmImagePlugin.py rename to src/PIL/XbmImagePlugin.py diff --git a/PIL/XpmImagePlugin.py b/src/PIL/XpmImagePlugin.py similarity index 100% rename from PIL/XpmImagePlugin.py rename to src/PIL/XpmImagePlugin.py diff --git a/PIL/__init__.py b/src/PIL/__init__.py similarity index 100% rename from PIL/__init__.py rename to src/PIL/__init__.py diff --git a/PIL/_binary.py b/src/PIL/_binary.py similarity index 100% rename from PIL/_binary.py rename to src/PIL/_binary.py diff --git a/PIL/_tkinter_finder.py b/src/PIL/_tkinter_finder.py similarity index 100% rename from PIL/_tkinter_finder.py rename to src/PIL/_tkinter_finder.py diff --git a/PIL/_util.py b/src/PIL/_util.py similarity index 100% rename from PIL/_util.py rename to src/PIL/_util.py diff --git a/PIL/features.py b/src/PIL/features.py similarity index 100% rename from PIL/features.py rename to src/PIL/features.py diff --git a/PIL/version.py b/src/PIL/version.py similarity index 100% rename from PIL/version.py rename to src/PIL/version.py diff --git a/_imaging.c b/src/_imaging.c similarity index 100% rename from _imaging.c rename to src/_imaging.c diff --git a/_imagingcms.c b/src/_imagingcms.c similarity index 100% rename from _imagingcms.c rename to src/_imagingcms.c diff --git a/_imagingft.c b/src/_imagingft.c similarity index 100% rename from _imagingft.c rename to src/_imagingft.c diff --git a/_imagingmath.c b/src/_imagingmath.c similarity index 100% rename from _imagingmath.c rename to src/_imagingmath.c diff --git a/_imagingmorph.c b/src/_imagingmorph.c similarity index 100% rename from _imagingmorph.c rename to src/_imagingmorph.c diff --git a/_imagingtk.c b/src/_imagingtk.c similarity index 100% rename from _imagingtk.c rename to src/_imagingtk.c diff --git a/_webp.c b/src/_webp.c similarity index 100% rename from _webp.c rename to src/_webp.c diff --git a/decode.c b/src/decode.c similarity index 100% rename from decode.c rename to src/decode.c diff --git a/display.c b/src/display.c similarity index 100% rename from display.c rename to src/display.c diff --git a/encode.c b/src/encode.c similarity index 100% rename from encode.c rename to src/encode.c diff --git a/libImaging/Access.c b/src/libImaging/Access.c similarity index 100% rename from libImaging/Access.c rename to src/libImaging/Access.c diff --git a/libImaging/AlphaComposite.c b/src/libImaging/AlphaComposite.c similarity index 100% rename from libImaging/AlphaComposite.c rename to src/libImaging/AlphaComposite.c diff --git a/libImaging/Bands.c b/src/libImaging/Bands.c similarity index 100% rename from libImaging/Bands.c rename to src/libImaging/Bands.c diff --git a/libImaging/BcnDecode.c b/src/libImaging/BcnDecode.c similarity index 100% rename from libImaging/BcnDecode.c rename to src/libImaging/BcnDecode.c diff --git a/libImaging/Bit.h b/src/libImaging/Bit.h similarity index 100% rename from libImaging/Bit.h rename to src/libImaging/Bit.h diff --git a/libImaging/BitDecode.c b/src/libImaging/BitDecode.c similarity index 100% rename from libImaging/BitDecode.c rename to src/libImaging/BitDecode.c diff --git a/libImaging/Blend.c b/src/libImaging/Blend.c similarity index 100% rename from libImaging/Blend.c rename to src/libImaging/Blend.c diff --git a/libImaging/BoxBlur.c b/src/libImaging/BoxBlur.c similarity index 100% rename from libImaging/BoxBlur.c rename to src/libImaging/BoxBlur.c diff --git a/libImaging/Chops.c b/src/libImaging/Chops.c similarity index 100% rename from libImaging/Chops.c rename to src/libImaging/Chops.c diff --git a/libImaging/Convert.c b/src/libImaging/Convert.c similarity index 100% rename from libImaging/Convert.c rename to src/libImaging/Convert.c diff --git a/libImaging/ConvertYCbCr.c b/src/libImaging/ConvertYCbCr.c similarity index 100% rename from libImaging/ConvertYCbCr.c rename to src/libImaging/ConvertYCbCr.c diff --git a/libImaging/Copy.c b/src/libImaging/Copy.c similarity index 100% rename from libImaging/Copy.c rename to src/libImaging/Copy.c diff --git a/libImaging/Crc32.c b/src/libImaging/Crc32.c similarity index 100% rename from libImaging/Crc32.c rename to src/libImaging/Crc32.c diff --git a/libImaging/Crop.c b/src/libImaging/Crop.c similarity index 100% rename from libImaging/Crop.c rename to src/libImaging/Crop.c diff --git a/libImaging/Dib.c b/src/libImaging/Dib.c similarity index 100% rename from libImaging/Dib.c rename to src/libImaging/Dib.c diff --git a/libImaging/Draw.c b/src/libImaging/Draw.c similarity index 100% rename from libImaging/Draw.c rename to src/libImaging/Draw.c diff --git a/libImaging/Effects.c b/src/libImaging/Effects.c similarity index 100% rename from libImaging/Effects.c rename to src/libImaging/Effects.c diff --git a/libImaging/EpsEncode.c b/src/libImaging/EpsEncode.c similarity index 100% rename from libImaging/EpsEncode.c rename to src/libImaging/EpsEncode.c diff --git a/libImaging/Except.c b/src/libImaging/Except.c similarity index 100% rename from libImaging/Except.c rename to src/libImaging/Except.c diff --git a/libImaging/File.c b/src/libImaging/File.c similarity index 100% rename from libImaging/File.c rename to src/libImaging/File.c diff --git a/libImaging/Fill.c b/src/libImaging/Fill.c similarity index 100% rename from libImaging/Fill.c rename to src/libImaging/Fill.c diff --git a/libImaging/Filter.c b/src/libImaging/Filter.c similarity index 100% rename from libImaging/Filter.c rename to src/libImaging/Filter.c diff --git a/libImaging/FliDecode.c b/src/libImaging/FliDecode.c similarity index 100% rename from libImaging/FliDecode.c rename to src/libImaging/FliDecode.c diff --git a/libImaging/Geometry.c b/src/libImaging/Geometry.c similarity index 100% rename from libImaging/Geometry.c rename to src/libImaging/Geometry.c diff --git a/libImaging/GetBBox.c b/src/libImaging/GetBBox.c similarity index 100% rename from libImaging/GetBBox.c rename to src/libImaging/GetBBox.c diff --git a/libImaging/Gif.h b/src/libImaging/Gif.h similarity index 100% rename from libImaging/Gif.h rename to src/libImaging/Gif.h diff --git a/libImaging/GifDecode.c b/src/libImaging/GifDecode.c similarity index 100% rename from libImaging/GifDecode.c rename to src/libImaging/GifDecode.c diff --git a/libImaging/GifEncode.c b/src/libImaging/GifEncode.c similarity index 100% rename from libImaging/GifEncode.c rename to src/libImaging/GifEncode.c diff --git a/libImaging/HexDecode.c b/src/libImaging/HexDecode.c similarity index 100% rename from libImaging/HexDecode.c rename to src/libImaging/HexDecode.c diff --git a/libImaging/Histo.c b/src/libImaging/Histo.c similarity index 100% rename from libImaging/Histo.c rename to src/libImaging/Histo.c diff --git a/libImaging/ImDib.h b/src/libImaging/ImDib.h similarity index 100% rename from libImaging/ImDib.h rename to src/libImaging/ImDib.h diff --git a/libImaging/ImPlatform.h b/src/libImaging/ImPlatform.h similarity index 100% rename from libImaging/ImPlatform.h rename to src/libImaging/ImPlatform.h diff --git a/libImaging/Imaging.h b/src/libImaging/Imaging.h similarity index 100% rename from libImaging/Imaging.h rename to src/libImaging/Imaging.h diff --git a/libImaging/ImagingUtils.h b/src/libImaging/ImagingUtils.h similarity index 100% rename from libImaging/ImagingUtils.h rename to src/libImaging/ImagingUtils.h diff --git a/libImaging/Jpeg.h b/src/libImaging/Jpeg.h similarity index 100% rename from libImaging/Jpeg.h rename to src/libImaging/Jpeg.h diff --git a/libImaging/Jpeg2K.h b/src/libImaging/Jpeg2K.h similarity index 100% rename from libImaging/Jpeg2K.h rename to src/libImaging/Jpeg2K.h diff --git a/libImaging/Jpeg2KDecode.c b/src/libImaging/Jpeg2KDecode.c similarity index 100% rename from libImaging/Jpeg2KDecode.c rename to src/libImaging/Jpeg2KDecode.c diff --git a/libImaging/Jpeg2KEncode.c b/src/libImaging/Jpeg2KEncode.c similarity index 100% rename from libImaging/Jpeg2KEncode.c rename to src/libImaging/Jpeg2KEncode.c diff --git a/libImaging/JpegDecode.c b/src/libImaging/JpegDecode.c similarity index 100% rename from libImaging/JpegDecode.c rename to src/libImaging/JpegDecode.c diff --git a/libImaging/JpegEncode.c b/src/libImaging/JpegEncode.c similarity index 100% rename from libImaging/JpegEncode.c rename to src/libImaging/JpegEncode.c diff --git a/libImaging/Matrix.c b/src/libImaging/Matrix.c similarity index 100% rename from libImaging/Matrix.c rename to src/libImaging/Matrix.c diff --git a/libImaging/ModeFilter.c b/src/libImaging/ModeFilter.c similarity index 100% rename from libImaging/ModeFilter.c rename to src/libImaging/ModeFilter.c diff --git a/libImaging/Negative.c b/src/libImaging/Negative.c similarity index 100% rename from libImaging/Negative.c rename to src/libImaging/Negative.c diff --git a/libImaging/Offset.c b/src/libImaging/Offset.c similarity index 100% rename from libImaging/Offset.c rename to src/libImaging/Offset.c diff --git a/libImaging/Pack.c b/src/libImaging/Pack.c similarity index 100% rename from libImaging/Pack.c rename to src/libImaging/Pack.c diff --git a/libImaging/PackDecode.c b/src/libImaging/PackDecode.c similarity index 100% rename from libImaging/PackDecode.c rename to src/libImaging/PackDecode.c diff --git a/libImaging/Palette.c b/src/libImaging/Palette.c similarity index 100% rename from libImaging/Palette.c rename to src/libImaging/Palette.c diff --git a/libImaging/Paste.c b/src/libImaging/Paste.c similarity index 100% rename from libImaging/Paste.c rename to src/libImaging/Paste.c diff --git a/libImaging/PcdDecode.c b/src/libImaging/PcdDecode.c similarity index 100% rename from libImaging/PcdDecode.c rename to src/libImaging/PcdDecode.c diff --git a/libImaging/PcxDecode.c b/src/libImaging/PcxDecode.c similarity index 100% rename from libImaging/PcxDecode.c rename to src/libImaging/PcxDecode.c diff --git a/libImaging/PcxEncode.c b/src/libImaging/PcxEncode.c similarity index 100% rename from libImaging/PcxEncode.c rename to src/libImaging/PcxEncode.c diff --git a/libImaging/Point.c b/src/libImaging/Point.c similarity index 100% rename from libImaging/Point.c rename to src/libImaging/Point.c diff --git a/libImaging/Quant.c b/src/libImaging/Quant.c similarity index 100% rename from libImaging/Quant.c rename to src/libImaging/Quant.c diff --git a/libImaging/QuantHash.c b/src/libImaging/QuantHash.c similarity index 100% rename from libImaging/QuantHash.c rename to src/libImaging/QuantHash.c diff --git a/libImaging/QuantHash.h b/src/libImaging/QuantHash.h similarity index 100% rename from libImaging/QuantHash.h rename to src/libImaging/QuantHash.h diff --git a/libImaging/QuantHeap.c b/src/libImaging/QuantHeap.c similarity index 100% rename from libImaging/QuantHeap.c rename to src/libImaging/QuantHeap.c diff --git a/libImaging/QuantHeap.h b/src/libImaging/QuantHeap.h similarity index 100% rename from libImaging/QuantHeap.h rename to src/libImaging/QuantHeap.h diff --git a/libImaging/QuantOctree.c b/src/libImaging/QuantOctree.c similarity index 100% rename from libImaging/QuantOctree.c rename to src/libImaging/QuantOctree.c diff --git a/libImaging/QuantOctree.h b/src/libImaging/QuantOctree.h similarity index 100% rename from libImaging/QuantOctree.h rename to src/libImaging/QuantOctree.h diff --git a/libImaging/QuantPngQuant.c b/src/libImaging/QuantPngQuant.c similarity index 100% rename from libImaging/QuantPngQuant.c rename to src/libImaging/QuantPngQuant.c diff --git a/libImaging/QuantPngQuant.h b/src/libImaging/QuantPngQuant.h similarity index 100% rename from libImaging/QuantPngQuant.h rename to src/libImaging/QuantPngQuant.h diff --git a/libImaging/QuantTypes.h b/src/libImaging/QuantTypes.h similarity index 100% rename from libImaging/QuantTypes.h rename to src/libImaging/QuantTypes.h diff --git a/libImaging/RankFilter.c b/src/libImaging/RankFilter.c similarity index 100% rename from libImaging/RankFilter.c rename to src/libImaging/RankFilter.c diff --git a/libImaging/Raw.h b/src/libImaging/Raw.h similarity index 100% rename from libImaging/Raw.h rename to src/libImaging/Raw.h diff --git a/libImaging/RawDecode.c b/src/libImaging/RawDecode.c similarity index 100% rename from libImaging/RawDecode.c rename to src/libImaging/RawDecode.c diff --git a/libImaging/RawEncode.c b/src/libImaging/RawEncode.c similarity index 100% rename from libImaging/RawEncode.c rename to src/libImaging/RawEncode.c diff --git a/libImaging/Resample.c b/src/libImaging/Resample.c similarity index 100% rename from libImaging/Resample.c rename to src/libImaging/Resample.c diff --git a/libImaging/Sgi.h b/src/libImaging/Sgi.h similarity index 100% rename from libImaging/Sgi.h rename to src/libImaging/Sgi.h diff --git a/libImaging/SgiRleDecode.c b/src/libImaging/SgiRleDecode.c similarity index 100% rename from libImaging/SgiRleDecode.c rename to src/libImaging/SgiRleDecode.c diff --git a/libImaging/Storage.c b/src/libImaging/Storage.c similarity index 100% rename from libImaging/Storage.c rename to src/libImaging/Storage.c diff --git a/libImaging/SunRleDecode.c b/src/libImaging/SunRleDecode.c similarity index 100% rename from libImaging/SunRleDecode.c rename to src/libImaging/SunRleDecode.c diff --git a/libImaging/TgaRleDecode.c b/src/libImaging/TgaRleDecode.c similarity index 100% rename from libImaging/TgaRleDecode.c rename to src/libImaging/TgaRleDecode.c diff --git a/libImaging/TiffDecode.c b/src/libImaging/TiffDecode.c similarity index 100% rename from libImaging/TiffDecode.c rename to src/libImaging/TiffDecode.c diff --git a/libImaging/TiffDecode.h b/src/libImaging/TiffDecode.h similarity index 100% rename from libImaging/TiffDecode.h rename to src/libImaging/TiffDecode.h diff --git a/libImaging/Unpack.c b/src/libImaging/Unpack.c similarity index 100% rename from libImaging/Unpack.c rename to src/libImaging/Unpack.c diff --git a/libImaging/UnpackYCC.c b/src/libImaging/UnpackYCC.c similarity index 100% rename from libImaging/UnpackYCC.c rename to src/libImaging/UnpackYCC.c diff --git a/libImaging/UnsharpMask.c b/src/libImaging/UnsharpMask.c similarity index 100% rename from libImaging/UnsharpMask.c rename to src/libImaging/UnsharpMask.c diff --git a/libImaging/XbmDecode.c b/src/libImaging/XbmDecode.c similarity index 100% rename from libImaging/XbmDecode.c rename to src/libImaging/XbmDecode.c diff --git a/libImaging/XbmEncode.c b/src/libImaging/XbmEncode.c similarity index 100% rename from libImaging/XbmEncode.c rename to src/libImaging/XbmEncode.c diff --git a/libImaging/Zip.h b/src/libImaging/Zip.h similarity index 100% rename from libImaging/Zip.h rename to src/libImaging/Zip.h diff --git a/libImaging/ZipDecode.c b/src/libImaging/ZipDecode.c similarity index 100% rename from libImaging/ZipDecode.c rename to src/libImaging/ZipDecode.c diff --git a/libImaging/ZipEncode.c b/src/libImaging/ZipEncode.c similarity index 100% rename from libImaging/ZipEncode.c rename to src/libImaging/ZipEncode.c diff --git a/libImaging/codec_fd.c b/src/libImaging/codec_fd.c similarity index 100% rename from libImaging/codec_fd.c rename to src/libImaging/codec_fd.c diff --git a/map.c b/src/map.c similarity index 100% rename from map.c rename to src/map.c diff --git a/outline.c b/src/outline.c similarity index 100% rename from outline.c rename to src/outline.c diff --git a/path.c b/src/path.c similarity index 100% rename from path.c rename to src/path.c diff --git a/py3.h b/src/py3.h similarity index 100% rename from py3.h rename to src/py3.h From cc35bd70bca835d665c48375bdb5207ec4d54342 Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 28 Dec 2017 12:02:13 +0200 Subject: [PATCH 17/23] No need to run coverage on dev machines --- .travis/script.sh | 3 ++- Tests/README.rst | 2 +- setup.cfg | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis/script.sh b/.travis/script.sh index 1473ab079..a67b9da3b 100755 --- a/.travis/script.sh +++ b/.travis/script.sh @@ -7,7 +7,8 @@ python setup.py clean CFLAGS="-coverage" python setup.py build_ext --inplace python selftest.py -python setup.py test +python -m pytest -vx --cov PIL --cov-report term Tests + pushd /tmp/check-manifest && check-manifest --ignore ".coveragerc,.editorconfig,*.yml,*.yaml,tox.ini" && popd # Docs diff --git a/Tests/README.rst b/Tests/README.rst index 68c001fdd..44f6f4792 100644 --- a/Tests/README.rst +++ b/Tests/README.rst @@ -33,7 +33,7 @@ Or with coverage:: To run an individual test:: - pytest Tests/test_image.py + pytest -k Tests/test_image.py Run all the tests from the root of the Pillow source distribution:: diff --git a/setup.cfg b/setup.cfg index 4a1338396..8032517f6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,4 +3,4 @@ test=pytest [metadata] license_file = LICENSE [tool:pytest] -addopts = -vx --cov PIL --cov-report term Tests +addopts = -vx Tests From 0474d9dd0c87fed9ce5741adc68b5b7a1599c3fd Mon Sep 17 00:00:00 2001 From: wiredfool Date: Thu, 28 Dec 2017 10:18:20 +0000 Subject: [PATCH 18/23] src directories for pyflakes/pycodestyle --- .travis/after_success.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis/after_success.sh b/.travis/after_success.sh index 1026ce3c8..a18c095c9 100755 --- a/.travis/after_success.sh +++ b/.travis/after_success.sh @@ -17,10 +17,10 @@ codecov if [ "$DOCKER" == "" ]; then pip install pyflakes pycodestyle - pyflakes *.py | tee >(wc -l) - pyflakes PIL/*.py | tee >(wc -l) + pyflakes *.py | tee >(wc -l) + pyflakes src/PIL/*.py | tee >(wc -l) pyflakes Tests/*.py | tee >(wc -l) - pycodestyle --statistics --count PIL/*.py + pycodestyle --statistics --count src/PIL/*.py pycodestyle --statistics --count Tests/*.py fi From 1b89747726eceed685c281150754472601e11bd4 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Thu, 28 Dec 2017 10:20:51 +0000 Subject: [PATCH 19/23] No need to move PIL out of the way anymore in appveyor --- appveyor.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8e995e601..fe128f4a4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -67,7 +67,6 @@ build_script: $host.SetShouldExit(0) } - cd c:\pillow -- mv PIL PIL.temp - '%PYTHON%\%EXECUTABLE% selftest.py --installed' test_script: @@ -91,7 +90,6 @@ artifacts: before_deploy: - cd c:\pillow - - mv PIL.temp PIL - '%PYTHON%\%PIP_DIR%\pip.exe install wheel' - cd c:\pillow\winbuild\ - '%PYTHON%\%EXECUTABLE% c:\pillow\winbuild\build.py --wheel' From 7619018257b1ddf5e9bf483398cccee35e602047 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Thu, 28 Dec 2017 10:39:05 +0000 Subject: [PATCH 20/23] remove --installed tweaking in selftest.py --- selftest.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/selftest.py b/selftest.py index 324d23b45..3f358c583 100755 --- a/selftest.py +++ b/selftest.py @@ -5,15 +5,9 @@ from __future__ import print_function import sys import os -if "--installed" in sys.argv: - sys_path_0 = sys.path.pop(0) - from PIL import Image, ImageDraw, ImageFilter, ImageMath from PIL import features -if "--installed" in sys.argv: - sys.path.insert(0, sys_path_0) - try: Image.core.ping except ImportError as v: From 3dc01995ca973d47458e101464a4127720c25ae1 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Thu, 28 Dec 2017 10:52:39 +0000 Subject: [PATCH 21/23] Need to run install or develop for coverage --- .travis/script.sh | 6 +++--- Makefile | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis/script.sh b/.travis/script.sh index a67b9da3b..d6e02f01d 100755 --- a/.travis/script.sh +++ b/.travis/script.sh @@ -3,8 +3,8 @@ set -e coverage erase -python setup.py clean -CFLAGS="-coverage" python setup.py build_ext --inplace +make clean +make install-coverage python selftest.py python -m pytest -vx --cov PIL --cov-report term Tests @@ -12,4 +12,4 @@ python -m pytest -vx --cov PIL --cov-report term Tests pushd /tmp/check-manifest && check-manifest --ignore ".coveragerc,.editorconfig,*.yml,*.yaml,tox.ini" && popd # Docs -if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ]; then make install && make doccheck; fi +if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ]; then make doccheck; fi diff --git a/Makefile b/Makefile index bdf7ce9b4..dcba7d2e8 100644 --- a/Makefile +++ b/Makefile @@ -50,15 +50,15 @@ help: @echo " upload-test build and upload sdists to test.pythonpackages.com" inplace: clean - python setup.py build_ext --inplace + python setup.py develop build_ext --inplace install: python setup.py install - python selftest.py --installed + python selftest.py install-coverage: CFLAGS="-coverage" python setup.py build_ext install - python selftest.py --installed + python selftest.py debug: # make a debug version if we don't have a -dbg python. Leaves in symbols From 0c1f75876a26b9e1b5475a7352721f51690f75d9 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Thu, 28 Dec 2017 12:22:35 +0000 Subject: [PATCH 22/23] Use a specific docker tag image version --- .travis.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index d208c4165..1b8d854bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,17 +18,17 @@ matrix: - python: '3.5' - python: '3.4' - python: '3.7-dev' - - env: DOCKER="alpine" - - env: DOCKER="arch" # contains PyQt5 - - env: DOCKER="ubuntu-trusty-x86" - - env: DOCKER="ubuntu-xenial-amd64" - - env: DOCKER="debian-stretch-x86" - - env: DOCKER="centos-6-amd64" - - env: DOCKER="centos-7-amd64" - - env: DOCKER="amazon-1-amd64" - - env: DOCKER="amazon-2-amd64" - - env: DOCKER="fedora-26-amd64" - - env: DOCKER="fedora-27-amd64" + - env: DOCKER="alpine" DOCKER_TAG="pytest" + - env: DOCKER="arch" DOCKER_TAG="pytest" # contains PyQt5 + - env: DOCKER="ubuntu-trusty-x86" DOCKER_TAG="pytest" + - env: DOCKER="ubuntu-xenial-amd64" DOCKER_TAG="pytest" + - env: DOCKER="debian-stretch-x86" DOCKER_TAG="pytest" + - env: DOCKER="centos-6-amd64" DOCKER_TAG="pytest" + - env: DOCKER="centos-7-amd64" DOCKER_TAG="pytest" + - env: DOCKER="amazon-1-amd64" DOCKER_TAG="pytest" + - env: DOCKER="amazon-2-amd64" DOCKER_TAG="pytest" + - env: DOCKER="fedora-26-amd64" DOCKER_TAG="pytest" + - env: DOCKER="fedora-27-amd64" DOCKER_TAG="pytest" dist: trusty @@ -41,7 +41,7 @@ install: - if [ "$DOCKER" == "" ]; then .travis/install.sh; fi before_install: - - if [ "$DOCKER" ]; then docker pull pythonpillow/$DOCKER; fi + - if [ "$DOCKER" ]; then docker pull pythonpillow/$DOCKER:$DOCKER_TAG; fi before_script: # Qt needs a display for some of the tests, and it's only run on the system site packages install @@ -55,7 +55,7 @@ script: else # the Pillow user in the docker container is UID 1000 sudo chown -R 1000 $TRAVIS_BUILD_DIR - docker run -v $TRAVIS_BUILD_DIR:/Pillow pythonpillow/$DOCKER + docker run -v $TRAVIS_BUILD_DIR:/Pillow pythonpillow/$DOCKER:$DOCKER_TAG fi after_success: From ef5bab99b5fcd635c60a59771a6b4ec5d3965400 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Thu, 28 Dec 2017 16:07:18 +0000 Subject: [PATCH 23/23] fixed merge --- {libImaging => src/libImaging}/raqm.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {libImaging => src/libImaging}/raqm.h (100%) diff --git a/libImaging/raqm.h b/src/libImaging/raqm.h similarity index 100% rename from libImaging/raqm.h rename to src/libImaging/raqm.h