mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
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>
This commit is contained in:
@@ -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}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user