* [gentoo-python] [PATCHes] boost migration to python-r1 @ 2012-12-14 22:08 Michał Górny 2012-12-14 22:08 ` [gentoo-python] [PATCH 1/3] Let boost figure out the Python includedir itself Michał Górny ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: Michał Górny @ 2012-12-14 22:08 UTC (permalink / raw To: gentoo-python; +Cc: python, cpp [Note: sending this mail to the ml to have it archived, actual maintainers are CC-ed.] I'd like to announce that I've prepared a batch of three patches which clean up the boost ebuild a bit and then migrate it to python-r1. A quick summary follows: (1) removes unnecessary setting of Python includedir and libdir in jam config. The bootstrap script does not write them there, and without them bjam finds Python libs and headers just fine. (2) just replaces three calls to $(python_get_sitedir) with a single one, storing the result in a variable. (3) does the actual migration. It's mostly replacing variables and functions with python-r1 counterparts, and moving the module optimization to build process. It's not much of a difference actually. Shortly saying, the ebuild is a compatible replacement, with all niceness of python-r1 installed (as in implementations being selectable via PYTHON_TARGETS). Any comments? Tiziano, would you mind if I committed this? -- Best regards, Michał Górny ^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-python] [PATCH 1/3] Let boost figure out the Python includedir itself. 2012-12-14 22:08 [gentoo-python] [PATCHes] boost migration to python-r1 Michał Górny @ 2012-12-14 22:08 ` Michał Górny 2012-12-15 11:34 ` [gentoo-python] " Tiziano Müller 2012-12-14 22:08 ` [gentoo-python] [PATCH 2/3] Commonize out $(python_get_sitedir)/boost into a variable Michał Górny 2012-12-14 22:08 ` [gentoo-python] [PATCH 3/3] Convert to python-r1 Michał Górny 2 siblings, 1 reply; 10+ messages in thread From: Michał Górny @ 2012-12-14 22:08 UTC (permalink / raw To: gentoo-python; +Cc: python, cpp, Michał Górny The bootstrap script uses the sole version as well, and boost finds the includes and libraries just fine. --- gx86/dev-libs/boost/boost-1.52.0-r5.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild b/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild index 8659246..4f20fdf 100644 --- a/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild +++ b/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild @@ -50,7 +50,7 @@ create_user-config.jam() { fi if use python; then - python_configuration="using python : $(python_get_version) : /usr : $(python_get_includedir) : /usr/$(get_libdir) ;" + python_configuration="using python : $(python_get_version) ;" fi cat > user-config.jam << __EOF__ -- 1.8.0.2 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-python] Re: [PATCH 1/3] Let boost figure out the Python includedir itself. 2012-12-14 22:08 ` [gentoo-python] [PATCH 1/3] Let boost figure out the Python includedir itself Michał Górny @ 2012-12-15 11:34 ` Tiziano Müller 2012-12-15 14:27 ` [gentoo-python] [PATCH] Pass absolute Python interpreter path to boost Michał Górny 0 siblings, 1 reply; 10+ messages in thread From: Tiziano Müller @ 2012-12-15 11:34 UTC (permalink / raw To: Michał Górny; +Cc: gentoo-python, python, cpp If you checked that boost-build will ever only use what is currently explicitely specified: fine for me. What I don't want is: * boost using something in /usr/local * boost using something in some other location should it somehow fail to find our python (yes: I want to it to bail out) Am Freitag, den 14.12.2012, 23:08 +0100 schrieb Michał Górny: > The bootstrap script uses the sole version as well, and boost finds > the includes and libraries just fine. > --- > gx86/dev-libs/boost/boost-1.52.0-r5.ebuild | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild b/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild > index 8659246..4f20fdf 100644 > --- a/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild > +++ b/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild > @@ -50,7 +50,7 @@ create_user-config.jam() { > fi > > if use python; then > - python_configuration="using python : $(python_get_version) : /usr : $(python_get_includedir) : /usr/$(get_libdir) ;" > + python_configuration="using python : $(python_get_version) ;" > fi > > cat > user-config.jam << __EOF__ ^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-python] [PATCH] Pass absolute Python interpreter path to boost. 2012-12-15 11:34 ` [gentoo-python] " Tiziano Müller @ 2012-12-15 14:27 ` Michał Górny 0 siblings, 0 replies; 10+ messages in thread From: Michał Górny @ 2012-12-15 14:27 UTC (permalink / raw To: gentoo-python; +Cc: python, cpp, Michał Górny This is the way recommended upstream, and it guarantees that our Python interpreter will be used, along with paths and version obtained from it. --- gx86/dev-libs/boost/boost-1.52.0-r5.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild b/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild index 10bd293..55e0f89 100644 --- a/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild +++ b/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild @@ -49,7 +49,7 @@ create_user-config.jam() { fi if use python; then - python_configuration="using python : ${EPYTHON#python} ;" + python_configuration="using python : : ${PYTHON} ;" fi cat > user-config.jam << __EOF__ -- 1.8.0.2 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-python] [PATCH 2/3] Commonize out $(python_get_sitedir)/boost into a variable. 2012-12-14 22:08 [gentoo-python] [PATCHes] boost migration to python-r1 Michał Górny 2012-12-14 22:08 ` [gentoo-python] [PATCH 1/3] Let boost figure out the Python includedir itself Michał Górny @ 2012-12-14 22:08 ` Michał Górny 2012-12-15 11:35 ` [gentoo-python] " Tiziano Müller 2012-12-14 22:08 ` [gentoo-python] [PATCH 3/3] Convert to python-r1 Michał Górny 2 siblings, 1 reply; 10+ messages in thread From: Michał Górny @ 2012-12-14 22:08 UTC (permalink / raw To: gentoo-python; +Cc: python, cpp, Michał Górny --- gx86/dev-libs/boost/boost-1.52.0-r5.ebuild | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild b/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild index 4f20fdf..87c7561 100644 --- a/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild +++ b/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild @@ -205,9 +205,10 @@ src_install () { # Move mpi.so Python module to Python site-packages directory. # https://svn.boost.org/trac/boost/ticket/2838 if use mpi; then - dodir $(python_get_sitedir)/boost - mv "${D}usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost" || die - cat << EOF > "${D}$(python_get_sitedir)/boost/__init__.py" || die + local moddir=$(python_get_sitedir)/boost + dodir "${moddir}" + mv "${D}usr/$(get_libdir)/mpi.so" "${D}${moddir}" || die + cat << EOF > "${D}${moddir}/__init__.py" || die import sys if sys.platform.startswith('linux'): import DLFCN -- 1.8.0.2 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-python] Re: [PATCH 2/3] Commonize out $(python_get_sitedir)/boost into a variable. 2012-12-14 22:08 ` [gentoo-python] [PATCH 2/3] Commonize out $(python_get_sitedir)/boost into a variable Michał Górny @ 2012-12-15 11:35 ` Tiziano Müller 2012-12-15 12:02 ` Michał Górny 0 siblings, 1 reply; 10+ messages in thread From: Tiziano Müller @ 2012-12-15 11:35 UTC (permalink / raw To: Michał Górny; +Cc: gentoo-python, python, cpp mostly bikeshedding and I am not sure whether I should support your crusade against subshells: but ok Am Freitag, den 14.12.2012, 23:08 +0100 schrieb Michał Górny: > --- > gx86/dev-libs/boost/boost-1.52.0-r5.ebuild | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild b/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild > index 4f20fdf..87c7561 100644 > --- a/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild > +++ b/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild > @@ -205,9 +205,10 @@ src_install () { > # Move mpi.so Python module to Python site-packages directory. > # https://svn.boost.org/trac/boost/ticket/2838 > if use mpi; then > - dodir $(python_get_sitedir)/boost > - mv "${D}usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost" || die > - cat << EOF > "${D}$(python_get_sitedir)/boost/__init__.py" || die > + local moddir=$(python_get_sitedir)/boost > + dodir "${moddir}" > + mv "${D}usr/$(get_libdir)/mpi.so" "${D}${moddir}" || die > + cat << EOF > "${D}${moddir}/__init__.py" || die > import sys > if sys.platform.startswith('linux'): > import DLFCN ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-python] Re: [PATCH 2/3] Commonize out $(python_get_sitedir)/boost into a variable. 2012-12-15 11:35 ` [gentoo-python] " Tiziano Müller @ 2012-12-15 12:02 ` Michał Górny 0 siblings, 0 replies; 10+ messages in thread From: Michał Górny @ 2012-12-15 12:02 UTC (permalink / raw To: Tiziano Müller; +Cc: gentoo-python, python, cpp [-- Attachment #1: Type: text/plain, Size: 340 bytes --] On Sat, 15 Dec 2012 12:35:52 +0100 Tiziano Müller <dev-zero@gentoo.org> wrote: > mostly bikeshedding and I am not sure whether I should support your > crusade against subshells: but ok Err, it's mostly replacing three repetitive uses of $(python_get_sitedir)/boost with one pre-defined var. -- Best regards, Michał Górny [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 316 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-python] [PATCH 3/3] Convert to python-r1. 2012-12-14 22:08 [gentoo-python] [PATCHes] boost migration to python-r1 Michał Górny 2012-12-14 22:08 ` [gentoo-python] [PATCH 1/3] Let boost figure out the Python includedir itself Michał Górny 2012-12-14 22:08 ` [gentoo-python] [PATCH 2/3] Commonize out $(python_get_sitedir)/boost into a variable Michał Górny @ 2012-12-14 22:08 ` Michał Górny 2012-12-15 11:42 ` [gentoo-python] " Tiziano Müller 2 siblings, 1 reply; 10+ messages in thread From: Michał Górny @ 2012-12-14 22:08 UTC (permalink / raw To: gentoo-python; +Cc: python, cpp, Michał Górny --- gx86/dev-libs/boost/boost-1.52.0-r5.ebuild | 47 ++++++++++-------------------- 1 file changed, 15 insertions(+), 32 deletions(-) diff --git a/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild b/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild index 87c7561..10bd293 100644 --- a/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild +++ b/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild @@ -3,11 +3,9 @@ # $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.52.0-r4.ebuild,v 1.1 2012/11/22 03:37:58 flameeyes Exp $ EAPI="5" -PYTHON_DEPEND="python? *" -SUPPORT_PYTHON_ABIS="1" -RESTRICT_PYTHON_ABIS="*-jython *-pypy-*" +PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} ) -inherit flag-o-matic multilib multiprocessing python toolchain-funcs versionator +inherit flag-o-matic multilib multiprocessing python-r1 toolchain-funcs versionator MY_P=${PN}_$(replace_all_version_separators _) @@ -24,6 +22,7 @@ IUSE="debug doc icu +nls mpi python static-libs +threads tools" RDEPEND="icu? ( >=dev-libs/icu-3.6:= ) !icu? ( virtual/libiconv ) mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) ) + python? ( ${PYTHON_DEPS} ) sys-libs/zlib !app-admin/eselect-boost" DEPEND="${RDEPEND} @@ -50,7 +49,7 @@ create_user-config.jam() { fi if use python; then - python_configuration="using python : $(python_get_version) ;" + python_configuration="using python : ${EPYTHON#python} ;" fi cat > user-config.jam << __EOF__ @@ -60,12 +59,6 @@ ${python_configuration} __EOF__ } -pkg_setup() { - if use python; then - python_pkg_setup - fi -} - src_prepare() { epatch \ "${FILESDIR}/${PN}-1.48.0-mpi_python3.patch" \ @@ -129,7 +122,7 @@ src_compile() { create_user-config.jam ejam ${OPTIONS} \ - $(use python && echo --python-buildid=${PYTHON_ABI}) \ + $(use python && echo --python-buildid=${EPYTHON#python}) \ || die "Building of Boost libraries failed" if use python; then @@ -143,7 +136,7 @@ src_compile() { local dir for dir in ${PYTHON_DIRS}; do - mv ${dir} ${dir}-${PYTHON_ABI} || die "Renaming of '${dir}' to '${dir}-${PYTHON_ABI}' failed" + mv ${dir} ${dir}-${EPYTHON} || die done if use mpi; then @@ -158,12 +151,12 @@ src_compile() { fi fi - mv stage/lib/mpi.so stage/lib/mpi.so-${PYTHON_ABI} || die "Renaming of 'stage/lib/mpi.so' to 'stage/lib/mpi.so-${PYTHON_ABI}' failed" + mv stage/lib/mpi.so stage/lib/mpi.so-${EPYTHON} || die fi fi } if use python; then - python_execute_function building + python_foreach_impl building else building fi @@ -184,19 +177,19 @@ src_install () { if use python; then local dir for dir in ${PYTHON_DIRS}; do - cp -pr ${dir}-${PYTHON_ABI} ${dir} || die "Copying of '${dir}-${PYTHON_ABI}' to '${dir}' failed" + cp -pr ${dir}-${EPYTHON} ${dir} || die done if use mpi; then - cp -p stage/lib/mpi.so-${PYTHON_ABI} "${MPI_PYTHON_MODULE}" || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to '${MPI_PYTHON_MODULE}' failed" - cp -p stage/lib/mpi.so-${PYTHON_ABI} stage/lib/mpi.so || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to 'stage/lib/mpi.so' failed" + cp -p stage/lib/mpi.so-${EPYTHON} "${MPI_PYTHON_MODULE}" || die + cp -p stage/lib/mpi.so-${EPYTHON} stage/lib/mpi.so || die fi fi ejam ${OPTIONS} \ --includedir="${D}usr/include" \ --libdir="${D}usr/$(get_libdir)" \ - $(use python && echo --python-buildid=${PYTHON_ABI}) \ + $(use python && echo --python-buildid=${EPYTHON#python}) \ install || die "Installation of Boost libraries failed" if use python; then @@ -222,10 +215,12 @@ else: del sys EOF fi + + python_optimize fi } if use python; then - python_execute_function installation + python_foreach_impl installation else installation fi @@ -320,18 +315,6 @@ pkg_preinst() { done } -pkg_postinst() { - if use mpi && use python; then - python_mod_optimize boost - fi -} - -pkg_postrm() { - if use mpi && use python; then - python_mod_cleanup boost - fi -} - # the tests will never fail because these are not intended as sanity # tests at all. They are more a way for upstream to check their own code # on new compilers. Since they would either be completely unreliable -- 1.8.0.2 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-python] Re: [PATCH 3/3] Convert to python-r1. 2012-12-14 22:08 ` [gentoo-python] [PATCH 3/3] Convert to python-r1 Michał Górny @ 2012-12-15 11:42 ` Tiziano Müller 2012-12-15 12:17 ` Michał Górny 0 siblings, 1 reply; 10+ messages in thread From: Tiziano Müller @ 2012-12-15 11:42 UTC (permalink / raw To: Michał Górny; +Cc: gentoo-python, python, cpp Am Freitag, den 14.12.2012, 23:08 +0100 schrieb Michał Górny: > --- > gx86/dev-libs/boost/boost-1.52.0-r5.ebuild | 47 ++++++++++-------------------- > 1 file changed, 15 insertions(+), 32 deletions(-) > > diff --git a/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild b/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild > index 87c7561..10bd293 100644 > --- a/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild > +++ b/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild > @@ -3,11 +3,9 @@ > # $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.52.0-r4.ebuild,v 1.1 2012/11/22 03:37:58 flameeyes Exp $ > > EAPI="5" > -PYTHON_DEPEND="python? *" > -SUPPORT_PYTHON_ABIS="1" > -RESTRICT_PYTHON_ABIS="*-jython *-pypy-*" > +PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} ) > > -inherit flag-o-matic multilib multiprocessing python toolchain-funcs versionator > +inherit flag-o-matic multilib multiprocessing python-r1 toolchain-funcs versionator > > MY_P=${PN}_$(replace_all_version_separators _) > > @@ -24,6 +22,7 @@ IUSE="debug doc icu +nls mpi python static-libs +threads tools" > RDEPEND="icu? ( >=dev-libs/icu-3.6:= ) > !icu? ( virtual/libiconv ) > mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) ) > + python? ( ${PYTHON_DEPS} ) > sys-libs/zlib > !app-admin/eselect-boost" > DEPEND="${RDEPEND} > @@ -50,7 +49,7 @@ create_user-config.jam() { > fi > > if use python; then > - python_configuration="using python : $(python_get_version) ;" > + python_configuration="using python : ${EPYTHON#python} ;" can you please repeat why there is no EPYTHONV variable? > fi > > cat > user-config.jam << __EOF__ > @@ -60,12 +59,6 @@ ${python_configuration} > __EOF__ > } > > -pkg_setup() { > - if use python; then > - python_pkg_setup > - fi > -} > - > src_prepare() { > epatch \ > "${FILESDIR}/${PN}-1.48.0-mpi_python3.patch" \ > @@ -129,7 +122,7 @@ src_compile() { > create_user-config.jam > > ejam ${OPTIONS} \ > - $(use python && echo --python-buildid=${PYTHON_ABI}) \ > + $(use python && echo --python-buildid=${EPYTHON#python}) \ > || die "Building of Boost libraries failed" > > if use python; then > @@ -143,7 +136,7 @@ src_compile() { > > local dir > for dir in ${PYTHON_DIRS}; do > - mv ${dir} ${dir}-${PYTHON_ABI} || die "Renaming of '${dir}' to '${dir}-${PYTHON_ABI}' failed" > + mv ${dir} ${dir}-${EPYTHON} || die Do we loose something by having an explicit error message? Please leave it there (dito for all the other cases) > done > > if use mpi; then > @@ -158,12 +151,12 @@ src_compile() { > fi > fi > > - mv stage/lib/mpi.so stage/lib/mpi.so-${PYTHON_ABI} || die "Renaming of 'stage/lib/mpi.so' to 'stage/lib/mpi.so-${PYTHON_ABI}' failed" > + mv stage/lib/mpi.so stage/lib/mpi.so-${EPYTHON} || die > fi > fi > } > if use python; then > - python_execute_function building > + python_foreach_impl building > else > building > fi > @@ -184,19 +177,19 @@ src_install () { > if use python; then > local dir > for dir in ${PYTHON_DIRS}; do > - cp -pr ${dir}-${PYTHON_ABI} ${dir} || die "Copying of '${dir}-${PYTHON_ABI}' to '${dir}' failed" > + cp -pr ${dir}-${EPYTHON} ${dir} || die > done > > if use mpi; then > - cp -p stage/lib/mpi.so-${PYTHON_ABI} "${MPI_PYTHON_MODULE}" || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to '${MPI_PYTHON_MODULE}' failed" > - cp -p stage/lib/mpi.so-${PYTHON_ABI} stage/lib/mpi.so || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to 'stage/lib/mpi.so' failed" > + cp -p stage/lib/mpi.so-${EPYTHON} "${MPI_PYTHON_MODULE}" || die > + cp -p stage/lib/mpi.so-${EPYTHON} stage/lib/mpi.so || die > fi > fi > > ejam ${OPTIONS} \ > --includedir="${D}usr/include" \ > --libdir="${D}usr/$(get_libdir)" \ > - $(use python && echo --python-buildid=${PYTHON_ABI}) \ > + $(use python && echo --python-buildid=${EPYTHON#python}) \ > install || die "Installation of Boost libraries failed" > > if use python; then > @@ -222,10 +215,12 @@ else: > del sys > EOF > fi > + > + python_optimize > fi > } > if use python; then > - python_execute_function installation > + python_foreach_impl installation > else > installation > fi > @@ -320,18 +315,6 @@ pkg_preinst() { > done > } > > -pkg_postinst() { > - if use mpi && use python; then > - python_mod_optimize boost > - fi > -} > - > -pkg_postrm() { > - if use mpi && use python; then > - python_mod_cleanup boost > - fi > -} > - > # the tests will never fail because these are not intended as sanity > # tests at all. They are more a way for upstream to check their own code > # on new compilers. Since they would either be completely unreliable ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-python] Re: [PATCH 3/3] Convert to python-r1. 2012-12-15 11:42 ` [gentoo-python] " Tiziano Müller @ 2012-12-15 12:17 ` Michał Górny 0 siblings, 0 replies; 10+ messages in thread From: Michał Górny @ 2012-12-15 12:17 UTC (permalink / raw To: Tiziano Müller; +Cc: gentoo-python, python, cpp [-- Attachment #1: Type: text/plain, Size: 5870 bytes --] On Sat, 15 Dec 2012 12:42:02 +0100 Tiziano Müller <dev-zero@gentoo.org> wrote: > Am Freitag, den 14.12.2012, 23:08 +0100 schrieb Michał Górny: > > --- > > gx86/dev-libs/boost/boost-1.52.0-r5.ebuild | 47 ++++++++++-------------------- > > 1 file changed, 15 insertions(+), 32 deletions(-) > > > > diff --git a/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild b/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild > > index 87c7561..10bd293 100644 > > --- a/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild > > +++ b/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild > > @@ -3,11 +3,9 @@ > > # $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.52.0-r4.ebuild,v 1.1 2012/11/22 03:37:58 flameeyes Exp $ > > > > EAPI="5" > > -PYTHON_DEPEND="python? *" > > -SUPPORT_PYTHON_ABIS="1" > > -RESTRICT_PYTHON_ABIS="*-jython *-pypy-*" > > +PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} ) > > > > -inherit flag-o-matic multilib multiprocessing python toolchain-funcs versionator > > +inherit flag-o-matic multilib multiprocessing python-r1 toolchain-funcs versionator > > > > MY_P=${PN}_$(replace_all_version_separators _) > > > > @@ -24,6 +22,7 @@ IUSE="debug doc icu +nls mpi python static-libs +threads tools" > > RDEPEND="icu? ( >=dev-libs/icu-3.6:= ) > > !icu? ( virtual/libiconv ) > > mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) ) > > + python? ( ${PYTHON_DEPS} ) > > sys-libs/zlib > > !app-admin/eselect-boost" > > DEPEND="${RDEPEND} > > @@ -50,7 +49,7 @@ create_user-config.jam() { > > fi > > > > if use python; then > > - python_configuration="using python : $(python_get_version) ;" > > + python_configuration="using python : ${EPYTHON#python} ;" > > can you please repeat why there is no EPYTHONV variable? There wasn't one, I didn't want to introduce it myself. The root of the problem is that there are multiple kinds of 'Python version' and people usually have no idea which one they want. In this particular case, boost wants the suffix of python libraries which is specific to CPython. Scrambling it from EPYTHON is the simplest thing to do here. But I'll take a second look at python_configuration because of your earlier comments. > > > fi > > > > cat > user-config.jam << __EOF__ > > @@ -60,12 +59,6 @@ ${python_configuration} > > __EOF__ > > } > > > > -pkg_setup() { > > - if use python; then > > - python_pkg_setup > > - fi > > -} > > - > > src_prepare() { > > epatch \ > > "${FILESDIR}/${PN}-1.48.0-mpi_python3.patch" \ > > @@ -129,7 +122,7 @@ src_compile() { > > create_user-config.jam > > > > ejam ${OPTIONS} \ > > - $(use python && echo --python-buildid=${PYTHON_ABI}) \ > > + $(use python && echo --python-buildid=${EPYTHON#python}) \ > > || die "Building of Boost libraries failed" > > > > if use python; then > > @@ -143,7 +136,7 @@ src_compile() { > > > > local dir > > for dir in ${PYTHON_DIRS}; do > > - mv ${dir} ${dir}-${PYTHON_ABI} || die "Renaming of '${dir}' to '${dir}-${PYTHON_ABI}' failed" > > + mv ${dir} ${dir}-${EPYTHON} || die > > Do we loose something by having an explicit error message? > Please leave it there (dito for all the other cases) Well, we lose readability when ebuild has 120-character long lines. > > > done > > > > if use mpi; then > > @@ -158,12 +151,12 @@ src_compile() { > > fi > > fi > > > > - mv stage/lib/mpi.so stage/lib/mpi.so-${PYTHON_ABI} || die "Renaming of 'stage/lib/mpi.so' to 'stage/lib/mpi.so-${PYTHON_ABI}' failed" > > + mv stage/lib/mpi.so stage/lib/mpi.so-${EPYTHON} || die > > fi > > fi > > } > > if use python; then > > - python_execute_function building > > + python_foreach_impl building > > else > > building > > fi > > @@ -184,19 +177,19 @@ src_install () { > > if use python; then > > local dir > > for dir in ${PYTHON_DIRS}; do > > - cp -pr ${dir}-${PYTHON_ABI} ${dir} || die "Copying of '${dir}-${PYTHON_ABI}' to '${dir}' failed" > > + cp -pr ${dir}-${EPYTHON} ${dir} || die > > done > > > > if use mpi; then > > - cp -p stage/lib/mpi.so-${PYTHON_ABI} "${MPI_PYTHON_MODULE}" || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to '${MPI_PYTHON_MODULE}' failed" > > - cp -p stage/lib/mpi.so-${PYTHON_ABI} stage/lib/mpi.so || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to 'stage/lib/mpi.so' failed" > > + cp -p stage/lib/mpi.so-${EPYTHON} "${MPI_PYTHON_MODULE}" || die > > + cp -p stage/lib/mpi.so-${EPYTHON} stage/lib/mpi.so || die > > fi > > fi > > > > ejam ${OPTIONS} \ > > --includedir="${D}usr/include" \ > > --libdir="${D}usr/$(get_libdir)" \ > > - $(use python && echo --python-buildid=${PYTHON_ABI}) \ > > + $(use python && echo --python-buildid=${EPYTHON#python}) \ > > install || die "Installation of Boost libraries failed" > > > > if use python; then > > @@ -222,10 +215,12 @@ else: > > del sys > > EOF > > fi > > + > > + python_optimize > > fi > > } > > if use python; then > > - python_execute_function installation > > + python_foreach_impl installation > > else > > installation > > fi > > @@ -320,18 +315,6 @@ pkg_preinst() { > > done > > } > > > > -pkg_postinst() { > > - if use mpi && use python; then > > - python_mod_optimize boost > > - fi > > -} > > - > > -pkg_postrm() { > > - if use mpi && use python; then > > - python_mod_cleanup boost > > - fi > > -} > > - > > # the tests will never fail because these are not intended as sanity > > # tests at all. They are more a way for upstream to check their own code > > # on new compilers. Since they would either be completely unreliable > > > -- Best regards, Michał Górny [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 316 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-12-15 14:27 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-12-14 22:08 [gentoo-python] [PATCHes] boost migration to python-r1 Michał Górny 2012-12-14 22:08 ` [gentoo-python] [PATCH 1/3] Let boost figure out the Python includedir itself Michał Górny 2012-12-15 11:34 ` [gentoo-python] " Tiziano Müller 2012-12-15 14:27 ` [gentoo-python] [PATCH] Pass absolute Python interpreter path to boost Michał Górny 2012-12-14 22:08 ` [gentoo-python] [PATCH 2/3] Commonize out $(python_get_sitedir)/boost into a variable Michał Górny 2012-12-15 11:35 ` [gentoo-python] " Tiziano Müller 2012-12-15 12:02 ` Michał Górny 2012-12-14 22:08 ` [gentoo-python] [PATCH 3/3] Convert to python-r1 Michał Górny 2012-12-15 11:42 ` [gentoo-python] " Tiziano Müller 2012-12-15 12:17 ` Michał Górny
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox