-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
144 lines (111 loc) · 4 KB
/
pyproject.toml
File metadata and controls
144 lines (111 loc) · 4 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "chafa.py"
version = "1.2.0"
license = "LGPL-3.0"
authors = [
{ name="Erica Ferrua Edwardsdóttir", email="e@mage.black" }
]
description = "Python bindings for Chafa. Visualize images with text in python. "
readme = "README.md"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Operating System :: Unix",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS"
]
[project.urls]
"Homepage" = "https://chafapy.mage.black"
"Source" = "https://github.com/guardkenzie/chafa.py"
"Bug Tracker" = "https://github.com/guardkenzie/chafa.py/issues"
[tool.cibuildwheel]
build = "cp3*-*"
skip = ["*-manylinux_i686", "*-musllinux_*", "*-win32", "cp38-macosx_arm64"]
test-skip = "cp38-macosx*"
environment-pass = "CHAFA_VERSION"
manylinux-x86_64-image = "manylinux_2_28"
manylinux-aarch64-image = "manylinux_2_28"
test-requires = ["pytest", "Pillow"]
test-command = "pytest -rP {package}/tests"
[tool.cibuildwheel.linux]
before-all = [
"dnf group install -y 'Development Tools'",
"dnf install -y epel-release",
"dnf install -y ImageMagick-devel glib2-devel pkgconf-pkg-config",
"cd libs",
"git clone --branch $CHAFA_VERSION https://github.com/hpjansson/chafa libchafa_src",
"cd libchafa_src",
"mkdir m4",
"cp /usr/share/aclocal/pkg.m4 m4/",
"./autogen.sh --without-tools",
"make",
"cd ../",
"cp libchafa_src/chafa/.libs/*chafa.so linux/"
]
repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}"
# [[tool.cibuildwheel.overrides]]
# select = "*linux_aarch64"
# before-all = [
# "yum group install -y 'Development Tools'",
# "yum install -y epel-release",
# "yum install -y ImageMagick-devel",
# "cd libs",
# "git clone --branch $CHAFA_VERSION https://github.com/hpjansson/chafa libchafa_src",
# "cd libchafa_src",
# "mkdir m4",
# "cp /usr/share/aclocal/pkg.m4 m4/",
# "./autogen.sh --without-tools",
# "make",
# "cd ../",
# "cp libchafa_src/chafa/.libs/*chafa.so linux/"
# ]
[tool.cibuildwheel.macos]
environment = { MACOSX_DEPLOYMENT_TARGET="13.0" }
before-all = [
"NONINTERACTIVE=1 /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"",
"brew install --force --overwrite make python@3.12 imagemagick libtool pkg-config glib automake",
"ln -s $(which glibtoolize) /usr/local/bin/libtoolize",
"git clone --branch $CHAFA_VERSION https://github.com/hpjansson/chafa libchafa_src",
"cd libchafa_src",
"./autogen.sh --without-tools",
"gmake",
"cd ..",
"cp libchafa_src/chafa/.libs/*chafa*.dylib libs/macos"
]
test-command = "MAGICK_HOME=/usr/local/Cellar/imagemagick/ pytest -rP {package}/tests"
[[tool.cibuildwheel.overrides]]
select = "*macosx_arm64"
environment = { MACOSX_DEPLOYMENT_TARGET="14.0" }
before-all = [
"brew install make libtool pkg-config glib automake imagemagick",
"sudo ln -s $(which glibtoolize) /usr/local/bin/libtoolize",
"git clone --branch $CHAFA_VERSION https://github.com/hpjansson/chafa libchafa_src",
"cd libchafa_src",
"./autogen.sh --without-tools",
"make",
"cd ..",
"cp libchafa_src/chafa/.libs/*chafa*.dylib libs/macos"
]
test-command = "MAGICK_HOME=/opt/homebrew/Cellar/imagemagick pytest -rP {package}/tests"
[tool.cibuildwheel.windows]
before-all = [
"cp libchafa_src\\chafa\\.libs\\libchafa-0.dll libs\\windows\\"
]
test-command = "pytest -rP {package}/tests/0_PIL_test.py {package}/tests/2_raw_test.py {package}/tests/3_capabilities_test.py {package}/tests/4_new_similar_test.py"
[tool.hatch.build]
exclude = [
".github",
"wheelhouse",
".cirrus.yml"
]
[tool.hatch.build.targets.wheel]
packages=["src/chafa"]
strict-naming = false
macos-max-compat = false
[tool.hatch.build.targets.sdist]
strict-naming = false
[tool.hatch.build.targets.wheel.hooks.custom]