[Bug 895102] New: Dependency on python-nose is missing in python-matplotlib
https://bugzilla.novell.com/show_bug.cgi?id=895102 https://bugzilla.novell.com/show_bug.cgi?id=895102#c0 Summary: Dependency on python-nose is missing in python-matplotlib Classification: openSUSE Product: openSUSE 13.1 Version: Final Platform: All OS/Version: openSUSE 13.1 Status: NEW Severity: Normal Priority: P5 - None Component: Development AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: rolf@rotkraut.de QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 The Python package matplotlib lists nose as a requirement, see [1]. But the openSUSE package python-matplotlib fails to require python-nose. As a consequence, if you have python-matplotlib, but not python-nose installed, Python packages that require matplotlib using pkg_resources will fail. [1]: /usr/lib64/python2.7/site-packages/matplotlib-1.3.0_r0-py2.7.egg-info/requires.txt Reproducible: Always Steps to Reproduce: 1. Have python-matplotlib, but not python-nose installed, 2. run the following Python two-liner that tries to find matplotlib using pkg_resources: | from pkg_resources import require | require("matplotlib") 3. Actual Results: An exception is raised: | Traceback (most recent call last): | File "<stdin>", line 1, in <module> | File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 728, in require | needed = self.resolve(parse_requirements(requirements)) | File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 626, in resolve | raise DistributionNotFound(req) | pkg_resources.DistributionNotFound: nose Expected Results: No exception. The test program should have found matplotlib. require should have returned (a list with) a pkg_resources.Distribution object corresponding to the installed matplotlib package. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=895102 https://bugzilla.novell.com/show_bug.cgi?id=895102#c1 Bernhard Wiedemann <bwiedemann@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |dmueller@suse.com |ovo.novell.com | --- Comment #1 from Bernhard Wiedemann <bwiedemann@suse.com> 2014-09-08 10:44:06 CEST --- apart from python-nose your example would also need python-setuptools but I'm not sure this is actually the right way to use this - e.g. see http://matplotlib.org/users/pyplot_tutorial.html so there is clearly a way to use it without nose (which is for testing) which means it would at most be a Recommends and maybe only a Suggests (which seems to be not used at all atm) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=895102 https://bugzilla.novell.com/show_bug.cgi?id=895102#c2 --- Comment #2 from Rolf Krahl <rolf@rotkraut.de> 2014-09-08 10:46:15 UTC --- The problem with "the right way to use it" is the following: most Python packages are installed using setuptools nowadays. If such a package wants to provide a command line tool, the standard way using setuptools is not to write the Python script, but rather to define an entry point into some Python module. setuptools then generates a wrapper script. This wrapper recursively checks that all requirements (as defined in requires.txt in the egg-info) are installed, loads the module and calls the function named in the entry point. The two-liner in the bug report above is nothing then an explicit call to this recursive check that the wrapper scripts also perform. As a consequence, any package that requires matplotlib and installs a command line scripts using setuptools, will break, if python-nose is not installed, just because nose is listed as a requirement of matplotlib. This is certainly not the only way to use matplotlib. But it is the standard way to use it. On the requirement of python-setuptools: Yes, if some package python-foo installs a command line script using setuptools, then this script needs python-setuptools indeed. But this is then a requirement for python-foo, not for python-matplotlib. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=895102 https://bugzilla.novell.com/show_bug.cgi?id=895102#c3 Bernhard Wiedemann <bwiedemann@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bwiedemann@suse.com, | |toddrme2178@gmail.com --- Comment #3 from Bernhard Wiedemann <bwiedemann@suse.com> 2014-09-13 21:43:27 CEST --- note: there were some updates in devel:languages:python/python-matplotlib that might help here. Would be nice if you could try it. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=895102 https://bugzilla.novell.com/show_bug.cgi?id=895102#c4 --- Comment #4 from Rolf Krahl <rolf@rotkraut.de> 2014-09-14 11:26:55 UTC --- In a sense, these updates have been incited by myself. I submitted a request to fix this bug, see [1]. Unfortunately, the package maintainer does not seem to understand the problem and is unwilling to listen to explanations. He declined the request and finally superseded it by a version of his own, that corrects only some marginal issues but does not fix the bug. The bug is still there. The package in devel:languages:python still installs an egg-info that lists nose and mock as a requirement, but it fails to add python-nose and python-mock as required in the RPM dependencies. (The dependency on mock has been added in version 1.4.0 and was not 1.3.0 which is in openSUSE 13.1.) I have a fixed version of the package in my home repo, see [2]. I'm willing to resubmit the fix, if the maintainer is willing to accept it. [1]: https://build.opensuse.org/request/show/247602 [2]: https://build.opensuse.org/package/show/home:Rotkraut:branches:devel:languag... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com