Bug 502502 - mwlib should pull python-setuptools
mwlib should pull python-setuptools
Status: CLOSED ERRATA
Product: Fedora EPEL
Classification: Fedora
Component: python-mwlib (Show other bugs)
el5
All Linux
low Severity medium
: ---
: ---
Assigned To: Jasper Capel
Fedora Extras Quality Assurance
ActualBug
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-25 10:38 EDT by Michal Nowak
Modified: 2013-03-07 21:06 EST (History)
5 users (show)

See Also:
Fixed In Version: python-qserve-0.2.7-1.fc17
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-28 05:42:15 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)
ODF-Patch from Bug 486678 without require-changes (1.11 KB, patch)
2010-03-03 08:40 EST, Dirk Götz
no flags Details | Diff
Patch to remove requires (722 bytes, patch)
2010-03-03 08:41 EST, Dirk Götz
no flags Details | Diff
Changed Specfile (3.73 KB, text/plain)
2010-03-03 08:45 EST, Dirk Götz
no flags Details

  None (edit)
Description Michal Nowak 2009-05-25 10:38:27 EDT
Description of problem:

Installed mwlib and ran it:

[root@hp-ml370g4-01 candcplusplus]# mw-render -c http://fedoraproject.org/w/ -w docbook Some_wiki_page -o Some_wiki_page.xml
Traceback (most recent call last):
  File "/usr/bin/mw-render", line 5, in ?
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

installed python-setuptools:

[root@hp-ml370g4-01 candcplusplus]# mw-render -c http://fedoraproject.org/w/ -w docbook Some_wiki_page -o Some_wiki_page.xml
Traceback (most recent call last):
  File "/usr/bin/mw-render", line 5, in ?
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 2561, in ?
    working_set.require(__requires__)
  File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 626, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 524, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: elementtree>=1.2.6

But:

[root@hp-ml370g4-01 candcplusplus]# rpmquery python-elementtree
python-elementtree-1.2.6-5

(elementtree bug?)

Version-Release number of selected component (if applicable):

python-mwlib-0.9.10-5.el5
Comment 1 Jasper Capel 2009-05-26 04:44:36 EDT
Strange... I'll look into it next week.
Comment 2 Dirk Götz 2010-02-25 02:58:06 EST
Hi, Jasper, can I bring back your interest on the bug? I am running in the same problem.
Comment 3 Jasper Capel 2010-02-25 06:02:28 EST
I'm actually swamped at the moment. If you could look into this and maybe propose a fix, I can certainly incorporate that into the package.
Comment 4 Dirk Götz 2010-02-26 02:43:16 EST
My python knowhow is not that great but I have a idea, please correct me if I am wrong.

I have removed the requirement from /usr/lib64/python2.4/site-packages/mwlib-0.9.10-py2.4.egg-info/requires.txt, then the next requirement was triggered wsgiref>=0.1.2, so I installed python-wsgiref, which fixed the requirement. Then I started removing all requirements which were not fixed by installing the package. Looking in the packages I have seen one mayor differences, requirements which were found have an egg-info in it, the others does not come with one.

Another problem I see are the requirements odfpy==0.7.0, which is available as odfpy-0.9-1.el5, and python-dateutil>=1.4.1, which is only available as python-dateutil-1.2-1.el5.

Tell me what you think about it!
Comment 5 Dirk Götz 2010-03-03 08:40:05 EST
Created attachment 397557 [details]
ODF-Patch from Bug 486678 without require-changes

ODF-Patch from Bug 486678 without require-changes
Comment 6 Dirk Götz 2010-03-03 08:41:44 EST
Created attachment 397558 [details]
Patch to remove requires

Patch to remove requires within python will be replaced through requires in rpm
Comment 7 Dirk Götz 2010-03-03 08:45:07 EST
Created attachment 397559 [details]
Changed Specfile

Specfile to apply patches to move requirements from python to rpm
Comment 8 Dirk Götz 2010-03-03 08:53:34 EST
I made following changes, I applied the odf-Patch from Bug 486678, removed the requirements in python and added it to rpm. This results in:
# mw-render --list-writers
sh: texvc: command not found
xhtml   XHTML 1.0 Transitional
mwxml   XML representation of the parse tree
docbook DocBook XML
odf     OpenDocument Text

#mw-render --config=http://testwiki/wiki/ --login=USER:PASSWORD --writer=odf --output=/tmp/test.odt Wikipage 
gives me a readable odt-Document

#mw-serve --cache-dir=/var/cache/mwlib/ --logfile=/var/log/mwlib/mwserve.log --mwrender-logfile=/var/log/mwlib/mwrender.log --mwzip-logfile=/var/log/mwlib/mwzip.log --mwpost-logfile=/var/log/mwlib/mwpost.log
starts a working rendering server

But I dont know if the patch to remove the requirements in python is allowed by packaging policy.
Comment 9 Jasper Capel 2010-03-03 09:21:19 EST
If we can't avoid it to get it working then I have no issues with removing requires from setup.py (staying as close as possible to upstream would be great, but we already have the spec-file for pulling in dependencies). One thing that should be avoided, is having the build pull in python eggs on build-time, but I don't think that is happening (it should only be happening if setup.py detects it needs something external) so that's good.

To summarize, do all patches you attached to this bug need to be applied?

I will check up on this and if it's OK I'll push a test package to epel-testing first.
Comment 10 Dirk Götz 2010-03-03 09:35:51 EST
The odf-patch is needed because of the buildin test against the odfpy-version, details you can find in the mentioned bug. The require-patch is done because it can not verify the requirements fulfilled by some rpms. So to summarize the both patches are needed. 
The changed spec shows the changes I have done to use the patches and the last Requires is added to fulfill the requirements I have found.

I hope all questions are answered and it will work for all.
Comment 11 Jason Antman 2011-05-12 13:25:48 EDT
Has anyone done any work on this? It's over a year later, and I'm running into the problems mentioned above...
Comment 12 Fedora Update System 2012-02-14 18:24:37 EST
python-mwlib-0.13.3-4.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/python-mwlib-0.13.3-4.fc17
Comment 13 Fedora Update System 2012-02-14 18:26:30 EST
python-mwlib-0.13.3-4.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/python-mwlib-0.13.3-4.fc16
Comment 14 Fedora Update System 2012-02-15 06:35:52 EST
Package python-mwlib-0.13.3-4.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-mwlib-0.13.3-4.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-1698/python-mwlib-0.13.3-4.fc16
then log in and leave karma (feedback).
Comment 15 Dirk Götz 2012-02-15 07:35:40 EST
Thanks for providing a new version. I have tried it and it fixes the issues.

mw-render --list-writers shows the odf-writer.
mw-render --config=http://testwiki/wiki/ --login=USER:PASSWORD --writer=odf
--output=/tmp/test.odt Wikipage creates a readable odf-Document.
mw-serve does not exist anymore, but scripts are available to replace its functionality with supervisor. 

But bug was created against EPEL, so is it possible to provide a newer version for EPEL5 and/or EPEL6?
Comment 16 Fedora Update System 2012-02-15 18:08:19 EST
python-qserve-0.2.7-1.fc17, python-mwlib-0.13.4-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/python-qserve-0.2.7-1.fc17,python-mwlib-0.13.4-1.fc17
Comment 17 Fedora Update System 2012-02-28 05:42:15 EST
python-qserve-0.2.7-1.fc17, python-mwlib-0.13.4-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

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