diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2022-11-10 21:18:38 +0200 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2022-11-10 21:20:25 +0200 |
commit | 82a820e1928aec58b1850addfb7767e5de14edf9 (patch) | |
tree | 0da2a9a8ec836bb0d8a19b50fb057db320009861 /sys-apps | |
parent | dev-python/lark: Stabilize 1.1.3 ppc64, #880785 (diff) | |
download | gentoo-82a820e1928aec58b1850addfb7767e5de14edf9.tar.gz gentoo-82a820e1928aec58b1850addfb7767e5de14edf9.tar.bz2 gentoo-82a820e1928aec58b1850addfb7767e5de14edf9.zip |
sys-apps/pkgcore: fix sys.prefix testing
Closes: https://bugs.gentoo.org/880693
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/pkgcore/files/pkgcore-0.12.17-fix-prefix.patch | 18 | ||||
-rw-r--r-- | sys-apps/pkgcore/pkgcore-0.12.17-r1.ebuild (renamed from sys-apps/pkgcore/pkgcore-0.12.17.ebuild) | 15 | ||||
-rw-r--r-- | sys-apps/pkgcore/pkgcore-9999.ebuild | 15 |
3 files changed, 22 insertions, 26 deletions
diff --git a/sys-apps/pkgcore/files/pkgcore-0.12.17-fix-prefix.patch b/sys-apps/pkgcore/files/pkgcore-0.12.17-fix-prefix.patch new file mode 100644 index 000000000000..917e6323f6f8 --- /dev/null +++ b/sys-apps/pkgcore/files/pkgcore-0.12.17-fix-prefix.patch @@ -0,0 +1,18 @@ +--- a/py_build.py ++++ b/py_build.py +@@ -28,12 +28,12 @@ def write_pkgcore_lookup_configs(cleanup_files): + with open(path, "w") as f: + os.chmod(path, 0o644) + f.write(textwrap.dedent("""\ +- from os.path import join, abspath ++ from os.path import abspath, exists, join + import sys + +- from snakeoil import process +- + INSTALL_PREFIX = abspath(sys.prefix) ++ if not exists(join(INSTALL_PREFIX, 'lib/pkgcore')): ++ INSTALL_PREFIX = abspath(sys.base_prefix) + DATA_PATH = join(INSTALL_PREFIX, 'share/pkgcore') + CONFIG_PATH = join(DATA_PATH, 'config') + LIBDIR_PATH = join(INSTALL_PREFIX, 'lib/pkgcore') diff --git a/sys-apps/pkgcore/pkgcore-0.12.17.ebuild b/sys-apps/pkgcore/pkgcore-0.12.17-r1.ebuild index 727dcbf220de..9f732afa4d66 100644 --- a/sys-apps/pkgcore/pkgcore-0.12.17.ebuild +++ b/sys-apps/pkgcore/pkgcore-0.12.17-r1.ebuild @@ -38,20 +38,11 @@ BDEPEND=" ) " -distutils_enable_tests pytest - -EPYTEST_DESELECT=( - # fail because of forcing Gentoo's prefix - tests/ebuild/test_eapi.py::TestEAPI::test_register - tests/ebuild/test_eapi.py::TestEAPI::test_is_supported +PATCHES=( + "${FILESDIR}/${PN}-0.12.17-fix-prefix.patch" ) -src_prepare() { - # force Gentoo's prefix - sed -e "/INSTALL_PREFIX =/s@= .*\$@= '${EPREFIX}/usr'@" -i py_build.py || die - - distutils-r1_src_prepare -} +distutils_enable_tests pytest python_install_all() { local DOCS=( NEWS.rst ) diff --git a/sys-apps/pkgcore/pkgcore-9999.ebuild b/sys-apps/pkgcore/pkgcore-9999.ebuild index ad37b266d812..a25e0809c909 100644 --- a/sys-apps/pkgcore/pkgcore-9999.ebuild +++ b/sys-apps/pkgcore/pkgcore-9999.ebuild @@ -40,21 +40,8 @@ BDEPEND=" distutils_enable_tests pytest -EPYTEST_DESELECT=( - # fail because of forcing Gentoo's prefix - tests/ebuild/test_eapi.py::TestEAPI::test_register - tests/ebuild/test_eapi.py::TestEAPI::test_is_supported -) - -src_prepare() { - # force Gentoo's prefix - sed -e "/INSTALL_PREFIX =/s@= .*\$@= '${EPREFIX}/usr'@" -i py_build.py || die - - distutils-r1_src_prepare -} - python_install_all() { local DOCS=( NEWS.rst ) - [[ ${PV} == *9999 ]] || doman man/* + [[ ${PV} == *9999 ]] || doman build/sphinx/man/* distutils-r1_python_install_all } |