summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-01-29 13:10:47 +0100
committerMichał Górny <mgorny@gentoo.org>2022-01-29 13:10:47 +0100
commitffeb86f842f8662baec059775bb8a32156520c6e (patch)
tree0eba9a1ef375f3628e0f8f3cdf79a70f4bbbf858 /dev-python/fitsio
parentdev-python/bert: Switch to PEP 517 build (diff)
downloadgentoo-ffeb86f842f8662baec059775bb8a32156520c6e.tar.gz
gentoo-ffeb86f842f8662baec059775bb8a32156520c6e.tar.bz2
gentoo-ffeb86f842f8662baec059775bb8a32156520c6e.zip
dev-python/fitsio: Improve the ebuild
Enable system library via setup.cfg instead of sed-ing setup.py. Avoid unnecessarily copying files to run tests, it's sufficient to change the current directory. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/fitsio')
-rw-r--r--dev-python/fitsio/fitsio-1.1.7.ebuild15
1 files changed, 8 insertions, 7 deletions
diff --git a/dev-python/fitsio/fitsio-1.1.7.ebuild b/dev-python/fitsio/fitsio-1.1.7.ebuild
index 80ad81b256f8..238fbca619fb 100644
--- a/dev-python/fitsio/fitsio-1.1.7.ebuild
+++ b/dev-python/fitsio/fitsio-1.1.7.ebuild
@@ -23,14 +23,15 @@ RDEPEND="
"
BDEPEND="${RDEPEND}"
-src_prepare() {
- sed -e '/self.use_system_fitsio/s/False/True/' -i setup.py || die
-
- distutils-r1_src_prepare
+src_configure() {
+ cat >> setup.cfg <<-EOF || die
+ [build_ext]
+ use_system_fitsio = True
+ EOF
}
python_test() {
- cp -r -l -n fitsio "${BUILD_DIR}/lib" || die
- cd "${BUILD_DIR}/lib" || die
- ${EPYTHON} -c "import fitsio; exit(fitsio.test.test())" || die "Tests failed with ${EPYTHON}"
+ cd "${T}" || die
+ "${EPYTHON}" -c "import fitsio; exit(fitsio.test.test())" ||
+ die "Tests failed with ${EPYTHON}"
}