Skip to content

Commit

Permalink
dev-python/fonttools: Make Cython extensions optional
Browse files Browse the repository at this point in the history
Sponsored-by: Ex Makhina, Inc. <[email protected]>
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Nov 17, 2023
1 parent 8c3b4df commit b810a9f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions dev-python/fonttools/fonttools-4.44.3.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ SRC_URI="
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos"
IUSE="+native-extensions"

RDEPEND="
>=dev-python/fs-2.4.9[${PYTHON_USEDEP}]
"
BDEPEND="
dev-python/cython[${PYTHON_USEDEP}]
native-extensions? (
dev-python/cython[${PYTHON_USEDEP}]
)
test? (
dev-python/brotlicffi[${PYTHON_USEDEP}]
app-arch/zopfli
Expand All @@ -55,8 +58,9 @@ python_prepare_all() {
distutils-r1_python_prepare_all
}

src_configure() {
export FONTTOOLS_WITH_CYTHON=1
python_compile() {
local -x FONTTOOLS_WITH_CYTHON=$(usex native-extensions)
distutils-r1_python_compile
}

src_test() {
Expand Down

0 comments on commit b810a9f

Please sign in to comment.