public inbox for gentoo-python@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-python] python2.7 ebuild patches, split up
@ 2012-11-26 21:20 Michał Górny
  2012-11-26 21:20 ` [gentoo-python] [PATCH 01/10] python-utils-r1: support all EAPIs Michał Górny
                   ` (10 more replies)
  0 siblings, 11 replies; 14+ messages in thread
From: Michał Górny @ 2012-11-26 21:20 UTC (permalink / raw
  To: gentoo-python; +Cc: python

As requested by djc, here are my patches to python2.7 ebuild split
into smaller, logically consistent parts. I have not migrated the ebuild
to EAPI4 this time, and instead enabled older EAPIs for python-utils-r1.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-python] [PATCH 01/10] python-utils-r1: support all EAPIs.
  2012-11-26 21:20 [gentoo-python] python2.7 ebuild patches, split up Michał Górny
@ 2012-11-26 21:20 ` Michał Górny
  2012-11-26 21:20 ` [gentoo-python] [PATCH 02/10] keywords Michał Górny
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Michał Górny @ 2012-11-26 21:20 UTC (permalink / raw
  To: gentoo-python; +Cc: python, Michał Górny

---
 gx86/eclass/python-utils-r1.eclass | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/gx86/eclass/python-utils-r1.eclass b/gx86/eclass/python-utils-r1.eclass
index d8e4b81..abc3c0c 100644
--- a/gx86/eclass/python-utils-r1.eclass
+++ b/gx86/eclass/python-utils-r1.eclass
@@ -21,10 +21,7 @@
 # http://www.gentoo.org/proj/en/Python/python-r1/dev-guide.xml
 
 case "${EAPI:-0}" in
-	0|1|2|3)
-		die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
-		;;
-	4|5)
+	0|1|2|3|4|5)
 		# EAPI=4 makes die behavior clear
 		;;
 	*)
@@ -399,7 +396,7 @@ python_doscript() {
 		local newfn=${oldfn}-${EPYTHON}
 
 		debug-print "${FUNCNAME}: ${oldfn} -> ${newfn}"
-		newins "${f}" "${newfn}"
+		newins "${f}" "${newfn}" || die
 		_python_rewrite_shebang "${D}/${d}/${newfn}"
 
 		# install the wrapper
@@ -477,7 +474,7 @@ python_domodule() {
 	local INSDESTTREE
 
 	insinto "${d}"
-	doins -r "${@}"
+	doins -r "${@}" || die
 
 	python_optimize "${D}/${d}"
 }
-- 
1.8.0



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-python] [PATCH 02/10] keywords.
  2012-11-26 21:20 [gentoo-python] python2.7 ebuild patches, split up Michał Górny
  2012-11-26 21:20 ` [gentoo-python] [PATCH 01/10] python-utils-r1: support all EAPIs Michał Górny
@ 2012-11-26 21:20 ` Michał Górny
  2012-11-26 21:20 ` [gentoo-python] [PATCH 03/10] Package the compiled .pyc & .pyo files Michał Górny
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Michał Górny @ 2012-11-26 21:20 UTC (permalink / raw
  To: gentoo-python; +Cc: python, Michał Górny

---
 gx86/dev-lang/python/python-2.7.3-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gx86/dev-lang/python/python-2.7.3-r3.ebuild b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
index e9112a4..09d09e0 100644
--- a/gx86/dev-lang/python/python-2.7.3-r3.ebuild
+++ b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
@@ -19,7 +19,7 @@ SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.bz2
 LICENSE="PSF-2"
 SLOT="2.7"
 PYTHON_ABI="${SLOT}"
-KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
 IUSE="-berkdb build doc elibc_uclibc examples gdbm ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml"
 
 RDEPEND="app-arch/bzip2
-- 
1.8.0



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-python] [PATCH 03/10] Package the compiled .pyc & .pyo files.
  2012-11-26 21:20 [gentoo-python] python2.7 ebuild patches, split up Michał Górny
  2012-11-26 21:20 ` [gentoo-python] [PATCH 01/10] python-utils-r1: support all EAPIs Michał Górny
  2012-11-26 21:20 ` [gentoo-python] [PATCH 02/10] keywords Michał Górny
@ 2012-11-26 21:20 ` Michał Górny
  2012-11-26 21:20 ` [gentoo-python] [PATCH 04/10] Commonize out $(python_get_libdir) in src_install() Michał Górny
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Michał Górny @ 2012-11-26 21:20 UTC (permalink / raw
  To: gentoo-python; +Cc: python, Michał Górny

---
 gx86/dev-lang/python/python-2.7.3-r3.ebuild | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/gx86/dev-lang/python/python-2.7.3-r3.ebuild b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
index 09d09e0..7efab59 100644
--- a/gx86/dev-lang/python/python-2.7.3-r3.ebuild
+++ b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
@@ -249,7 +249,6 @@ src_install() {
 	[[ -z "${ED}" ]] && ED="${D%/}${EPREFIX}/"
 
 	emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed"
-	python_clean_installation_image -q
 
 	sed -e "s/\(LDFLAGS=\).*/\1/" -i "${ED}$(python_get_libdir)/config/Makefile" || die "sed failed"
 
@@ -309,8 +308,6 @@ eselect_python_update() {
 pkg_postinst() {
 	eselect_python_update
 
-	python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir)
-
 	if [[ "${python_updater_warning}" == "1" ]]; then
 		ewarn "You have just upgraded from an older version of Python."
 		ewarn "You should switch active version of Python ${PV%%.*} and run"
@@ -320,6 +317,4 @@ pkg_postinst() {
 
 pkg_postrm() {
 	eselect_python_update
-
-	python_mod_cleanup $(python_get_libdir)
 }
-- 
1.8.0



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-python] [PATCH 04/10] Commonize out $(python_get_libdir) in src_install().
  2012-11-26 21:20 [gentoo-python] python2.7 ebuild patches, split up Michał Górny
                   ` (2 preceding siblings ...)
  2012-11-26 21:20 ` [gentoo-python] [PATCH 03/10] Package the compiled .pyc & .pyo files Michał Górny
@ 2012-11-26 21:20 ` Michał Górny
  2012-11-26 21:20 ` [gentoo-python] [PATCH 05/10] Replace python_get_libdir with inlined path Michał Górny
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Michał Górny @ 2012-11-26 21:20 UTC (permalink / raw
  To: gentoo-python; +Cc: python, Michał Górny

---
 gx86/dev-lang/python/python-2.7.3-r3.ebuild | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/gx86/dev-lang/python/python-2.7.3-r3.ebuild b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
index 7efab59..1ba8eee 100644
--- a/gx86/dev-lang/python/python-2.7.3-r3.ebuild
+++ b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
@@ -248,9 +248,11 @@ src_test() {
 src_install() {
 	[[ -z "${ED}" ]] && ED="${D%/}${EPREFIX}/"
 
+	local libdir=${ED}$(python_get_libdir)
+
 	emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed"
 
-	sed -e "s/\(LDFLAGS=\).*/\1/" -i "${ED}$(python_get_libdir)/config/Makefile" || die "sed failed"
+	sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed"
 
 	mv "${ED}usr/bin/python${SLOT}-config" "${ED}usr/bin/python-config-${SLOT}"
 
@@ -261,16 +263,16 @@ src_install() {
 	rm -f "${ED}usr/bin/smtpd.py"
 
 	if use build; then
-		rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{bsddb,dbhash.py,idlelib,lib-tk,sqlite3,test}
+		rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{bsddb,dbhash.py,idlelib,lib-tk,sqlite3,test}
 	else
-		use elibc_uclibc && rm -fr "${ED}$(python_get_libdir)/"{bsddb/test,test}
-		use berkdb || rm -fr "${ED}$(python_get_libdir)/"{bsddb,dbhash.py,test/test_bsddb*}
-		use sqlite || rm -fr "${ED}$(python_get_libdir)/"{sqlite3,test/test_sqlite*}
-		use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{idlelib,lib-tk}
+		use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test}
+		use berkdb || rm -fr "${libdir}/"{bsddb,dbhash.py,test/test_bsddb*}
+		use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
+		use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk}
 	fi
 
-	use threads || rm -fr "${ED}$(python_get_libdir)/multiprocessing"
-	use wininst || rm -f "${ED}$(python_get_libdir)/distutils/command/"wininst-*.exe
+	use threads || rm -fr "${libdir}/multiprocessing"
+	use wininst || rm -f "${libdir})/distutils/command/"wininst-*.exe
 
 	dodoc Misc/{ACKS,HISTORY,NEWS} || die "dodoc failed"
 
-- 
1.8.0



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-python] [PATCH 05/10] Replace python_get_libdir with inlined path.
  2012-11-26 21:20 [gentoo-python] python2.7 ebuild patches, split up Michał Górny
                   ` (3 preceding siblings ...)
  2012-11-26 21:20 ` [gentoo-python] [PATCH 04/10] Commonize out $(python_get_libdir) in src_install() Michał Górny
@ 2012-11-26 21:20 ` Michał Górny
  2012-11-26 21:20 ` [gentoo-python] [PATCH 06/10] Stop using python.eclass Michał Górny
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Michał Górny @ 2012-11-26 21:20 UTC (permalink / raw
  To: gentoo-python; +Cc: python, Michał Górny

The path is specific to dev-lang/python, and python.eclass is not really
the right place to keep it.
---
 gx86/dev-lang/python/python-2.7.3-r3.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gx86/dev-lang/python/python-2.7.3-r3.ebuild b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
index 1ba8eee..08eabb8 100644
--- a/gx86/dev-lang/python/python-2.7.3-r3.ebuild
+++ b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
@@ -235,7 +235,7 @@ src_test() {
 	done
 
 	elog "If you would like to run them, you may:"
-	elog "cd '${EPREFIX}$(python_get_libdir)/test'"
+	elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'"
 	elog "and run the tests separately."
 
 	python_disable_pyc
@@ -248,7 +248,7 @@ src_test() {
 src_install() {
 	[[ -z "${ED}" ]] && ED="${D%/}${EPREFIX}/"
 
-	local libdir=${ED}$(python_get_libdir)
+	local libdir=${ED}/usr/$(get_libdir)/python${SLOT}
 
 	emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed"
 
-- 
1.8.0



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-python] [PATCH 06/10] Stop using python.eclass.
  2012-11-26 21:20 [gentoo-python] python2.7 ebuild patches, split up Michał Górny
                   ` (4 preceding siblings ...)
  2012-11-26 21:20 ` [gentoo-python] [PATCH 05/10] Replace python_get_libdir with inlined path Michał Górny
@ 2012-11-26 21:20 ` Michał Górny
  2012-11-26 21:20 ` [gentoo-python] [PATCH 07/10] Install 'epython' module for python-exec Michał Górny
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Michał Górny @ 2012-11-26 21:20 UTC (permalink / raw
  To: gentoo-python; +Cc: python, Michał Górny

Inline the deps, remove unnecessary code.
---
 gx86/dev-lang/python/python-2.7.3-r3.ebuild | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/gx86/dev-lang/python/python-2.7.3-r3.ebuild b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
index 08eabb8..618f7ef 100644
--- a/gx86/dev-lang/python/python-2.7.3-r3.ebuild
+++ b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
@@ -6,7 +6,7 @@ EAPI="2"
 WANT_AUTOMAKE="none"
 WANT_LIBTOOL="none"
 
-inherit autotools eutils flag-o-matic multilib pax-utils python toolchain-funcs
+inherit autotools eutils flag-o-matic multilib pax-utils toolchain-funcs
 
 MY_P="Python-${PV}"
 PATCHSET_REVISION="1"
@@ -18,7 +18,6 @@ SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.bz2
 
 LICENSE="PSF-2"
 SLOT="2.7"
-PYTHON_ABI="${SLOT}"
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
 IUSE="-berkdb build doc elibc_uclibc examples gdbm ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml"
 
@@ -56,12 +55,12 @@ DEPEND="${RDEPEND}
 		!sys-devel/gcc[libffi]"
 RDEPEND+=" !build? ( app-misc/mime-types )
 	doc? ( dev-python/python-docs:${SLOT} )"
+PDEPEND="app-admin/eselect-python
+	app-admin/python-updater"
 
 S="${WORKDIR}/${MY_P}"
 
 pkg_setup() {
-	python_pkg_setup
-
 	if use berkdb; then
 		ewarn "\"bsddb\" module is out-of-date and no longer maintained inside dev-lang/python."
 		ewarn "\"bsddb\" and \"dbhash\" modules have been additionally removed in Python 3."
@@ -210,10 +209,6 @@ src_test() {
 		return
 	fi
 
-	# Byte compiling should be enabled here.
-	# Otherwise test_import fails.
-	python_enable_pyc
-
 	# Skip failing tests.
 	local skipped_tests="distutils gdb"
 
-- 
1.8.0



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-python] [PATCH 07/10] Install 'epython' module for python-exec.
  2012-11-26 21:20 [gentoo-python] python2.7 ebuild patches, split up Michał Górny
                   ` (5 preceding siblings ...)
  2012-11-26 21:20 ` [gentoo-python] [PATCH 06/10] Stop using python.eclass Michał Górny
@ 2012-11-26 21:20 ` Michał Górny
  2012-11-26 21:20 ` [gentoo-python] [PATCH 08/10] Clean up DESCRIPTION and whitespace Michał Górny
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Michał Górny @ 2012-11-26 21:20 UTC (permalink / raw
  To: gentoo-python; +Cc: python, Michał Górny

---
 gx86/dev-lang/python/python-2.7.3-r3.ebuild | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gx86/dev-lang/python/python-2.7.3-r3.ebuild b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
index 618f7ef..8af21e3 100644
--- a/gx86/dev-lang/python/python-2.7.3-r3.ebuild
+++ b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
@@ -6,7 +6,7 @@ EAPI="2"
 WANT_AUTOMAKE="none"
 WANT_LIBTOOL="none"
 
-inherit autotools eutils flag-o-matic multilib pax-utils toolchain-funcs
+inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs
 
 MY_P="Python-${PV}"
 PATCHSET_REVISION="1"
@@ -282,6 +282,11 @@ src_install() {
 		-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \
 		-e "s:@PYDOC@:pydoc${SLOT}:" \
 		-i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
+
+	# for python-exec
+	python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
+	echo "EPYTHON='${EPYTHON}'" > epython.py
+	python_domodule epython.py
 }
 
 pkg_preinst() {
-- 
1.8.0



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-python] [PATCH 08/10] Clean up DESCRIPTION and whitespace.
  2012-11-26 21:20 [gentoo-python] python2.7 ebuild patches, split up Michał Górny
                   ` (6 preceding siblings ...)
  2012-11-26 21:20 ` [gentoo-python] [PATCH 07/10] Install 'epython' module for python-exec Michał Górny
@ 2012-11-26 21:20 ` Michał Górny
  2012-11-26 21:20 ` [gentoo-python] [PATCH 09/10] Clean up the bsddb messages Michał Górny
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Michał Górny @ 2012-11-26 21:20 UTC (permalink / raw
  To: gentoo-python; +Cc: python, Michał Górny

---
 gx86/dev-lang/python/python-2.7.3-r3.ebuild | 60 ++++++++++++++---------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/gx86/dev-lang/python/python-2.7.3-r3.ebuild b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
index 8af21e3..d1cf2e6 100644
--- a/gx86/dev-lang/python/python-2.7.3-r3.ebuild
+++ b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
@@ -11,7 +11,7 @@ inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolcha
 MY_P="Python-${PV}"
 PATCHSET_REVISION="1"
 
-DESCRIPTION="Python is an interpreted, interactive, object-oriented programming language."
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
 HOMEPAGE="http://www.python.org/"
 SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.bz2
 	mirror://gentoo/python-gentoo-patches-${PV}-${PATCHSET_REVISION}.tar.bz2"
@@ -22,37 +22,37 @@ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~spar
 IUSE="-berkdb build doc elibc_uclibc examples gdbm ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml"
 
 RDEPEND="app-arch/bzip2
-		>=sys-libs/zlib-1.1.3
-		virtual/libffi
-		virtual/libintl
-		!build? (
-			berkdb? ( || (
-				sys-libs/db:4.8
-				sys-libs/db:4.7
-				sys-libs/db:4.6
-				sys-libs/db:4.5
-				sys-libs/db:4.4
-				sys-libs/db:4.3
-				sys-libs/db:4.2
-			) )
-			gdbm? ( sys-libs/gdbm[berkdb] )
-			ncurses? (
-				>=sys-libs/ncurses-5.2
-				readline? ( >=sys-libs/readline-4.1 )
-			)
-			sqlite? ( >=dev-db/sqlite-3.3.8:3[extensions] )
-			ssl? ( dev-libs/openssl )
-			tk? (
-				>=dev-lang/tk-8.0
-				dev-tcltk/blt
-			)
-			xml? ( >=dev-libs/expat-2.1 )
+	>=sys-libs/zlib-1.1.3
+	virtual/libffi
+	virtual/libintl
+	!build? (
+		berkdb? ( || (
+			sys-libs/db:4.8
+			sys-libs/db:4.7
+			sys-libs/db:4.6
+			sys-libs/db:4.5
+			sys-libs/db:4.4
+			sys-libs/db:4.3
+			sys-libs/db:4.2
+		) )
+		gdbm? ( sys-libs/gdbm[berkdb] )
+		ncurses? (
+			>=sys-libs/ncurses-5.2
+			readline? ( >=sys-libs/readline-4.1 )
 		)
-		!!<sys-apps/portage-2.1.9"
+		sqlite? ( >=dev-db/sqlite-3.3.8:3[extensions] )
+		ssl? ( dev-libs/openssl )
+		tk? (
+			>=dev-lang/tk-8.0
+			dev-tcltk/blt
+		)
+		xml? ( >=dev-libs/expat-2.1 )
+	)
+	!!<sys-apps/portage-2.1.9"
 DEPEND="${RDEPEND}
-		virtual/pkgconfig
-		>=sys-devel/autoconf-2.65
-		!sys-devel/gcc[libffi]"
+	virtual/pkgconfig
+	>=sys-devel/autoconf-2.65
+	!sys-devel/gcc[libffi]"
 RDEPEND+=" !build? ( app-misc/mime-types )
 	doc? ( dev-python/python-docs:${SLOT} )"
 PDEPEND="app-admin/eselect-python
-- 
1.8.0



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-python] [PATCH 09/10] Clean up the bsddb messages.
  2012-11-26 21:20 [gentoo-python] python2.7 ebuild patches, split up Michał Górny
                   ` (7 preceding siblings ...)
  2012-11-26 21:20 ` [gentoo-python] [PATCH 08/10] Clean up DESCRIPTION and whitespace Michał Górny
@ 2012-11-26 21:20 ` Michał Górny
  2012-11-26 21:20 ` [gentoo-python] [PATCH 10/10] Stop passing meaningless EPYTHON to make Michał Górny
  2012-11-29 19:44 ` [gentoo-python] [PATCH 10/10 updated] Replace static EPYTHON setting with python-any-r1 Michał Górny
  10 siblings, 0 replies; 14+ messages in thread
From: Michał Górny @ 2012-11-26 21:20 UTC (permalink / raw
  To: gentoo-python; +Cc: python, Michał Górny

Acked by Ian Delaney.
---
 gx86/dev-lang/python/python-2.7.3-r3.ebuild | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/gx86/dev-lang/python/python-2.7.3-r3.ebuild b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
index d1cf2e6..2182837 100644
--- a/gx86/dev-lang/python/python-2.7.3-r3.ebuild
+++ b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
@@ -62,13 +62,14 @@ S="${WORKDIR}/${MY_P}"
 
 pkg_setup() {
 	if use berkdb; then
-		ewarn "\"bsddb\" module is out-of-date and no longer maintained inside dev-lang/python."
-		ewarn "\"bsddb\" and \"dbhash\" modules have been additionally removed in Python 3."
-		ewarn "You should use external, still maintained \"bsddb3\" module provided by dev-python/bsddb3,"
-		ewarn "which supports both Python 2 and Python 3."
+		ewarn "'bsddb' module is out-of-date and no longer maintained inside"
+		ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally"
+		ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module"
+		ewarn "is provided by dev-python/bsddb3."
 	else
 		if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then
-			ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb] to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]."
+			ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"
+			ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]."
 			ewarn "You might need to migrate your databases."
 		fi
 	fi
-- 
1.8.0



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-python] [PATCH 10/10] Stop passing meaningless EPYTHON to make.
  2012-11-26 21:20 [gentoo-python] python2.7 ebuild patches, split up Michał Górny
                   ` (8 preceding siblings ...)
  2012-11-26 21:20 ` [gentoo-python] [PATCH 09/10] Clean up the bsddb messages Michał Górny
@ 2012-11-26 21:20 ` Michał Górny
  2012-11-26 21:54   ` Michał Górny
  2012-11-29 19:44 ` [gentoo-python] [PATCH 10/10 updated] Replace static EPYTHON setting with python-any-r1 Michał Górny
  10 siblings, 1 reply; 14+ messages in thread
From: Michał Górny @ 2012-11-26 21:20 UTC (permalink / raw
  To: gentoo-python; +Cc: python, Michał Górny

---
 gx86/dev-lang/python/python-2.7.3-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gx86/dev-lang/python/python-2.7.3-r3.ebuild b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
index 2182837..9f7d98c 100644
--- a/gx86/dev-lang/python/python-2.7.3-r3.ebuild
+++ b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
@@ -197,7 +197,7 @@ src_configure() {
 }
 
 src_compile() {
-	emake EPYTHON="python${PV%%.*}" || die "emake failed"
+	default
 
 	# Work around bug 329499. See also bug 413751.
 	pax-mark m python
-- 
1.8.0



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [gentoo-python] [PATCH 10/10] Stop passing meaningless EPYTHON to make.
  2012-11-26 21:20 ` [gentoo-python] [PATCH 10/10] Stop passing meaningless EPYTHON to make Michał Górny
@ 2012-11-26 21:54   ` Michał Górny
  0 siblings, 0 replies; 14+ messages in thread
From: Michał Górny @ 2012-11-26 21:54 UTC (permalink / raw
  To: Michał Górny; +Cc: gentoo-python, python

[-- Attachment #1: Type: text/plain, Size: 900 bytes --]

On Mon, 26 Nov 2012 22:20:37 +0100
Michał Górny <mgorny@gentoo.org> wrote:

> ---
>  gx86/dev-lang/python/python-2.7.3-r3.ebuild | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gx86/dev-lang/python/python-2.7.3-r3.ebuild b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
> index 2182837..9f7d98c 100644
> --- a/gx86/dev-lang/python/python-2.7.3-r3.ebuild
> +++ b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
> @@ -197,7 +197,7 @@ src_configure() {
>  }
>  
>  src_compile() {
> -	emake EPYTHON="python${PV%%.*}" || die "emake failed"
> +	default
>  
>  	# Work around bug 329499. See also bug 413751.
>  	pax-mark m python

Ok, Arfrever pointed me out that EPYTHON is necessary to enforce
a specific Python version sometimes.

TODO: add an utility function to get best installed python version
matching criteria.

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 316 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-python] [PATCH 10/10 updated] Replace static EPYTHON setting with python-any-r1.
  2012-11-26 21:20 [gentoo-python] python2.7 ebuild patches, split up Michał Górny
                   ` (9 preceding siblings ...)
  2012-11-26 21:20 ` [gentoo-python] [PATCH 10/10] Stop passing meaningless EPYTHON to make Michał Górny
@ 2012-11-29 19:44 ` Michał Górny
  2012-11-29 19:58   ` [gentoo-python] " Mike Gilbert
  10 siblings, 1 reply; 14+ messages in thread
From: Michał Górny @ 2012-11-29 19:44 UTC (permalink / raw
  To: gentoo-python; +Cc: python, Michał Górny

This way, the ebuild will check for the best installed Python version
satisfying the dep and use it if necessary.
---
 gx86/dev-lang/python/python-2.7.3-r3.ebuild | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gx86/dev-lang/python/python-2.7.3-r3.ebuild b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
index 2182837..b6349a2 100644
--- a/gx86/dev-lang/python/python-2.7.3-r3.ebuild
+++ b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
@@ -6,7 +6,10 @@ EAPI="2"
 WANT_AUTOMAKE="none"
 WANT_LIBTOOL="none"
 
-inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs
+# Bootstrapping Python requires Python 2.
+PYTHON_COMPAT=( python{2_5,2_6,2_7} pypy{1_8,1_9} )
+
+inherit autotools eutils flag-o-matic multilib pax-utils python-any-r1 toolchain-funcs
 
 MY_P="Python-${PV}"
 PATCHSET_REVISION="1"
@@ -50,6 +53,7 @@ RDEPEND="app-arch/bzip2
 	)
 	!!<sys-apps/portage-2.1.9"
 DEPEND="${RDEPEND}
+	${PYTHON_DEPS}
 	virtual/pkgconfig
 	>=sys-devel/autoconf-2.65
 	!sys-devel/gcc[libffi]"
@@ -73,6 +77,8 @@ pkg_setup() {
 			ewarn "You might need to migrate your databases."
 		fi
 	fi
+
+	python-any-r1_pkg_setup
 }
 
 src_prepare() {
@@ -197,7 +203,7 @@ src_configure() {
 }
 
 src_compile() {
-	emake EPYTHON="python${PV%%.*}" || die "emake failed"
+	default
 
 	# Work around bug 329499. See also bug 413751.
 	pax-mark m python
-- 
1.8.0



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-python] Re: [PATCH 10/10 updated] Replace static EPYTHON setting with python-any-r1.
  2012-11-29 19:44 ` [gentoo-python] [PATCH 10/10 updated] Replace static EPYTHON setting with python-any-r1 Michał Górny
@ 2012-11-29 19:58   ` Mike Gilbert
  0 siblings, 0 replies; 14+ messages in thread
From: Mike Gilbert @ 2012-11-29 19:58 UTC (permalink / raw
  To: gentoo-python; +Cc: python

On Thu, Nov 29, 2012 at 2:44 PM, Michał Górny <mgorny@gentoo.org> wrote:
> This way, the ebuild will check for the best installed Python version
> satisfying the dep and use it if necessary.
> ---
>  gx86/dev-lang/python/python-2.7.3-r3.ebuild | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/gx86/dev-lang/python/python-2.7.3-r3.ebuild b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
> index 2182837..b6349a2 100644
> --- a/gx86/dev-lang/python/python-2.7.3-r3.ebuild
> +++ b/gx86/dev-lang/python/python-2.7.3-r3.ebuild
> @@ -6,7 +6,10 @@ EAPI="2"
>  WANT_AUTOMAKE="none"
>  WANT_LIBTOOL="none"
>
> -inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs
> +# Bootstrapping Python requires Python 2.
> +PYTHON_COMPAT=( python{2_5,2_6,2_7} pypy{1_8,1_9} )
> +

Using pypy when building python just feels like a bad idea to me.
Let's not go there.

> +inherit autotools eutils flag-o-matic multilib pax-utils python-any-r1 toolchain-funcs
>
>  MY_P="Python-${PV}"
>  PATCHSET_REVISION="1"
> @@ -50,6 +53,7 @@ RDEPEND="app-arch/bzip2
>         )
>         !!<sys-apps/portage-2.1.9"
>  DEPEND="${RDEPEND}
> +       ${PYTHON_DEPS}
>         virtual/pkgconfig
>         >=sys-devel/autoconf-2.65
>         !sys-devel/gcc[libffi]"
> @@ -73,6 +77,8 @@ pkg_setup() {
>                         ewarn "You might need to migrate your databases."
>                 fi
>         fi
> +
> +       python-any-r1_pkg_setup
>  }
>
>  src_prepare() {
> @@ -197,7 +203,7 @@ src_configure() {
>  }
>
>  src_compile() {
> -       emake EPYTHON="python${PV%%.*}" || die "emake failed"
> +       default
>
>         # Work around bug 329499. See also bug 413751.
>         pax-mark m python
> --
> 1.8.0
>


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-11-29 19:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-26 21:20 [gentoo-python] python2.7 ebuild patches, split up Michał Górny
2012-11-26 21:20 ` [gentoo-python] [PATCH 01/10] python-utils-r1: support all EAPIs Michał Górny
2012-11-26 21:20 ` [gentoo-python] [PATCH 02/10] keywords Michał Górny
2012-11-26 21:20 ` [gentoo-python] [PATCH 03/10] Package the compiled .pyc & .pyo files Michał Górny
2012-11-26 21:20 ` [gentoo-python] [PATCH 04/10] Commonize out $(python_get_libdir) in src_install() Michał Górny
2012-11-26 21:20 ` [gentoo-python] [PATCH 05/10] Replace python_get_libdir with inlined path Michał Górny
2012-11-26 21:20 ` [gentoo-python] [PATCH 06/10] Stop using python.eclass Michał Górny
2012-11-26 21:20 ` [gentoo-python] [PATCH 07/10] Install 'epython' module for python-exec Michał Górny
2012-11-26 21:20 ` [gentoo-python] [PATCH 08/10] Clean up DESCRIPTION and whitespace Michał Górny
2012-11-26 21:20 ` [gentoo-python] [PATCH 09/10] Clean up the bsddb messages Michał Górny
2012-11-26 21:20 ` [gentoo-python] [PATCH 10/10] Stop passing meaningless EPYTHON to make Michał Górny
2012-11-26 21:54   ` Michał Górny
2012-11-29 19:44 ` [gentoo-python] [PATCH 10/10 updated] Replace static EPYTHON setting with python-any-r1 Michał Górny
2012-11-29 19:58   ` [gentoo-python] " Mike Gilbert

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