diff --git a/pyproject.toml b/pyproject.toml index 47744ba2..ba20815a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,6 +4,42 @@ requires = [ "wheel", ] +[tool.cibuildwheel] +build-verbosity = "2" +build = ["cp38-* cp39-* cp310-* cp311-* cp312-* pp38-* pp39-* pp310-*"] +skip = ["cp36-* cp37-* pp37-*"] +test-extras = "tests-min" +test-command = "pytest {project}" +before-test = [ + "pip install --prefer-binary pillow", + "pip install --only-binary=:all: numpy || true", + "pip install pympler || true", +] + +[tool.cibuildwheel.macos] +before-all = [ + "brew install libjpeg little-cms2", + "brew uninstall --force --ignore-dependencies libheif aom", + "HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install --formula {project}/libheif/macos/libheif.rb", + "HOMEBREW_PREFIX=$(brew --prefix)", + "REPAIR_LIBRARY_PATH=$HOMEBREW_PREFIX/lib", +] +repair-wheel-command = [ + "DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-listdeps {wheel}", + "DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel -v --require-archs {delocate_archs} -w {dest_dir} {wheel}", +] +test-skip = "cp38-macosx_arm64" + +[tool.cibuildwheel.windows] +before-build = [ + "pip install delvewheel", +] + +[tool.cibuildwheel.linux] +musllinux-i686-image = "musllinux_1_2" +musllinux-x86_64-image = "musllinux_1_2" +musllinux-aarch64-image = "musllinux_1_2" + [tool.black] line-length = 120 target-versions = ["py38"] @@ -33,6 +69,26 @@ max-complexity = 16 [tool.isort] profile = "black" +[tool.pylint] +master.py-version = "3.8" +master.extension-pkg-allow-list = ["_pillow_heif"] +design.max-attributes = 9 +design.max-branches = 16 +design.max-locals = 18 +design.max-returns = 8 +similarities.min-similarity-lines = 6 +basic.good-names = [ + "a", "b", "c", "d", "e", "f", "i", "j", "k", "v", + "ex", "_", "fp", "im", "HeifImagePlugin", "AvifImagePlugin", +] +reports.output-format = "colorized" +similarities.ignore-imports = "yes" +messages_control.disable = [ + "missing-class-docstring", + "missing-function-docstring", + "line-too-long", +] + [tool.pytest.ini_options] minversion = "6.0" testpaths = [ @@ -62,59 +118,3 @@ ignore_missing_imports = true warn_no_return = true strict_optional = true show_error_codes = true - -[tool.pylint] -master.py-version = "3.8" -master.extension-pkg-allow-list = ["_pillow_heif"] -design.max-attributes = 9 -design.max-branches = 16 -design.max-locals = 18 -design.max-returns = 8 -similarities.min-similarity-lines = 6 -basic.good-names = [ - "a", "b", "c", "d", "e", "f", "i", "j", "k", "v", - "ex", "_", "fp", "im", "HeifImagePlugin", "AvifImagePlugin", -] -reports.output-format = "colorized" -similarities.ignore-imports = "yes" -messages_control.disable = [ - "missing-class-docstring", - "missing-function-docstring", - "line-too-long", -] - -[tool.cibuildwheel] -build-verbosity = "2" -build = ["cp38-* cp39-* cp310-* cp311-* cp312-* pp38-* pp39-* pp310-*"] -skip = ["cp36-* cp37-* pp37-*"] -test-extras = "tests-min" -test-command = "pytest {project}" -before-test = [ - "pip install --prefer-binary pillow", - "pip install --only-binary=:all: numpy || true", - "pip install pympler || true", -] - -[tool.cibuildwheel.macos] -before-all = [ - "brew install libjpeg little-cms2", - "brew uninstall --force --ignore-dependencies libheif aom", - "HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install --formula {project}/libheif/macos/libheif.rb", - "HOMEBREW_PREFIX=$(brew --prefix)", - "REPAIR_LIBRARY_PATH=$HOMEBREW_PREFIX/lib", -] -repair-wheel-command = [ - "DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-listdeps {wheel}", - "DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel -v --require-archs {delocate_archs} -w {dest_dir} {wheel}", -] -test-skip = "cp38-macosx_arm64" - -[tool.cibuildwheel.windows] -before-build = [ - "pip install delvewheel", -] - -[tool.cibuildwheel.linux] -musllinux-i686-image = "musllinux_1_2" -musllinux-x86_64-image = "musllinux_1_2" -musllinux-aarch64-image = "musllinux_1_2"