mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-25 21:08:35 -07:00
dev-python/packaging: force distutils
Package-Manager: Portage-2.3.3_p42_p433273, Repoman-2.3.1_p35_p433273
This commit is contained in:
14
dev-python/packaging/files/packaging-16.8-distutils.patch
Normal file
14
dev-python/packaging/files/packaging-16.8-distutils.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -13,10 +13,7 @@ import re
|
||||
# dependency when projects attempt to unbundle stuff from setuptools and pip.
|
||||
# Though we don't really support that, it makes things easier if we do this and
|
||||
# should hopefully cause less issues for end users.
|
||||
-try:
|
||||
- from setuptools import setup
|
||||
-except ImportError:
|
||||
- from distutils.core import setup
|
||||
+from distutils.core import setup
|
||||
|
||||
|
||||
base_dir = os.path.dirname(__file__)
|
||||
@@ -17,18 +17,36 @@ LICENSE="|| ( Apache-2.0 BSD-2 )"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="test"
|
||||
|
||||
RDEPEND=""
|
||||
DEPEND="${RDEPEND}
|
||||
RDEPEND="
|
||||
>=dev-python/pyparsing-2.1.10[${PYTHON_USEDEP}]
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
"
|
||||
DEPEND="
|
||||
test? (
|
||||
dev-python/pretend[${PYTHON_USEDEP}]
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
PDEPEND="
|
||||
dev-python/pyparsing[${PYTHON_USEDEP}]
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-16.8-distutils.patch"
|
||||
)
|
||||
|
||||
python_test() {
|
||||
py.test --capture=no --strict -v || die
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# https://bugs.gentoo.org/585146
|
||||
cd "${HOME}" || die
|
||||
|
||||
_cleanup() {
|
||||
local pyver=$("${PYTHON}" -c "from distutils.sysconfig import get_python_version; print(get_python_version())")
|
||||
local egginfo="${ROOT%/}$(python_get_sitedir)/${P}-py${pyver}.egg-info"
|
||||
if [[ -d ${egginfo} ]]; then
|
||||
echo rm -r "${egginfo}"
|
||||
rm -r "${egginfo}" || die "Failed to remove egg-info directory"
|
||||
fi
|
||||
}
|
||||
python_foreach_impl _cleanup
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user