1 |
Fabian Groffen wrote: |
2 |
> On 06-01-2008 01:16:16 +1300, Alistair Bush wrote: |
3 |
>> This email is to garner some discussion on my new project layout for |
4 |
>> javatoolkit. |
5 |
> [snip] |
6 |
>> You can browse the repo here |
7 |
>> http://overlays.gentoo.org/proj/java/browser/projects/javatoolkit/branches/layout_refactor_branch |
8 |
> |
9 |
> While you're at it, would it be possible to make javatoolkit a little |
10 |
> bit easier for use prefix folks to maintain? We're happily running Java |
11 |
> in our prefixes so any cooperation here would be greatly appreciated. |
12 |
> |
13 |
> We currently apply this patch: |
14 |
> http://overlays.gentoo.org/proj/alt/browser/trunk/prefix-overlay/dev-java/javatoolkit/files/0.2.0-prefix.patch |
15 |
> (trac is a bit picky about it, so please look at the plain text version |
16 |
> of it) |
17 |
> |
18 |
> As you can see, Prefix is mainly concerned with shebangs (/usr/bin/env |
19 |
> python should work for everyone just fine), and with adding the offset |
20 |
> prefix in the installation paths. I understand that not every path can |
21 |
> be dropped, but it would be great if the make stuff could be simplified, |
22 |
> by e.g. having a variable for the prefix (defaulting to /usr) such that |
23 |
> we could just simply only patch that one, instead of every place, as in |
24 |
> the patch. |
25 |
> |
26 |
> Thanks, |
27 |
> |
28 |
> |
29 |
|
30 |
I believe (and hope) that the distutils src_install() will handle this. |
31 |
Basically setup.py has a --root="${D}" option |
32 |
|
33 |
as in here |
34 |
|
35 |
distutils_src_install() { |
36 |
|
37 |
# need this for python-2.5 + setuptools in cases where |
38 |
# a package uses distutils but does not install anything |
39 |
# in site-packages. (eg. dev-java/java-config-2.x) |
40 |
# - liquidx (14/08/2006) |
41 |
pylibdir="$(${python} -c 'from distutils.sysconfig import |
42 |
get_python_lib; print get_python_lib()')" |
43 |
[ -n "${pylibdir}" ] && dodir "${pylibdir}" |
44 |
|
45 |
if has_version ">=dev-lang/python-2.3"; then |
46 |
${python} setup.py install --root=${D} --no-compile "$@" || die |
47 |
else |
48 |
${python} setup.py install --root=${D} "$@" || die |
49 |
fi |
50 |
|
51 |
DDOCS="CHANGELOG KNOWN_BUGS MAINTAINERS PKG-INFO CONTRIBUTORS TODO NEWS" |
52 |
DDOCS="${DDOCS} Change* MANIFEST* README* AUTHORS" |
53 |
|
54 |
for doc in ${DDOCS}; do |
55 |
[ -s "$doc" ] && dodoc $doc |
56 |
done |
57 |
|
58 |
[ -n "${DOCS}" ] && dodoc ${DOCS} |
59 |
} |
60 |
|
61 |
|
62 |
Is this acceptable? |
63 |
-- |
64 |
gentoo-java@g.o mailing list |