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