1 |
On Fri, Aug 16, 2013 at 4:11 PM, Michał Górny <mgorny@g.o> wrote: |
2 |
> The other solution is to put more hackery in the eclass. That is, find |
3 |
> all .egg files in ${S} and copy them to the future 'egg-base' for each |
4 |
> implementation. Then, we could keep both the separation of egg-info per |
5 |
> implementation and respect the initial contents. |
6 |
> |
7 |
> However, I'm not really happy to play that kind of games. Probably |
8 |
> the most proper place to put that logic would be 'esetup.py' function |
9 |
> but that would be just awful. Then there's |
10 |
> distutils-r1_python_prepare_all() which people still forget to call. |
11 |
> |
12 |
|
13 |
I actually think this might not be too bad. I don't often see |
14 |
conditional sources; more common are conditional install_depends, |
15 |
which end up in egg-info/requires.txt. |
16 |
|
17 |
I think it is relatively safe to copy *.egg-info/SOURCES.txt to |
18 |
BUILD_DIR. Here's a prototype: |
19 |
|
20 |
_copy_egg_info_SOURCES() { |
21 |
local egg_info x |
22 |
while read -r -d '' x; do |
23 |
if [[ -f ${x}/SOURCES.txt ]]; then |
24 |
egg_info=${x##*/} |
25 |
mkdir -p "${BUILD_DIR}/${egg_info}" || die |
26 |
cp "${x}/SOURCES.txt" "${BUILD_DIR}/${egg_info}/" || die |
27 |
fi |
28 |
done < <(find . -type d -name '*.egg-info' -print0) |
29 |
} |