Re: javatoolkit: new project layout
Alistair Bush <[email protected]>
| Newsgroups | gmane.linux.gentoo.java |
|---|---|
| Message-ID | <[email protected]> |
Fabian Groffen wrote:
> On 06-01-2008 01:16:16 +1300, Alistair Bush wrote:
>> This email is to garner some discussion on my new project layout for
>> javatoolkit.
> [snip]
>> You can browse the repo here
>> http://overlays.gentoo.org/proj/java/browser/projects/javatoolkit/branches/layout_refactor_branch
>
> While you're at it, would it be possible to make javatoolkit a little
> bit easier for use prefix folks to maintain? We're happily running Java
> in our prefixes so any cooperation here would be greatly appreciated.
>
> We currently apply this patch:
> http://overlays.gentoo.org/proj/alt/browser/trunk/prefix-overlay/dev-java/javatoolkit/files/0.2.0-prefix.patch
> (trac is a bit picky about it, so please look at the plain text version
> of it)
>
> As you can see, Prefix is mainly concerned with shebangs (/usr/bin/env
> python should work for everyone just fine), and with adding the offset
> prefix in the installation paths. I understand that not every path can
> be dropped, but it would be great if the make stuff could be simplified,
> by e.g. having a variable for the prefix (defaulting to /usr) such that
> we could just simply only patch that one, instead of every place, as in
> the patch.
>
> Thanks,
>
>
I believe (and hope) that the distutils src_install() will handle this.
Basically setup.py has a --root="${D}" option
as in here
distutils_src_install() {
# need this for python-2.5 + setuptools in cases where
# a package uses distutils but does not install anything
# in site-packages. (eg. dev-java/java-config-2.x)
# - liquidx (14/08/2006)
pylibdir="$(${python} -c 'from distutils.sysconfig import
get_python_lib; print get_python_lib()')"
[ -n "${pylibdir}" ] && dodir "${pylibdir}"
if has_version ">=dev-lang/python-2.3"; then
${python} setup.py install --root=${D} --no-compile "$@" || die
else
${python} setup.py install --root=${D} "$@" || die
fi
DDOCS="CHANGELOG KNOWN_BUGS MAINTAINERS PKG-INFO CONTRIBUTORS TODO NEWS"
DDOCS="${DDOCS} Change* MANIFEST* README* AUTHORS"
for doc in ${DDOCS}; do
[ -s "$doc" ] && dodoc $doc
done
[ -n "${DOCS}" ] && dodoc ${DOCS}
}
Is this acceptable?
--
[email protected] mailing list