|
From: Andre W. <wo...@us...> - 2004-11-17 11:28:10
|
Hi Andrea,
On 16.11.04, Andrea Riciputi wrote:
> I was working to a new Fink package for the new PyX 0.7, when realized
> that the *.lfs files are not found by PyX because are searched in the
> wrong place. After digging a little bit I've found a solution that I
> think is far less than optimal. It consists of a little patch to
> setup.py:
[snip]
> where @PREFIX@ is replaced before install phase by the Fink prefix
> directory (usually /sw).
>
> As far as I can remember Andre uses Fink as well, so I'm wondering if
> he know a better way of getting PyX installed with the right paths
> written in siteconfig.py
Right, I'm using Fink (so thanks by the way to you and the other
maintainers of the distribution, which allows me to add some of my
favourite software to my system without any hassle -- its a great
value!). But I do not install PyX systemwide myself to avoid confusion
between all the different versions I'm using ...
Back to the problem. Right. The Fink installation scheme needs some
adjustments. When I was working on the siteconfig.py this summer, I
excatly had in mind this Fink installation scheme. I searched for a
solution to modify the installation directories via distutils and it
should work (and help you to solve the issue). The idea is to modify
the installation root to place everything under /sw. While Python
distutils seems to be configured to use a prefix /sw instead (1), we
have to modify this behaviour. When I run:
python2.3 setup.py install --root=/sw --prefix=
distutils places the files under:
/sw/lib/python2.3/site-packages/pyx
(all the python files and c extension modules)
/sw/share/pyx (lfs-files, pyx.def)
/sw/etc/pyxrc
The siteconfig.py becomes:
lfsdir = '/sw/share/pyx'
sharedir = '/sw/share/pyx'
pyxrc = '/sw/etc/pyxrc'
and everything works well for me, as I just tried. Note that we do not
install the shared stuff to something like "pyx-py@PYTHON_FLAVOR@",
since the shared data do not depend on the python version. They might
depend on the PyX version, but actually they don't even do that
(currently).
> I've also read an old thread on PyX-devel (that I missed back on
> April), among Andre, Joerg and Fernando Perez about this topic, but it
> wasn't of much help, perhaps I've missed the point...
(This discussion was the starting point when I created the
siteconfig.py to keep some installation related path information. We
have to store it somewhere, as I learned from Fernando.)
André
(1) The problem with the prefix is, that it does not modifiy the
position of the files placed on an absolute path in the
setup-script. This affects /etc/pyxrc, which we also want to put
into /sw/etc/pyxrc. I do not understand, why the disutils default,
i.e. the configuration during installation of Python itself, is
not configured that way. The reason might be, that it just makes
no difference for python, since it does not install anything to
"/etc" or similar. But we want to place something in /etc and we
can do so by absolute path names only and for that the difference
between root and prefix becomes visible.
--
by _ _ _ Dr. André Wobst
/ \ \ / ) wo...@us..., http://www.wobsta.de/
/ _ \ \/\/ / PyX - High quality PostScript figures with Python & TeX
(_/ \_)_/\_/ visit http://pyx.sourceforge.net/
|