Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 484416 - dev-python/scientificpython: inlines two-step python_doscript()
Summary: dev-python/scientificpython: inlines two-step python_doscript()
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal QA (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on: 488110
Blocks: 484398
  Show dependency tree
 
Reported: 2013-09-09 21:31 UTC by Michał Górny
Modified: 2014-03-13 14:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-09-09 21:31:05 UTC
python_compile() {
#...

    if use mpi; then
        cd Src/MPI
#                  ^ missing '|| die'!
        building_of_mpipython() {
            ${PYTHON} compile.py
            mv -f mpipython mpipython-${EPYTHON}
#                                     ^^^^^^^^^^^
        }
        python_foreach_impl building_of_mpipython
        # ^ this is broken, python_compile() is inside foreach_impl,
        # so you end up with foreach inside foreach...
    fi
}

python_install_all() {
    use doc && HTML_DOCS=( Doc/Reference/. )
    distutils-r1_python_install_all

    if use mpi; then
        dobin Src/MPI/mpipython-${EPYTHON}
        dosym python-exec /usr/bin/mpipython
#        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        insinto /usr/share/doc/${PF}
        doins Examples/mpi.py
    fi
}

See comments above. Then, you are still reimplementing internals of the eclass you're not supposed to touch. And I'm not sure how or if this thing even works.

But preferably do something like this:


python_compile() {
#...

    if use mpi; then
        cd Src/MPI || die
        "${PYTHON}" compile.py || die
        mv mpipython "${BUILD_DIR}"/ || die
    fi
}

# note: not the _all variant!
python_install() {
    distutils-r1_python_install

    use mpi && python_doscript "${BUILD_DIR}"/mpipython
}
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-09-17 20:12:44 UTC
FYI: I've forced python-exec:0 in the ebuild now. We will probably revisit this near python-exec:2 going stable, so please keep the bug open.
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2013-09-19 13:16:25 UTC
(In reply to Michał Górny from comment #0)
>     use mpi && python_doscript "${BUILD_DIR}"/mpipython
> }

That's impossible because python_doscript() doesn't support elf. On the otherhand kicking mpipython-python2.7 gives me a python shell as well as mpipython directly. So it seems the wrapper works with elf binaries.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-03-13 14:58:30 UTC
+*scientificpython-2.9.3 (13 Mar 2014)
+
+  13 Mar 2014; Michał Górny <mgorny@gentoo.org>
+  +files/scientificpython-2.9.3-mpi-netcdf.patch,
+  +scientificpython-2.9.3.ebuild:
+  Version bump. Use python_doexe() to switch Python wrapping to eclass, bug
+  #484416.