Closed GoogleCodeExporter closed 9 years ago
A weird thing is that when I cd into BUILD directory and run ./jbrout.py there
everything starts without a problems.
Original comment by matej.c...@gmail.com
on 1 Jan 2009 at 9:54
on debian systems ...
the bash file "jbrout" is located in /usr/bin
and jbrout core files (py, gfx, plugins ..) are in /usr/lib/jbrout
I really think it's that the trouble (except dict problem (btw, I've got python
2.5.2
too))
I'm not really aware about fedora/rpms systems ...
It seems that your core files are in "/usr/share/jbrout" ... why ?
(the rpm should install them in /usr/lib/jbrout ... no ?)
Original comment by manat...@gmail.com
on 6 Jan 2009 at 6:51
All code in /usr/lib is platform-specific, /usr/share is not; remember,
comparing to
other Linux distributions, Red Hat distros are actually really able to work with
multiple platforms running at once -- x86_64/i386 (or ppc64/ppc) is actually
something which is happening quite often. Therefore the separation between
platform-specific and platform-neutral code is critical for success.
So yes, the main jbrout tree is /usr/share/jbrout and my /usr/bin/jbrout is
#!/bin/sh
APPPATH=/usr/share/jbrout/jbrout.py
PYTHON=`which python`
if [ $? != 0 ]; then
echo "jbrout requires Python >= 2.4 to be installed." >/dev/stderr
exit 1
fi
"$PYTHON" "$APPPATH" "$@"
Should I change this to something like
cd /usr/share/jbrout
./jbrout.py "$@"
???
Original comment by matej.c...@gmail.com
on 6 Jan 2009 at 11:08
the original (which is in the deb) jbrout bash file looks like this :
-------------------------------------------------
#!/bin/sh
path=`which jbrout` # to obtain self path
path=`dirname $path` # cd ..
path=`dirname $path` # cd ..
APPPATH=$path/lib/jbrout/jbrout.py
python "$APPPATH" "$@"
-------------------------------------------------
here, it will try to locate relativly the real jbrout.py, according the path of
itself.
You should adapt your APPPATH to point to your "share" no ?
BTW, if you got a better way to do this kind of things, or if you are able to
make an
universal version : I take, for sure ;-)
Original comment by manat...@gmail.com
on 8 Jan 2009 at 10:40
Well, strictly speaking -- when doing packages for distro, I could actually live
pretty well just with
#!/bin/sh
python /usr/share/jbrout/jbrout.py "$@"
or even
ln -sf /usr/share/jbrout/jbrout.py /usr/bin/jbrout
because I don't have to guess where my files are and what version python is
(there is
Requires: in rpm for that).
The question remains, does jbrout needs to be in /usr/share/jbrout when it is
being
started, so shouldn't I do
cd /usr/share/jbrout
./jbrout.py "$@"
instead?
Original comment by matej.c...@gmail.com
on 8 Jan 2009 at 2:01
jBrout needs to be in /usr/share/jbrout when it is being started !
(in fact jbrout.py should, from itself, place cwd in its current dir ... so you
shouldn't need to make the cd in the bash runner ... but it seems the trouble is
perhaps here, should don't cwd to itself)
Original comment by manat...@gmail.com
on 8 Jan 2009 at 2:07
I think that would be better. However, apparently the biggest problem was
something
wrong with my build scripts. Now, when I have fixed it, jbrout now works. And
yes,
even then I need to cd /usr/share/jbrout to get jbrout working. I really
believe that
jbrout.py should do os.chdir() there.
Original comment by matej.c...@gmail.com
on 8 Jan 2009 at 5:17
> I really believe that jbrout.py should do os.chdir() there.
it does it, see line 31 !
I close the issue
Original comment by manat...@gmail.com
on 8 Jan 2009 at 5:35
Original issue reported on code.google.com by
matej.c...@gmail.com
on 1 Jan 2009 at 9:52