1
0
flewkey-overlay/dev-python/soxr/soxr-9999.ebuild

54 lines
1.2 KiB
Bash
Raw Normal View History

2023-03-27 00:41:17 -04:00
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
2023-10-28 18:45:17 -04:00
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
2023-10-28 18:45:17 -04:00
PYTHON_COMPAT=( python3_{8..12} )
inherit distutils-r1
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/dofuuz/python-soxr.git"
EGIT_SUBMODULES=()
else
MY_PN="python-soxr"
MY_P="${MY_PN}-${PV}"
S="${WORKDIR}/${MY_P}"
SRC_URI="https://github.com/dofuuz/python-soxr/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
KEYWORDS="~amd64"
fi
DESCRIPTION="Resampling library for Python"
HOMEPAGE="https://github.com/dofuuz/python-soxr"
LICENSE="LGPL-2.1"
SLOT="0"
DEPEND="media-libs/soxr"
RDEPEND="
${DEPEND}
dev-python/numpy[${PYTHON_USEDEP}]
"
2023-03-27 00:41:17 -04:00
BDEPEND="
dev-python/cython[${PYTHON_USEDEP}]
dev-python/setuptools-scm[${PYTHON_USEDEP}]
"
src_configure() {
DISTUTILS_ARGS=( --use-system-libsoxr )
}
python_prepare_all() {
# https://github.com/cython/cython/issues/3783
sed -i 's/const datatype_t/datatype_t/g' "${S}/src/soxr/cysoxr.pyx"
distutils-r1_python_prepare_all
}
python_compile() {
SETUPTOOLS_SCM_PRETEND_VERSION="${PV}" distutils-r1_python_compile
}
distutils_enable_tests pytest