mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-05 06:00:58 +03:00
Disable platform guessing instead of adding dependencies-prefix
This commit is contained in:
parent
681a03b1c3
commit
378df7a5b2
|
@ -95,8 +95,8 @@ before-all = ".github/workflows/wheels-dependencies.sh"
|
|||
build-verbosity = 1
|
||||
|
||||
config-settings = "raqm=enable raqm=vendor fribidi=vendor imagequant=disable"
|
||||
# Add an explicit dependencies prefix for macOS.
|
||||
macos.config-settings = "raqm=enable raqm=vendor fribidi=vendor imagequant=disable dependencies-prefix=./build/deps/darwin"
|
||||
# Disable platform guessing on macOS
|
||||
macos.config-settings = "raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable"
|
||||
|
||||
test-command = "cd {project} && .github/workflows/wheels-test.sh"
|
||||
test-extras = "tests"
|
||||
|
|
13
setup.py
13
setup.py
|
@ -344,11 +344,6 @@ class pil_build_ext(build_ext):
|
|||
for x in ("raqm", "fribidi")
|
||||
]
|
||||
+ [
|
||||
(
|
||||
"dependencies-prefix",
|
||||
None,
|
||||
"The prefix where build dependencies are located.",
|
||||
),
|
||||
("disable-platform-guessing", None, "Disable platform guessing on Linux"),
|
||||
("debug", None, "Debug logging"),
|
||||
]
|
||||
|
@ -360,7 +355,6 @@ class pil_build_ext(build_ext):
|
|||
return True if value in configuration.get(option, []) else None
|
||||
|
||||
def initialize_options(self) -> None:
|
||||
self.dependencies_prefix = configuration.get("dependencies-prefix", [])
|
||||
self.disable_platform_guessing = self.check_configuration(
|
||||
"platform-guessing", "disable"
|
||||
)
|
||||
|
@ -570,13 +564,6 @@ class pil_build_ext(build_ext):
|
|||
)
|
||||
|
||||
elif sys.platform == "darwin":
|
||||
if self.dependencies_prefix:
|
||||
# Use the explicitly provided prefixes for dependencies.
|
||||
for prefix in self.dependencies_prefix:
|
||||
_add_directory(library_dirs, os.path.join(prefix, "lib"))
|
||||
_add_directory(include_dirs, os.path.join(prefix, "include"))
|
||||
else:
|
||||
# Guess the dependency locations based on homebrew/fink/macports
|
||||
# attempt to make sure we pick freetype2 over other versions
|
||||
_add_directory(include_dirs, "/sw/include/freetype2")
|
||||
_add_directory(include_dirs, "/sw/lib/freetype2/include")
|
||||
|
|
Loading…
Reference in New Issue
Block a user