Bug 273821 - Please include python bindings
Please include python bindings
Product: Fedora
Classification: Fedora
Component: file (Show other bugs)
All All
medium Severity low
: ---
: ---
Assigned To: Tomas Smetana
Fedora Extras Quality Assurance
: 429595 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2007-09-01 09:36 EDT by Terje Røsten
Modified: 2008-02-06 04:21 EST (History)
2 users (show)

See Also:
Fixed In Version: 4.21-5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-02-06 04:21:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Terje Røsten 2007-09-01 09:36:02 EDT
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 14:03:46 EST
Comment 2 Tomas Smetana 2007-12-11 04:30:40 EST
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 01:59:14 EST
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 01:58:30 EST
*** Bug 429595 has been marked as a duplicate of this bug. ***
Comment 5 Tomas Smetana 2008-01-22 09:45:03 EST
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 12:52:37 EST
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 04:56:49 EST
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 11:42:08 EST
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 02:17:06 EST
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.