Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 486708 - distutils-r1: support for calling multiple times is broken ATM
Summary: distutils-r1: support for calling multiple times is broken ATM
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-01 20:02 UTC by Michał Górny
Modified: 2018-02-27 10:20 UTC (History)
0 users

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-10-01 20:02:06 UTC
Right now, it's not possible to call some of the distutils-r1 phase functions more than once. In particular, the setup tasks performed by distutils-r1_python_compile are not suitable for calling multiple times.

Any thoughts how we could handle this cleanly? How should we support multiple impls?
Comment 1 Mike Gilbert gentoo-dev 2013-10-01 21:36:09 UTC
If someone is going to call distutils-r1_src_{compile,install} more than once, the cleanest thing would be to have a separate build directory for each instance.

I think the most common usage for this would be multiple python projects in the same package. To solve that case, we could set BUILD_DIR based on the current working directory.

To illustrate:

: EPYTHON=python2.7
: PWD=${WORKDIR}/foo-1.2.2/project1
BUILD_DIR=${WORKDIR}/build-python2.7/foo-1.2.2/project1

: EPYTHON=python3.3
: PWD=${WORKDIR}/${P}/project2
BUILD_DIR=${WORKDIR}/build-python3.3/foo-1.2.2/project2


The actual BUILD_DIR assignment would be this:

BUILD_DIR=${WORKDIR}/build-${EPYTHON}/${PWD#${WORKDIR}}
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-10-02 07:22:02 UTC
Sounds reasonable. What about pydistutils.cfg? Should we place it (and therefore $HOME) inside $BUILD_DIR? Or maybe we should re-create that file in every phase?
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-02-27 10:20:10 UTC
Seems nobody came up with a real need for this so far.