Bug 273821 - Please include python bindings
Please include python bindings
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: file (Show other bugs)
rawhide
All All
medium Severity low
: ---
: ---
Assigned To: Tomas Smetana
Fedora Extras Quality Assurance
:
: 429595 (view as bug list)
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2008-02-06 04:21:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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:

 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 14:03:46 EST
ping?
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:

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 01:59:14 EST
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 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:

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 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
/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 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.