Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Development (http://www.linux-archive.org/fedora-development/)
-   -   python packaging - /usr/bin accessibility (http://www.linux-archive.org/fedora-development/82375-python-packaging-usr-bin-accessibility.html)

"Pavel Shevchuk" 05-05-2008 01:49 PM

python packaging - /usr/bin accessibility
 
You can use %{_libdir} when you generate wrapper from specfile. Not
sure about ${1+"$@"}, don't know shell that well to decrypt this
expression =


On 5/5/08, David Timms <dtimms@iinet.net.au> wrote:
> Pavel Shevchuk wrote:
>
> >
> > > 1. the app has three main .py programs, and another 10 or so .py
> modules.
> > > My installed rpm puts these in site-packages/appname which I understand
> the
> > > guidelines to require. Problem is these are not accessible as a user
> because
> > > they aren't on the path.
> > > So it works if I
> > > /usr/lib/python../site-packages/myapp/app1.py
> > >
> > > Should I be messing with the path ?
> > > Creating a shell script for each of the main programs, and dropping
> them in
> > > /usr/bin ?
> > >
> >
> > Put a tiny wrapper in /usr/bin
> >
> > [stalwart@delta ~]$ cat /usr/bin/pyuic4
> > #!/bin/sh
> >
> > exec /usr/bin/python
> > /usr/lib64/python2.5/site-packages/PyQt4/uic/pyuic.py
> ${1+"$@"}
>
> How can I auto select the appropriate lib64/lib path ?
> What does ${1+"$@"} mean ?
> Is $1 first parameter passed ?
>
> would pyuic4 --fred=bloggs -a -v freg.txt -o temp.file
> then call ?
> /usr/lib64/python2.5/site-packages/PyQt4/uic/pyuic.py
> --fred=bloggs -a -v freg.txt -o temp.file
>
> DaveT.
>
> --
> fedora-devel-list mailing list
> fedora-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-devel-list
>


--
http://scwlab.com

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

David Timms 05-05-2008 02:06 PM

python packaging - /usr/bin accessibility
 
Pavel Shevchuk wrote:

You can use %{_libdir} when you generate wrapper from specfile. Not
sure about ${1+"$@"}, don't know shell that well to decrypt this
expression =

OK, so generating it on the fly would be normal ?

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

"Pavel Shevchuk" 05-05-2008 02:16 PM

python packaging - /usr/bin accessibility
 
I guess so


On 5/5/08, David Timms <dtimms@iinet.net.au> wrote:
> Pavel Shevchuk wrote:
>
> > You can use %{_libdir} when you generate wrapper from specfile. Not
> > sure about ${1+"$@"}, don't know shell that well to decrypt this
> > expression =
> >
> OK, so generating it on the fly would be normal ?
>
> --
> fedora-devel-list mailing list
> fedora-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-devel-list
>


--
http://scwlab.com

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

Harald Hoyer 05-05-2008 02:54 PM

python packaging - /usr/bin accessibility
 
David Timms wrote:

Pavel Shevchuk wrote:
1. the app has three main .py programs, and another 10 or so .py
modules.
My installed rpm puts these in site-packages/appname which I
understand the
guidelines to require. Problem is these are not accessible as a user
because

they aren't on the path.
So it works if I
/usr/lib/python../site-packages/myapp/app1.py

Should I be messing with the path ?
Creating a shell script for each of the main programs, and dropping
them in

/usr/bin ?

> Put a tiny wrapper in /usr/bin
>
> [stalwart@delta ~]$ cat /usr/bin/pyuic4
> #!/bin/sh
>
> exec /usr/bin/python
> /usr/lib64/python2.5/site-packages/PyQt4/uic/pyuic.py ${1+"$@"}

How can I auto select the appropriate lib64/lib path ?
What does ${1+"$@"} mean ?
Is $1 first parameter passed ?

would pyuic4 --fred=bloggs -a -v freg.txt -o temp.file
then call ?
/usr/lib64/python2.5/site-packages/PyQt4/uic/pyuic.py --fred=bloggs -a
-v freg.txt -o temp.file


DaveT.



lib64 is only needed, if you have installed binaries, which are arch specific.

$ python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
/usr/lib/python2.5/site-packages


$ python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)"
/usr/lib64/python2.5/site-packages

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list


All times are GMT. The time now is 10:09 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.