From: Andrea R. <ari...@pi...> - 2004-11-17 14:17:46
|
Hi Andre, I see your point, and I've made a lot of trials. But I wasn't able to get fink to install properly PyX without my patch. AFA I can understand there are two problems here. I hope to be clear even if my english is not so good... :-( First of all I'll summarize how Fink works. Here there are the main steps (AFA I understood them): 1) fink create a new subtree: /sw/src/root-packagename 2) and put in there the expanded tarball and compile it 3) then it create another new subtree: /sw/src/root-packagename/sw 4) and it installs all the files under that subtree 5) at the end of this process you have all your files (in the case of PyX) under: /sw/src/root-pyx-wierda-py23-0.7-6/sw/lib/python2.3/site-packages/pyx- py23 /sw/src/root-pyx-wierda-py23-0.7-6/sw/share/pyx-py23 /sw/src/root-pyx-wierda-py23-0.7-6/sw/etc 5) at this point fink calls dpkg (the debian utily) that create a sort of debian package. 6) eventually dpkg installs the new package in the right location. Given the above picture let me start with the first problem. ** pyxrc subtree ** Without the patch line: > --- PyX-0.7/setup.py.orig Mon Nov 15 16:30:04 2004 > +++ PyX-0.7/setup.py Tue Nov > 16 13:24:08 2004 > @@ -53,7 +53,7 @@ > "pyx/lfs/foils30pt.lfs", > > "contrib/pyx.def"]), > # /etc is taken relative to "setup.py install > --root=..." - > ("/etc", ["pyxrc"])] > + ("@PREFIX@/etc", ["pyxrc"])] self.root is '/sw/src/root-pyx-wierda-py23-0.7-6' and the pyxrc file is written under /etc (not /sw/etc!!). As a side effect when the user try to remove pyx (with fink remove pyx) dpkg recognize that the only file that it has ever installed in /etc is pyxrc and so it removes /etc as well!! I've been lucky enough that /etc under MacOSX is a sym-link and not the effective directory!!! ** siteconfig.py ** Given the way in which Fink perform the installation process sitecofing.py contains the following lines: lfsdir = '/sw/src/root-pyx-wierda-py23-0.7-6/sw/share/pyx' sharedir = '/sw/src/root-pyx-wierda-py23-0.7-6/sw/share/pyx' pyxrc = '/sw/src/root-pyx-wierda-py23-0.7-6/etc/pyxrc' because self.install_dir is '/sw/src/root-pyx-wierda-py23-0.7-6/sw' so that PyX fails. The following patch fix the problem: > --- PyX-0.7/setup.py.orig Mon Nov 15 16:30:04 2004 > +++ PyX-0.7/setup.py Tue Nov 16 13:24:08 2004 > > @@ -95,8 +98,11 @@ > > def run(self): > install_data.run(self) > - self.pyx_lfsdir = self.pyx_sharedir = > os.path.join(self.install_dir, "share", "pyx") > - self.pyx_pyxrc = os.path.join(self.root or "/", "etc", > "pyxrc") > + self.pyx_lfsdir = self.pyx_sharedir = > os.path.join("@PREFIX@", "share", "pyx-py@PYTHON_FLAVOR@") > + self.pyx_pyxrc = os.path.join("@PREFIX@", "etc", "pyxrc") Evetually the @PYTHON_FLAVOR@ is mandatory because Fink still has Python 2.2 and 2.3 flavours and a user may want to have both installed. Any suggestion is welcome. Cheers, Andrea. |