Bug 525192 - Review Request: python-mpmath - A pure Python library for multiprecision floating-point arithmetic
Summary: Review Request: python-mpmath - A pure Python library for multiprecision floa...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Thomas Spura
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-23 15:46 UTC by Susi Lehtola
Modified: 2015-06-11 18:45 UTC (History)
5 users (show)

Fixed In Version: python-mpmath-0.19-2.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-13 02:29:24 UTC
tomspur: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Susi Lehtola 2009-09-23 15:46:46 UTC
Spec URL:
http://theory.physics.helsinki.fi/~jzlehtol/rpms/python-mpmath.spec

SRPM URL:
http://theory.physics.helsinki.fi/~jzlehtol/rpms/python-mpmath-0.13-1.fc11.src.rpm

Upstream URL:
http://code.google.com/p/mpmath/

Description:
Mpmath is a pure-Python library for multiprecision floating-point arithmetic.
It provides an extensive set of transcendental functions, unlimited exponent
sizes, complex numbers, interval arithmetic, numerical integration and
differentiation, root-finding, linear algebra, and much more. Almost any
calculation can be performed just as well at 10-digit or 1000-digit precision,
and in many cases mpmath implements asymptotically fast algorithms that scale
well for extremely high precision work. If available, mpmath will (optionally)
use gmpy to speed up high precision operations.


rpmlint output is clean.

Comment 1 Jason Tibbitts 2009-09-23 20:22:09 UTC
Build failed for me in mock (x86_64, rawhide):

+ cp -pr 'doc/build/*' /builddir/build/BUILDROOT/python-mpmath-0.13-1.fc12.x86_64/usr/share/doc/python-mpmath-doc-0.13
cp: cannot stat `doc/build/*': No such file or directory

Failed koji build: http://koji.fedoraproject.org/koji/taskinfo?taskID=1701795

Please clear the whiteboard when you have a buildable package.

Comment 3 Susi Lehtola 2009-09-23 21:06:48 UTC
Scratch koji build at
http://koji.fedoraproject.org/koji/taskinfo?taskID=1701929

Comment 4 Michael J Gruber 2009-10-05 15:46:05 UTC
(In reply to comment #3)
> Scratch koji build at
> http://koji.fedoraproject.org/koji/taskinfo?taskID=1701929  

What's happening with mpmath? Are you planning to add another build?

Comment 5 Susi Lehtola 2009-10-05 16:05:00 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Scratch koji build at
> > http://koji.fedoraproject.org/koji/taskinfo?taskID=1701929  
> 
> What's happening with mpmath? Are you planning to add another build?  

Uhh.. what?

I'm waiting for someone to review this package, so I can import it in Fedora and build it for real.

Comment 6 Michael J Gruber 2009-10-06 07:05:59 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > Scratch koji build at
> > > http://koji.fedoraproject.org/koji/taskinfo?taskID=1701929  
> > 
> > What's happening with mpmath? Are you planning to add another build?  
> 
> Uhh.. what?
> 
> I'm waiting for someone to review this package, so I can import it in Fedora
> and build it for real.  

Maybe I'm misreading procedures, but both builds have been scratched from koji. So we're supposed to get the build from your site? OK, I'll check that one.

Comment 7 Michael J Gruber 2009-10-06 07:53:33 UTC
OK, rpmbuild --rebuilding on F11 x86_64, no gmpy:

Missing BR for the doc (math formulas):
dvipng

Even with dvipng, the warnings (see below) go down from 3 to 2 only. Two pics are missing from the plot doc.

All tests run fine, yeah!

Should matplotlib really be required? It's optional as per the mpmath doc.

From the build log:

Running Sphinx v0.6.3                                                                                                                                                               
No builder selected, using default: html                                                                                                                                            
building [html]: targets for 29 source files that are out of date                                                                                                                   
updating environment: 29 added, 0 changed, 0 removed                                                                                                                                
reading sources... [100%] technical                                                                                                                                                 
/home/mjg/rpmbuild/BUILD/mpmath-0.13/doc/source/basics.txt:221: WARNING: image file not readable: plot.png                                                                          
/home/mjg/rpmbuild/BUILD/mpmath-0.13/doc/source/basics.txt:227: WARNING: image file not readable: cplot.png                                                                         
looking for now-outdated files... none found                                                                                                                                        
pickling environment... done                                                                                                                                                        
checking consistency... done                                                                                                                                                        
preparing documents... done                                                                                                                                                         
WARNING: dvipng command 'dvipng' cannot be run (needed for math display), check the pngmath_dvipng setting                                                                          
writing output... [100%] technical                                                                                                                                                  
writing additional files... genindex search                                                                                                                                         
copying static files... done                                                                                                                                                        
dumping search index... done                                                                                                                                                        
dumping object inventory... done                                                                                                                                                    
build succeeded, 3 warnings.

Comment 8 Susi Lehtola 2009-10-06 08:59:36 UTC
Thanks; added BR: dvipng and check phase. Now it should be OK.

Well, I think the Requires: python-matplotlib is reasonable, since it adds some functionality. Opened bug #527407 to reduce the size of the python-matplotlib package.

http://theory.physics.helsinki.fi/~jzlehtol/rpms/python-mpmath.spec
http://theory.physics.helsinki.fi/~jzlehtol/rpms/python-mpmath-0.13-3.fc11.src.rpm

Comment 9 Michael J Gruber 2009-10-06 11:40:39 UTC
(In reply to comment #8)
> Thanks; added BR: dvipng and check phase. Now it should be OK.
> 
> Well, I think the Requires: python-matplotlib is reasonable, since it adds some
> functionality. Opened bug #527407 to reduce the size of the python-matplotlib
> package.

It adds functionality, sure, but it's neither required at build time nor at run time. It's not a *dependency*.

It is used if it is present, and as such you (rightly) advertise it in the package description.

> http://theory.physics.helsinki.fi/~jzlehtol/rpms/python-mpmath.spec
> http://theory.physics.helsinki.fi/~jzlehtol/rpms/python-mpmath-0.13-3.fc11.src.rpm  

There's also a new dependency python-py. Do we run these longish tests during rebuild for other python packages as well?

plot.png, cplot.png are still missing, btw.

Comment 10 Michael J Gruber 2009-10-06 13:51:18 UTC
Related note:

Works great when used with gmpy, see #527462 for a corresponding review request.

Comment 11 Susi Lehtola 2009-10-06 14:50:23 UTC
You mean bug #527462..

Comment 12 Susi Lehtola 2009-10-06 14:57:39 UTC
Replaced R: python-matplotlib with a comment in %description.
Added missing BR: python-matplotlib to make building of docs work.

http://theory.physics.helsinki.fi/~jzlehtol/rpms/python-mpmath.spec
http://theory.physics.helsinki.fi/~jzlehtol/rpms/python-mpmath-0.13-4.fc11.src.rpm

**

It's a general packaging guideline that the %check phase should be used whenever testing is possible (and it doesn't take ridiculously long amounts of time, i.e. hours). And it only affects building, not installation or use. Most of the time of the build process is spent on the documentation, anyway..

Comment 13 Michael J Gruber 2009-10-06 15:39:50 UTC
(In reply to comment #12)
> Replaced R: python-matplotlib with a comment in %description.
> Added missing BR: python-matplotlib to make building of docs work.
> 
> http://theory.physics.helsinki.fi/~jzlehtol/rpms/python-mpmath.spec
> http://theory.physics.helsinki.fi/~jzlehtol/rpms/python-mpmath-0.13-4.fc11.src.rpm

plot.png and cplot.png are still MIA over here. This is not helped by having matplotlib as BR. See file:///usr/share/doc/python-mpmath-doc-0.13/basics.html#plotting
 
> **
> 
> It's a general packaging guideline that the %check phase should be used
> whenever testing is possible (and it doesn't take ridiculously long amounts of
> time, i.e. hours). And it only affects building, not installation or use. Most
> of the time of the build process is spent on the documentation, anyway..  

OK.

Comment 14 Susi Lehtola 2009-10-06 16:48:28 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > Replaced R: python-matplotlib with a comment in %description.
> > Added missing BR: python-matplotlib to make building of docs work.
> > 
> > http://theory.physics.helsinki.fi/~jzlehtol/rpms/python-mpmath.spec
> > http://theory.physics.helsinki.fi/~jzlehtol/rpms/python-mpmath-0.13-4.fc11.src.rpm
> 
> plot.png and cplot.png are still MIA over here. This is not helped by having
> matplotlib as BR. See
> file:///usr/share/doc/python-mpmath-doc-0.13/basics.html#plotting

Ugh. You're right. I have no idea why it doesn't work.

Comment 15 Thomas Spura 2009-10-19 17:47:28 UTC
I asked upstream for this at [1]

They 'think' the two images are not included in the tar.gz, so they need to be added here with a patch or we ignore the warning ;)

[1] http://code.google.com/p/mpmath/issues/detail?id=162

Comment 16 Thomas Spura 2009-10-20 21:56:48 UTC
Package Review
==============

Key:
 - = N/A
 x = Check
 ! = Problem
 ? = Not evaluated

=== REQUIRED ITEMS ===
 [x] Package is named according to the Package Naming Guidelines.
 [x] Spec file name must match the base package %{name}, in the format %{name}.spec.
 [x] Package meets the Packaging Guidelines
 [x] Package successfully compiles and builds into binary rpms on at least one supported architecture.
     Tested on: 
       [] devel/i386 
       [] devel/x86_64
       [] F11/i386 
       [x] F11/x86_64
 [!] Rpmlint output:
$ rpmlint python-mpmath.spec python-mpmath-0.13-4.fc11.src.rpm noarch/python-mpmath-*
python-mpmath.noarch: W: incoherent-version-in-changelog 0.13-3 ['0.13-4.fc11', '0.13-4']
3 packages and 1 specfiles checked; 0 errors, 1 warnings.


 [x] Buildroot is correct
     (%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n))
 [x] Package is licensed with an open-source compatible license and meets other legal requirements as defined in the legal section of Packaging Guidelines.
 [?] License field in the package spec file matches the actual license.
     License type: New BSD
     rpmlint accepts this one, too, I'd write this one into it...


 [x] If (and only if) the source package includes the text of the license(s) in
its own file, then that file, containing the text of the license(s) for the
package is included in %doc.
 [x] Spec file is legible and written in American English.
 [x] Sources used to build the package matches the upstream source, as provided in the spec URL.
     Upstream source: ed7812cc7470c0b8fbbca76a2ff02075
     Build source:    ed7812cc7470c0b8fbbca76a2ff02075
 [x] Package is not known to require ExcludeArch
 [x] All build dependencies are listed in BuildRequires, except for any that are listed in the exceptions section of Packaging Guidelines.
 [-] The spec file handles locales properly.
 [-] ldconfig called in %post and %postun if required.
 [x] Package must own all directories that it creates.
 [x] Package requires other packages for directories it uses.
 [x] Package does not contain duplicates in %files.
 [x] Permissions on files are set properly.
 [x] Package has a %clean section, which contains rm -rf %{buildroot}.
 [x] Package consistently uses macros.
 [x] Large documentation files are in a -doc subpackage, if required.
     -tests subpackage, see at the bottom


 [x] Package uses nothing in %doc for runtime.
 [-] Header files in -devel subpackage, if present.
 [-] Static libraries in -devel subpackage, if present.
 [-] Package requires pkgconfig, if .pc files are present.
 [-] Development .so files in -devel subpackage, if present.
 [!] Fully versioned dependency in subpackages, if present.
    missing in -doc subpackage



 [x] Package does not contain any libtool archives (.la).
 [-] Package contains a properly installed %{name}.desktop file if it is a GUI application.
 [x] Package does not own files or directories owned by other packages.

=== SUGGESTED ITEMS ===
 [x] Latest version is packaged.
 [x] Package does not include license text files separate from upstream.
 [-] Description and summary sections in the package spec file contains translations for supported Non-English languages, if available.
 [x] Package should compile and build into binary rpms on all supported architectures.
http://koji.fedoraproject.org/koji/taskinfo?taskID=1758202


 [x] Package functions as described (no hardware to test with).
 [x] Scriptlets must be sane, if used.
 [x] The placement of pkgconfig(.pc) files is correct.
 


- It would be nice, if you would put the mpmath/tests subdir into a subpackage, as they are mostly not needed. That would reduce the size of the package about 1/3 (unpacked).
- The two missing pictures mentioned above are accepable. When running the examples by oneself, excatly that windows are opened, so no loss of functionality or documentation.

Comment 17 Susi Lehtola 2009-10-20 22:16:05 UTC
(In reply to comment #16)
>  [!] Rpmlint output:
> $ rpmlint python-mpmath.spec python-mpmath-0.13-4.fc11.src.rpm
> noarch/python-mpmath-*
> python-mpmath.noarch: W: incoherent-version-in-changelog 0.13-3 ['0.13-4.fc11',
> '0.13-4']
> 3 packages and 1 specfiles checked; 0 errors, 1 warnings.

fixed.

>  [?] License field in the package spec file matches the actual license.
>      License type: New BSD
>      rpmlint accepts this one, too, I'd write this one into it...

"New BSD" is not a valid license tag in Fedora, see
http://fedoraproject.org/wiki/Licensing#Good_Licenses
(BSD is the new license, BSD with advertising is the old 4-clause version that is GPL incompatible)

>  [!] Fully versioned dependency in subpackages, if present.
>     missing in -doc subpackage

The -doc package has no functional dependencies on python-mpmath. Added anyway.

> - It would be nice, if you would put the mpmath/tests subdir into a subpackage,
> as they are mostly not needed. That would reduce the size of the package about
> 1/3 (unpacked).

I'm not going to do this, since I would need to be 100% sure that it won't break anything. (I wonder why upstream wants to install the tests in the python library directory...)

> - The two missing pictures mentioned above are accepable. When running the
> examples by oneself, excatly that windows are opened, so no loss of
> functionality or documentation.  

.. and as you noted in comment #15 this is really just a bug in the upstream release that will be fixed in the next release.

http://theory.physics.helsinki.fi/~jzlehtol/rpms/python-mpmath.spec
http://theory.physics.helsinki.fi/~jzlehtol/rpms/python-mpmath-0.13-5.fc11.src.rpm

Comment 18 Thomas Spura 2009-10-20 23:19:42 UTC
(In reply to comment #17)
> > - It would be nice, if you would put the mpmath/tests subdir into a subpackage,
> > as they are mostly not needed. That would reduce the size of the package about
> > 1/3 (unpacked).
> 
> I'm not going to do this, since I would need to be 100% sure that it won't
> break anything. (I wonder why upstream wants to install the tests in the python
> library directory...)

How about asking upstream and doing later?
(not a blocker anyway)

Don't see what the line 'export PYTHONPATH=`pwd`/mpmath' does now better than in the old spec, where it was missing. But ok, if you like it ;)

_______________


APPROVED

Comment 19 Susi Lehtola 2009-10-21 07:09:07 UTC
(In reply to comment #18)
> (In reply to comment #17)
> > I'm not going to do this, since I would need to be 100% sure that it won't
> > break anything. (I wonder why upstream wants to install the tests in the python
> > library directory...)
> 
> How about asking upstream and doing later?
> (not a blocker anyway)

Yes, that's the way it should be done.

> Don't see what the line 'export PYTHONPATH=`pwd`/mpmath' does now better than
> in the old spec, where it was missing. But ok, if you like it ;)

Whoops, that shouldn't be there anymore. (It was part of trying to get the non- existing images to build :)

> APPROVED  

Thanks for the review!


New Package CVS Request
=======================
Package Name: python-mpmath
Short Description: A pure Python library for multiprecision floating-point arithmetic
Owners: jussilehtola
Branches: F-11 F-12
InitialCC:

Comment 20 Kevin Fenzi 2009-10-22 04:46:56 UTC
cvs done.

Comment 21 Fedora Update System 2009-10-22 09:23:22 UTC
python-mpmath-0.13-5.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/python-mpmath-0.13-5.fc11

Comment 22 Fedora Update System 2009-10-27 06:40:28 UTC
python-mpmath-0.13-5.fc11 has been pushed to the Fedora 11 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 python-mpmath'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-10750

Comment 23 Fedora Update System 2009-11-13 02:29:18 UTC
python-mpmath-0.13-5.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 24 Susi Lehtola 2011-10-12 09:10:45 UTC
Package Change Request
======================
Package Name: python-mpmath
New Branches: el5 el6
Owners: jussilehtola

Comment 25 Gwyn Ciesla 2011-10-12 12:41:35 UTC
Git done (by process-git-requests).

Comment 26 Orion Poplawski 2015-05-21 16:47:47 UTC
Susi - Could you branch and build for EPEL7?

Comment 27 Susi Lehtola 2015-05-22 00:41:27 UTC
Package Change Request
======================
Package Name: python-mpmath
New Branches: epel7
Owners: jussilehtola

Comment 28 Gwyn Ciesla 2015-05-22 12:47:50 UTC
Git done (by process-git-requests).

Comment 29 Fedora Update System 2015-05-22 19:12:36 UTC
python-mpmath-0.19-2.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/python-mpmath-0.19-2.el7

Comment 30 Fedora Update System 2015-06-11 18:45:39 UTC
python-mpmath-0.19-2.el7 has been pushed to the Fedora EPEL 7 stable repository.


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