Python Imaging Library (Fork)
Go to file
James Le Cuirot 774d7a570d
Fix cross-compiling by searching the right lib and include directories
We were previously searching the `{sys.prefix}/lib` and
`{sys.prefix}/include` directories unconditionally. This is problematic
when cross-compiling, as it does not take account of any sysroot where
alternative libraries and headers are located. Adding `-I/usr/include`
causes the build to explode, at least when cross-compiling from 64-bit
to 32-bit.

Python does not officially support cross-compiling, but Gentoo achieves
this by modifying the sysconfig variables like `LIBDIR` and `INCLUDEDIR`
with great results.

Assuming "lib" is bad. 64-bit Linux systems often use lib64, putting
32-bit libraries under lib. You cannot assume that either though, as
pure 64-bit Linux systems may just use lib instead. Things get even
stranger on RISC-V.

The value of `sys.prefix` changes when using a virtualenv. Dependencies
may be installed here, so it does make sense to continue supporting this
case, even if it is incompatible with cross-compiling. Unlike regular
environments, "lib" is generally used for libraries, although a lib64
symlink may also be present.
2023-12-25 11:16:37 +00:00
_custom_build Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
.ci Install cibuildwheel from requirements file 2023-11-28 13:12:42 +02:00
.github Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
depends Updated libimagequant to 4.2.2 2023-10-14 11:56:23 +11:00
docs Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
src Add 'from __future__ import annotations' using Ruff/isort 2023-12-22 23:06:35 +11:00
Tests Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
wheels Updated README after cibuildwheel integration [ci skip] 2023-11-25 21:56:23 +11:00
winbuild Updated lcms2 to 2.16 2023-12-04 08:32:39 +11:00
.appveyor.yml Updated AppVeyor to Python 3.12 2023-10-31 12:44:53 +11:00
.clang-format Adjust clang-format style 2021-01-03 14:16:42 +11:00
.coveragerc Removed unnecessary line 2020-01-03 16:40:31 +11:00
.editorconfig editorconfig: specify 2-space indent for TOML 2023-11-06 12:42:44 +02:00
.gitattributes Set EPS test files as binary 2018-12-29 21:53:07 -08:00
.gitignore Updated test images origin 2023-02-08 10:01:10 +11:00
.gitmodules Updated wheel build process for new location 2023-09-24 22:51:42 +10:00
.pre-commit-config.yaml Update pre-commit to fix Sphinx Lint 2023-12-12 19:01:30 +02:00
.readthedocs.yml Use latest version of Python 2023-12-09 09:09:49 +11:00
.travis.yml specify build config settings in pyproject.toml 2023-11-28 14:20:57 +01:00
CHANGES.rst Update CHANGES.rst [ci skip] 2023-12-21 22:08:38 +11:00
codecov.yml Restored 32-bit support 2023-06-27 14:43:58 +10:00
conftest.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
LICENSE Update HPND wording in LICENSE file 2023-02-09 23:23:29 +01:00
Makefile Black infers target-version from requires-python in pyproject.toml 2023-11-11 16:49:04 +11:00
MANIFEST.in Switch linting to ruff 2023-11-06 12:43:14 +02:00
pyproject.toml Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:07 +02:00
README.md Updated redirected links 2023-10-07 23:08:02 +11:00
RELEASING.md All GitHub Actions wheels are now in the "Wheels" workflow 2023-12-02 13:18:13 +11:00
selftest.py Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
setup.py Fix cross-compiling by searching the right lib and include directories 2023-12-25 11:16:37 +00:00
tox.ini Add NumPy to tox for mypy 2023-12-19 11:25:42 +02:00

Pillow logo

Pillow

Python Imaging Library (Fork)

Pillow is the friendly PIL fork by Jeffrey A. Clark (Alex) and contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. As of 2019, Pillow development is supported by Tidelift.

docs Documentation Status
tests GitHub Actions build status (Lint) GitHub Actions build status (Test Linux and macOS) GitHub Actions build status (Test Windows) GitHub Actions build status (Test MinGW) GitHub Actions build status (Test Cygwin) GitHub Actions build status (Test Docker) AppVeyor CI build status (Windows) GitHub Actions build status (Wheels) Travis CI wheels build status (aarch64) Code coverage Fuzzing Status
package Zenodo Tidelift Newest PyPI version Number of PyPI downloads OpenSSF Best Practices
social Join the chat at https://gitter.im/python-pillow/Pillow Follow on https://twitter.com/PythonPillow Follow on https://fosstodon.org/@pillow

Overview

The Python Imaging Library adds image processing capabilities to your Python interpreter.

This library provides extensive file format support, an efficient internal representation, and fairly powerful image processing capabilities.

The core image library is designed for fast access to data stored in a few basic pixel formats. It should provide a solid foundation for a general image processing tool.

More Information

Report a Vulnerability

To report a security vulnerability, please follow the procedure described in the Tidelift security policy.