FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 05-05-2008, 01:29 PM
"Pavel Shevchuk"
 
Default python packaging - icons/desktop files and /usr/bin accessibility

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+"$@"}


On 5/5/08, David Timms <dtimms@iinet.net.au> wrote:
> I'm packaging a basic python program, and request some guidance:
>
> 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 ?
>
> 2. The app is a gui app, but has no icon nor desktop file. I thought I
> might have a go at adjusting the gnome flash player icon to represent flash
> recording capability. I guess I would need to talk to that upstream project
> to see if that would be OK ?
> The same with the upstream of my package to see if they are happy to have
> there app represented in this way ?
>
> 0. Should I be submitting the package review, with queries about the above,
> or is it better to get this stuff sorted here first ?
>
> 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
 
Old 05-05-2008, 02:57 PM
"Mary Ellen Foster"
 
Default python packaging - icons/desktop files and /usr/bin accessibility

On Mon, May 5, 2008 at 1:32 PM, David Timms <dtimms@iinet.net.au> wrote:
> I'm packaging a basic python program, and request some guidance:
>
> 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 ?

Note that if you want the libraries to be available to Python, as far
as I understand it, the standard way to do this is to a "*.pth" file
and put it into site-packages. For example, for my package (which puts
files into an "Ice" subdirectory), I created a file called ice.pth
containing only the following:
Ice
For yours, you probably want to create "myapp.pth" containing the line
"myapp" and install that into site-packages.

This doesn't answer the question of how to run the programs, though, of course.

MEF

--
Mary Ellen Foster -- http://homepages.inf.ed.ac.uk/mef/
Informatik 6: Robotics and Embedded Systems, Technische Universität München
and ICCS, School of Informatics, University of Edinburgh

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 05-06-2008, 02:01 PM
"Mary Ellen Foster"
 
Default python packaging - icons/desktop files and /usr/bin accessibility

[ NB: I sent this to fedora-packaging as well as fedora-devel, and
it's probably better to follow up there because this thread is
shifting focus ... ]

On Mon, May 5, 2008 at 10:54 PM, Toshio Kuratomi <a.badger@gmail.com> wrote:
> I took a closer look at Ice and I think there's a few things that should
> change.
>
> 1) AFAICS there's no reason for the python bindings to be part of the Ice
> package. It comes in a separate tarball and appears to build on its own. I
> can't find a mention of this in the review so I don't know if there's
> something special about it that I'm missing. [1]_

Actually, upstream is very soon releasing a new version of Ice where
all of the language bindings are in a single tarball, so I think I'll
stick with the monolithic SRPM.

> 2) The .pth file looks like it's being used to compensate for bad imports
> and upstream packaging.
> * There should be an __init__.py file in
> %{_libdir}/pythonX.Y/site-packages/Ice
>
> * The following files have imports that need to be changed:
> IceBox/__init__.py
> Glacier2/__init__.py
> IceGrid/__init__.py
> IceStorm/__init__.py
> IcePatch2/__init__.py
>
> change imports like::
> import IceBox_IceBox_ice
> to this::
> from Ice import IceBox_IceBox_ice

The problem is, those files are automatically generated using other
parts of the Ice program (using slice2py, to be specific). There's a
documented way that slice2py deals with packages and modules
(http://zeroc.com/doc/Ice-3.2.1/manual/Python.23.15.html#75777) that
I'm reluctant to touch.

I could remove the "Ice.pth" file and require people to set
PYTHONPATH, but unfortunately I don't think I can go changing the
actual (generated) __init__.py files.

> 3) Additionally, on x86_64, the python module is spread over two
> directories: /usr/lib64/python2.5/site-packages/Ice and
> /usr/lib/python2.5/site-packages/Ice. Python doesn't handle that very well.
> All the files of a module should be in a single directory. Since this
> module builds an ELF shared object (IcePy.so/IcePy.so.3.2.1) all files
> should be installed into %{python_sitearch}/ (This is what lead to BZ
> #392751).

Okay, sure, that's easy to fix. So I should put *.py* into site_arch
always, and put nothing into site_lib? The Python packaging guidelines
aren't amazingly clear on this point to a non-Python programmer like
me.

MEF

--
Mary Ellen Foster -- http://homepages.inf.ed.ac.uk/mef/
Informatik 6: Robotics and Embedded Systems, Technische Universität München
and ICCS, School of Informatics, University of Edinburgh

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

Thread Tools




All times are GMT. The time now is 05:41 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org