public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [gentoo-commits] repo/gentoo:master commit in: dev-python/packaging/files/, dev-python/packaging/
@ 2017-01-31  4:44 99% Mike Gilbert
  0 siblings, 0 replies; 1+ results
From: Mike Gilbert @ 2017-01-31  4:44 UTC (permalink / raw
  To: gentoo-commits

commit:     63207c8570eafab4e274685d9c62c0f19dd21a23
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 31 04:39:38 2017 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Jan 31 04:44:00 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63207c85

dev-python/packaging: force distutils

Package-Manager: Portage-2.3.3_p42_p433273, Repoman-2.3.1_p35_p433273

 .../packaging/files/packaging-16.8-distutils.patch | 14 ++++++++++
 dev-python/packaging/packaging-16.8.ebuild         | 30 +++++++++++++++++-----
 2 files changed, 38 insertions(+), 6 deletions(-)

diff --git a/dev-python/packaging/files/packaging-16.8-distutils.patch b/dev-python/packaging/files/packaging-16.8-distutils.patch
new file mode 100644
index 00000000..84bbb61
--- /dev/null
+++ b/dev-python/packaging/files/packaging-16.8-distutils.patch
@@ -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__)

diff --git a/dev-python/packaging/packaging-16.8.ebuild b/dev-python/packaging/packaging-16.8.ebuild
index 993971d..0a55423 100644
--- a/dev-python/packaging/packaging-16.8.ebuild
+++ b/dev-python/packaging/packaging-16.8.ebuild
@@ -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
+}


^ permalink raw reply related	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2017-01-31  4:44 99% [gentoo-commits] repo/gentoo:master commit in: dev-python/packaging/files/, dev-python/packaging/ Mike Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox