Bug 273821 - Please include python bindings
Summary: Please include python bindings
Alias: None
Product: Fedora
Classification: Fedora
Component: file
Version: rawhide
Hardware: All
OS: All
Target Milestone: ---
Assignee: Tomas Smetana
QA Contact: Fedora Extras Quality Assurance
: 429595 (view as bug list)
Depends On:
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:
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:


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

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:


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

in spec to:

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

(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:


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

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
error: Installed (but unpackaged) file(s) found:

To fix this add to %files:

%if 0%{?fedora} >= 9

Read more about the change regarding 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.