Bug 273821 - Please include python bindings
Summary: Please include python bindings
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: file
Version: rawhide
Hardware: All
OS: All
medium
low
Target Milestone: ---
Assignee: Tomas Smetana
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 429595 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-01 13:36 UTC by Terje Røsten
Modified: 2008-02-06 09:21 UTC (History)
2 users (show)

Fixed In Version: 4.21-5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-02-06 09:21:02 UTC
Type: ---


Attachments (Terms of Use)

Description Terje Røsten 2007-09-01 13:36:02 UTC
I believe it make sense to build and ship the python bindings.

It's included in the tarball in the python/ subdir.

The package name should be python-magic.

I have built a separate python-magic package, available here:

 http://terjeros.fedorapeople.org/python-magic/

However it's better to build  and ship from the file srpm as the 
source tarball is identical.

Comment 1 Terje Røsten 2007-12-04 19:03:46 UTC
ping?

Comment 2 Tomas Smetana 2007-12-11 09:30:40 UTC
I was a bit concerned about the README:  "At the moment their status is
"experimental" and they are not built by default".  However I have taken your
spec file and merged into the file.spec to build the python-magic package.  If
you wish to review the spec and src.rpm:

http://tsmetana.fedorapeople.org/file/file.spec
http://tsmetana.fedorapeople.org/file/file-4.21-5.fc9.src.rpm

Comment 3 Terje Røsten 2007-12-12 06:59:14 UTC
Ok, rpmlint stuff first:

Change this line:

- resolves: #238789: file-devel depends on %{version} but not on
%{version}-%{release}

in spec to:

- resolves: #238789: file-devel depends on %%{version} but not on
%%{version}-%%{release}

(escape the % magic)

Remove the tab in the URL: line in spec file (mixing tabs and space in
spec file)

What's the license? rpmlint warnings: W: invalid-license Distributable

Add touch -r doc/libmagic.man doc/libmagic.man_ after iconv call to
preserve timestamp.

This line

Requires: python-devel %{name}-devel = %{version}

in %package -n python-magic is bogus, it's simple not true.

However you need to add python-devel to BuildRequires.

Please include python/example.py in %doc in python-magic. It's the only
place which describe howto to use the python interface.

The very first line which define python_sitelib is not used later and
should be removed.

According to guidelines %makeinstall should be avoided if possible.

make DESTDIR=${RPM_BUILD_ROOT} install

don't work?


Comment 4 Tomas Smetana 2008-01-22 06:58:30 UTC
*** Bug 429595 has been marked as a duplicate of this bug. ***

Comment 5 Tomas Smetana 2008-01-22 14:45:03 UTC
I've uploaded the new package and spec file at the same place:

http://tsmetana.fedorapeople.org/file/file.spec
http://tsmetana.fedorapeople.org/file/file-4.21-5.fc9.src.rpm

I hope it's OK now.  If there will be no objections, I'll push the update to
repositories.

Comment 6 Terje Røsten 2008-01-23 17:52:37 UTC
Yes, this is good stuff. 

One last thing: python building has changed in Fedora 9, now we must include egg
info files. My build on rawhide fails with:

Checking for unpackaged file(s): /usr/lib/rpm/check-files
/var/tmp/file-4.21-5.fc9-root-
error: Installed (but unpackaged) file(s) found:
 /usr/lib/python2.5/site-packages/Magic_file_extensions-0.1-py2.5.egg-info

To fix this add to %files:

%if 0%{?fedora} >= 9
%{python_sitelib}/*egg-info
%endif


Read more about the change regarding python eggs:

 http://fedoraproject.org/wiki/Packaging/Python/Eggs


Comment 7 Tomas Smetana 2008-01-24 09:56:49 UTC
I've built the package in devel with a small change: %{python_sitelib} has been
replaced by %{python_sitearch} because of 64bit systems.  Let me know if you
find any problems with the new packages.

Comment 8 Terje Røsten 2008-01-25 16:42:08 UTC
Ok, this seems fine. 

A push for updates testing for F-7 and F-8 would of course be good...

Comment 9 Fedora Update System 2008-01-27 07:17:06 UTC
file-4.21-4.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update file'.  You can provide feedback for this update here: http://admin.fedoraproject.org/F8/FEDORA-2008-1050


Note You need to log in before you can comment on or make changes to this bug.