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.yml b/.travis.yml index ef7adc63d..1b8d854bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,19 +17,18 @@ 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 - - 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 @@ -42,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 @@ -56,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: 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 diff --git a/.travis/install.sh b/.travis/install.sh index 64ce477f7..cad0e3c32 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -8,11 +8,12 @@ sudo apt-get -qq install libfreetype6-dev liblcms2-dev python-tk\ libharfbuzz-dev libfribidi-dev pip install cffi -pip install nose pip install check-manifest -pip install olefile -pip install pyroma pip install coverage +pip install olefile +pip install -U pytest +pip install -U pytest-cov +pip install pyroma pip install test-image-results # docs only on Python 2.7 diff --git a/.travis/script.sh b/.travis/script.sh index e1d522122..d6e02f01d 100755 --- a/.travis/script.sh +++ b/.travis/script.sh @@ -3,12 +3,13 @@ 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 -coverage run --append --include=PIL/* selftest.py -coverage run --append --include=PIL/* -m nose -vx Tests/test_*.py 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/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/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/Makefile b/Makefile index d27afaa0b..dcba7d2e8 100644 --- a/Makefile +++ b/Makefile @@ -15,12 +15,9 @@ co: done coverage: - coverage erase - coverage run --parallel-mode --include=PIL/* selftest.py - nosetests --with-cov --cov='PIL/' --cov-report=html Tests/test_*.py -# 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: @@ -53,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 @@ -81,9 +78,9 @@ 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 + python -m pytest -qq check-manifest pyroma . viewdoc @@ -92,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/Tests/README.rst b/Tests/README.rst index 0985e0f26..44f6f4792 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 @@ -34,11 +33,8 @@ Or with coverage:: To run an individual test:: - ./test-installed.py Tests/test_image.py + pytest -k Tests/test_image.py Run all the tests from the root of the Pillow source distribution:: - ./test-installed.py - - - + pytest diff --git a/Tests/helper.py b/Tests/helper.py index b8b44b6f2..fdeb00c0c 100644 --- a/Tests/helper.py +++ b/Tests/helper.py @@ -63,9 +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) + except AttributeError: # for pytest + ok = True if ok: # only clean out tempfiles if test passed @@ -210,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]) @@ -256,8 +251,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() 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 d966c88ff..fe128f4a4 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 @@ -69,13 +67,17 @@ build_script: $host.SetShouldExit(0) } - cd c:\pillow -- mv PIL PIL.temp - '%PYTHON%\%EXECUTABLE% selftest.py --installed' 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-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 @@ -88,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' diff --git a/docs/installation.rst b/docs/installation.rst index 2d0ad8764..3ed48f413 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 < 5.0.0 supports Python versions 2.7, 3.3, 3.4, 3.5, 3.6 + +.. note:: Pillow >= 5.0.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/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 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/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) 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 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: diff --git a/setup.cfg b/setup.cfg index 0c9e0fc14..8032517f6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,6 @@ +[aliases] +test=pytest [metadata] license_file = LICENSE +[tool:pytest] +addopts = -vx Tests diff --git a/setup.py b/setup.py index 9319b7372..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 @@ -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, @@ -770,19 +773,20 @@ 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, - packages=find_packages(), - test_suite='nose.collector', + 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 50% rename from PIL/version.py rename to src/PIL/version.py index 0718fd601..b89052c73 100644 --- a/PIL/version.py +++ b/src/PIL/version.py @@ -1,2 +1,2 @@ # Master version for Pillow -__version__ = '4.4.0.dev0' +__version__ = '5.0.0.dev0' 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/libImaging/raqm.h b/src/libImaging/raqm.h similarity index 100% rename from libImaging/raqm.h rename to src/libImaging/raqm.h 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 diff --git a/test-installed.py b/test-installed.py deleted file mode 100755 index c5aff1360..000000000 --- a/test-installed.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python -import nose -import os -import sys -import glob - -# 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 arg in sys.argv[1:]: - if '.py' in arg: - break -else: - 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 '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') - -if __name__ == '__main__': - nose.main() 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 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/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' 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'