-
Notifications
You must be signed in to change notification settings - Fork 616
Expand file tree
/
Copy pathcibuildwheel.toml
More file actions
78 lines (62 loc) · 3.54 KB
/
cibuildwheel.toml
File metadata and controls
78 lines (62 loc) · 3.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
[tool.cibuildwheel]
[tool.cibuildwheel.linux]
manylinux-x86_64-image = "mtgupf/essentia-builds:manylinux2014_x86_64"
manylinux-i686-image = "mtgupf/essentia-builds:manylinux2014_i686"
# Skip selectors:
# - cp38: project does not target Python 3.8.
# - *t-*: free-threaded (no-GIL) builds. The Essentia C bindings rely on
# legacy PyTypeObject definitions that fail to instantiate under
# cp313t/cp314t ("Type does not define the tp_name field"). Re-enable
# once the bindings are audited for free-threading compatibility.
# - *-musllinux*, *i686: not supported by our manylinux2014 build images.
skip = ["*cp38*", "*t-*", "*-musllinux*", "*i686"]
environment = { PROJECT_NAME="essentia", ESSENTIA_PROJECT_NAME="${PROJECT_NAME}", ESSENTIA_WHEEL_SKIP_3RDPARTY=1, ESSENTIA_WHEEL_ONLY_PYTHON=1 }
# Use system's Python3 to build Essentia.
before-all = [
"python3 waf configure --with-gaia --build-static --static-dependencies --pkg-config-path=\"${PKG_CONFIG_PATH}\"",
"python3 waf",
"python3 waf install",
]
test-command = "python -c 'import essentia; import essentia.standard; import essentia.streaming; from essentia.standard import MonoLoader, MetadataReader, YamlInput, Chromaprinter'"
[tool.cibuildwheel.macos]
# See linux section for skip rationale.
skip = ["*cp38*", "*t-*"]
environment = { PROJECT_NAME="essentia", ESSENTIA_PROJECT_NAME="${PROJECT_NAME}", ESSENTIA_WHEEL_SKIP_3RDPARTY=1, ESSENTIA_WHEEL_ONLY_PYTHON=1, MACOSX_DEPLOYMENT_TARGET=15.0 }
before-all = [
"brew install pkg-config gcc readline sqlite gdbm freetype libpng",
"brew install eigen libyaml fftw ffmpeg libsamplerate libtag chromaprint",
#"brew tap MTG/essentia",
#"brew install gaia --HEAD",
# Override VIRTUAL_ENV set by cibuildwheel to ensure global install
"VIRTUAL_ENV=/usr/local python waf configure --pkg-config-path=\"${PKG_CONFIG_PATH}\"",
"python waf",
"python waf install"
]
test-command = "python -c 'import essentia; import essentia.standard; import essentia.streaming; from essentia.standard import MonoLoader, MetadataReader, YamlInput, Chromaprinter'"
[[tool.cibuildwheel.overrides]]
select = "*macosx_arm64*"
# See linux section for skip rationale.
skip = ["*cp38*", "*t-*"]
environment = { PROJECT_NAME="essentia", ESSENTIA_PROJECT_NAME="${PROJECT_NAME}", ESSENTIA_WHEEL_SKIP_3RDPARTY=1, ESSENTIA_WHEEL_ONLY_PYTHON=1, ESSENTIA_MACOSX_ARM64=1, MACOSX_DEPLOYMENT_TARGET=15.0 }
before-all = [
"brew install pkg-config gcc readline sqlite gdbm libpng",
"brew install eigen libyaml fftw ffmpeg libsamplerate libtag chromaprint",
# Override VIRTUAL_ENV set by cibuildwheel to ensure global install
"VIRTUAL_ENV=/usr/local python waf configure --pkg-config-path=\"${PKG_CONFIG_PATH}\" --arch arm64 --no-msse",
"python waf",
"sudo python waf install",
]
# On Mac arm64, libavcodec.56.60.100, libavformat.56.40.101 and
# libavutil.54.31.100, depend on libSDL1.2-compat, which is a compatibility
# layer for SDL2. libSDL1.2-compat expects SDL2 to be installed in the default
# brew location (i.e., /opt/homebrew/opt/sdl2/lib), so the user would need to
# install it via brew manually. Alternativelly, we can manualy copy the SDL2
# libs into the wheel. This is a temporary solution, and in the long term we
# should move to FFmpeg > 2.X.
repair-wheel-command = [
"delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}",
"mkdir -p {dest_dir}/essentia/.dylibs",
"cp /opt/homebrew/opt/sdl2/lib/libSDL2*.dylib {dest_dir}/essentia/.dylibs",
"wheel_rel=$(echo {wheel} | grep -o '[^/]*$')",
"cd {dest_dir} && zip -u {dest_dir}/$wheel_rel essentia/.dylibs/*"
]