Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/fitsio/
Date: Sat, 29 Jan 2022 12:11:03
Message-Id: 1643458247.ffeb86f842f8662baec059775bb8a32156520c6e.mgorny@gentoo
1 commit: ffeb86f842f8662baec059775bb8a32156520c6e
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 29 12:10:47 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 29 12:10:47 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ffeb86f8
7
8 dev-python/fitsio: Improve the ebuild
9
10 Enable system library via setup.cfg instead of sed-ing setup.py.
11 Avoid unnecessarily copying files to run tests, it's sufficient
12 to change the current directory.
13
14 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
15
16 dev-python/fitsio/fitsio-1.1.7.ebuild | 15 ++++++++-------
17 1 file changed, 8 insertions(+), 7 deletions(-)
18
19 diff --git a/dev-python/fitsio/fitsio-1.1.7.ebuild b/dev-python/fitsio/fitsio-1.1.7.ebuild
20 index 80ad81b256f8..238fbca619fb 100644
21 --- a/dev-python/fitsio/fitsio-1.1.7.ebuild
22 +++ b/dev-python/fitsio/fitsio-1.1.7.ebuild
23 @@ -23,14 +23,15 @@ RDEPEND="
24 "
25 BDEPEND="${RDEPEND}"
26
27 -src_prepare() {
28 - sed -e '/self.use_system_fitsio/s/False/True/' -i setup.py || die
29 -
30 - distutils-r1_src_prepare
31 +src_configure() {
32 + cat >> setup.cfg <<-EOF || die
33 + [build_ext]
34 + use_system_fitsio = True
35 + EOF
36 }
37
38 python_test() {
39 - cp -r -l -n fitsio "${BUILD_DIR}/lib" || die
40 - cd "${BUILD_DIR}/lib" || die
41 - ${EPYTHON} -c "import fitsio; exit(fitsio.test.test())" || die "Tests failed with ${EPYTHON}"
42 + cd "${T}" || die
43 + "${EPYTHON}" -c "import fitsio; exit(fitsio.test.test())" ||
44 + die "Tests failed with ${EPYTHON}"
45 }