Bug 663956 - Review Request: python-numexpr - Fast numerical array expression evaluator for Python and NumPy.
Summary: Review Request: python-numexpr - Fast numerical array expression evaluator fo...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Susi Lehtola
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-17 13:55 UTC by Thibault North
Modified: 2015-05-24 20:31 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-31 14:38:01 UTC
Type: ---
Embargoed:
susi.lehtola: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Thibault North 2010-12-17 13:55:29 UTC
Spec URL: http://tnorth.fedorapeople.org/python-numexpr.spec
SRPM URL: http://tnorth.fedorapeople.org/python-numexpr-1.4.1-1.fc14.src.rpm
Description: 
The numexpr package evaluates multiple-operator array expressions many
times faster than NumPy can. It accepts the expression as a string,
analyzes it, rewrites it more efficiently, and compiles it to faster
Python code on the fly. It's the next best thing to writing the
expression in C and compiling it with a specialized just-in-time (JIT)
compiler, i.e. it does not require a compiler at runtime.

Comment 1 Susi Lehtola 2010-12-20 15:56:59 UTC
Please get rid of the Mandriva stuff:

%define name	python-%{module}
Name:		%{name}

is just silly. If you want to use the %{module} definition for something, then just do
Name:		python-%{module}

***

Drop

%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif

as you don't use it anywhere.

***

The build system looks a bit odd, since it doesn't print out the command used to compile the object file:

compiling C sources
C compiler: gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 
-g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/numexpr
compile options: '-I/usr/lib64/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c'
extra options: '-funroll-all-loops'
gcc: numexpr/interpreter.c
gcc -pthread -shared build/temp.linux-x86_64-2.7/numexpr/interpreter.o -L/usr/lib64 -lpython2.7 -o build/lib.linux-x86_64-2.7/numexpr/interpreter.so
running scons
+ exit 0


***

There's no need to use macros for standard commands, although this is not disallowed in the guidelines.

**

Please use the standard install command from the Python guidelines

python setup.py install -O1 --skip-build --root %{buildroot}

**

rpmlint output is not clean:
python-numexpr.src: W: spelling-error %description -l en_US runtime -> run time, run-time, runtish
python-numexpr.src: W: invalid-url Source0: http://numexpr.googlecode.com/files/numexpr-1.4.1.tar.gz HTTP Error 404: Not Found
python-numexpr.x86_64: W: spelling-error %description -l en_US runtime -> run time, run-time, runtish
python-numexpr.x86_64: E: non-standard-executable-perm /usr/lib64/python2.7/site-packages/numexpr/interpreter.so 0775L
3 packages and 0 specfiles checked; 1 errors, 3 warnings.


**

I'm not fond of using wildcards when they are not needed, as they can lead you to trouble such as owning something you're not supposed to, or not finding out if there are files missing from the release. Please be more explicit and change
 %{python_sitearch}/*
to
 %{python_sitearch}/numexpr/
 %{python_sitearch}/numexpr-%{version}-py*.egg-info/

Comment 2 Thibault North 2010-12-20 18:37:16 UTC
Hi Jussy,

Thanks for your comments. I have indeed requested a review a bit quickly, because I have been working on that package for my own use and wanted to commit it at some point. Please bear with me.

Here are some changes, and the spec + srpm have been updated.

I don't get the warning:
python-numexpr.x86_64: E: non-standard-executable-perm
/usr/lib64/python2.7/site-packages/numexpr/interpreter.so 0775L

And the URL is valid (there may be a redirection at some point which perturbs rpmlint).

Thanks,
Thibault

Comment 3 Susi Lehtola 2010-12-20 18:40:39 UTC
Please bump the release and make a changelog entry whenever you make changes to the spec file. Otherwise it's impossible for others to see what has been done.

Comment 4 Thibault North 2010-12-20 18:55:48 UTC
>Please bump the release and make a changelog entry whenever you make changes to
>the spec file. Otherwise it's impossible for others to see what has been done.

Ok... well anyway the spec is not versionned yet, and the spec will certainly be removed soon after the review. Plus, you gave the changes in your comment. I'll do that next time though.

Comment 5 Susi Lehtola 2010-12-20 21:11:16 UTC
Version:	1.4.1
Release:	1%{?dist}

This sure does look like versioning to me.

Versioning is performed already during the review, and you're not supposed to reset the EVR when the package is actually imported in Fedora. This way one can see e.g. that the correct spec was imported: it has happened to me once that an old version of a package that I was reviewing was imported by accident.

Comment 6 Thibault North 2010-12-21 17:23:34 UTC
>you're not supposed to reset the EVR when the package is actually imported in >Fedora

I agree with this, of course. But before versioning, old spec files are usually not available, as they are overwritten at each modification. Versioning is then equivalent to increment a number and add garbage in the %changelog section.

But anyways :-/

Here are the updated files:
Spec URL: http://tnorth.fedorapeople.org/python-numexpr.spec
SRPM URL: http://tnorth.fedorapeople.org/python-numexpr-1.4.1-2.fc14.src.rpm

Comment 7 Mario Blättermann 2011-04-29 10:56:29 UTC
$ rpmlint -v *
python-numexpr.src: I: checking
python-numexpr.src: W: spelling-error %description -l en_US runtime -> run time, run-time, runtish
python-numexpr.src: I: checking-url http://numexpr.googlecode.com/ (timeout 10 seconds)
python-numexpr.src:34: W: rpm-buildroot-usage %build python setup.py install -O1 --skip-build --root %{buildroot}
python-numexpr.src: I: checking-url http://numexpr.googlecode.com/files/numexpr-1.4.1.tar.gz (timeout 10 seconds)
python-numexpr.src: W: invalid-url Source0: http://numexpr.googlecode.com/files/numexpr-1.4.1.tar.gz HTTP Error 404: Not Found
python-numexpr.i686: I: checking
python-numexpr.i686: W: spelling-error %description -l en_US runtime -> run time, run-time, runtish
python-numexpr.i686: I: checking-url http://numexpr.googlecode.com/ (timeout 10 seconds)
python-numexpr-debuginfo.i686: I: checking
python-numexpr-debuginfo.i686: I: checking-url http://numexpr.googlecode.com/ (timeout 10 seconds)
python-numexpr.spec:34: W: rpm-buildroot-usage %build python setup.py install -O1 --skip-build --root %{buildroot}
python-numexpr.spec: I: checking-url http://numexpr.googlecode.com/files/numexpr-1.4.1.tar.gz (timeout 10 seconds)
python-numexpr.spec: W: invalid-url Source0: http://numexpr.googlecode.com/files/numexpr-1.4.1.tar.gz HTTP Error 404: Not Found
3 packages and 1 specfiles checked; 0 errors, 6 warnings.


The HTTP errors are due to problems with Google, I know about that.

Regarding the rpm-buildroot-usage error, please read the following:

http://lists.fedoraproject.org/pipermail/devel/2011-January/148045.html

Comment 8 Thibault North 2011-04-29 14:16:01 UTC
Old spec:
http://tnorth.fedorapeople.org/python-numexpr.old.spec

Updated spec:
Spec URL: http://tnorth.fedorapeople.org/python-numexpr.spec
SRPM URL: http://tnorth.fedorapeople.org/python-numexpr-1.4.1-3.fc14.src.rpm


rpmlint -v :
python-numexpr.src: W: spelling-error %description -l en_US runtime -> run
time, run-time, runtish
python-numexpr.src: W: invalid-url Source0:
http://numexpr.googlecode.com/files/numexpr-1.4.1.tar.gz HTTP Error 404: Not
Found
python-numexpr.x86_64: W: spelling-error %description -l en_US runtime -> run
time, run-time, runtish
3 packages and 0 specfiles checked; 0 errors, 3 warnings.
[tnorth@grouchy ~]$ rpmlint -v
/home/tnorth/rpmbuild/SRPMS/python-numexpr-1.4.1-3.fc14.src.rpm
/home/tnorth/rpmbuild/RPMS/x86_64/python-numexpr-1.4.1-3.fc14.x86_64.rpm
/home/tnorth/rpmbuild/RPMS/x86_64/python-numexpr-debuginfo-1.4.1-3.fc14.x86_64.rpm
python-numexpr.src: I: checking
python-numexpr.src: W: spelling-error %description -l en_US runtime -> run
time, run-time, runtish
python-numexpr.src: I: checking-url http://numexpr.googlecode.com/ (timeout 10
seconds)
python-numexpr.src: I: checking-url
http://numexpr.googlecode.com/files/numexpr-1.4.1.tar.gz (timeout 10 seconds)
python-numexpr.src: W: invalid-url Source0:
http://numexpr.googlecode.com/files/numexpr-1.4.1.tar.gz HTTP Error 404: Not
Found
python-numexpr.x86_64: I: checking
python-numexpr.x86_64: W: spelling-error %description -l en_US runtime -> run
time, run-time, runtish
python-numexpr.x86_64: I: checking-url http://numexpr.googlecode.com/ (timeout
10 seconds)
python-numexpr-debuginfo.x86_64: I: checking
python-numexpr-debuginfo.x86_64: I: checking-url http://numexpr.googlecode.com/
(timeout 10 seconds)
3 packages and 0 specfiles checked; 0 errors, 3 warnings.

Comment 9 Thibault North 2011-10-21 01:11:19 UTC
Let's try and finish with that review now.

New release, new spec:
http://tnorth.fedorapeople.org/python-numexpr.spec

SRPM: http://tnorth.fedorapeople.org/

rpmlint -v output:
python-numexpr.src: I: checking
python-numexpr.src: W: spelling-error %description -l en_US runtime -> run time, run-time, runtish
python-numexpr.src: I: checking-url http://numexpr.googlecode.com/ (timeout 10 seconds)
python-numexpr.src: I: checking-url http://numexpr.googlecode.com/files/numexpr-1.4.2.tar.gz (timeout 10 seconds)
python-numexpr.x86_64: I: checking
python-numexpr.x86_64: W: spelling-error %description -l en_US runtime -> run time, run-time, runtish
python-numexpr.x86_64: I: checking-url http://numexpr.googlecode.com/ (timeout 10 seconds)
python-numexpr-debuginfo.x86_64: I: checking
python-numexpr-debuginfo.x86_64: I: checking-url http://numexpr.googlecode.com/ (timeout 10 seconds)
3 packages and 0 specfiles checked; 0 errors, 2 warnings.

Comment 10 Susi Lehtola 2011-10-29 11:37:31 UTC
rpmlint output:
python-numexpr.src: W: spelling-error Summary(en_US) evaluator -> evaluate, elevator
python-numexpr.src: W: spelling-error %description -l en_US runtime -> run time, run-time, rudiment
python-numexpr.src: W: invalid-url Source0: http://numexpr.googlecode.com/files/numexpr-1.4.2.tar.gz HTTP Error 404: Not Found
python-numexpr.x86_64: W: spelling-error Summary(en_US) evaluator -> evaluate, elevator
python-numexpr.x86_64: W: spelling-error %description -l en_US runtime -> run time, run-time, rudiment
3 packages and 0 specfiles checked; 0 errors, 5 warnings.

These are OK (the URL does work).

**

About the chmod - files in %{python_sitelib} and %{python_sitearch} should have 644 permissions (755 for .so libraries), since they're normally not meant for execution, but instead are imported by other programs.

**

Since there are benchmarks included, you must run it in the %check phase to verify correct functionality, e.g.

%check
libdir=`ls build/|grep lib`
export PYTHONPATH=`pwd`/build/$libdir
python bench/timing.py

**

MUST: The package does not yet exist in Fedora. The Review Request is not a duplicate. OK

MUST: The spec file for the package is legible and macros are used consistently. NEEDSWORK
- Please use %global instead of %define.
http://fedoraproject.org/wiki/Packaging/Guidelines#.25global_preferred_over_.25define

MUST: The package must be named according to the Package Naming Guidelines. OK
MUST: The spec file name must match the base package %{name}. OK
MUST: The package must be licensed with a Fedora approved license and meet the  Licensing Guidelines. OK

MUST: The License field in the package spec file must match the actual license. OK
- LICENSE.txt defines a MIT license.
- License boilerplates are missing from the source code files. Please ask upstream to add them.

MUST: The sources used to build the package must match the upstream source, as provided in the spec URL. OK
139115cc196dc57a66b2eb30cd3e80a0  numexpr-1.4.2.tar.gz
139115cc196dc57a66b2eb30cd3e80a0  ../SOURCES/numexpr-1.4.2.tar.gz

MUST: The package MUST successfully compile and build into binary rpms. OK
MUST: The spec file MUST handle locales properly. N/A
MUST: Optflags are used and time stamps preserved. OK
MUST: Packages containing shared library files must call ldconfig. N/A
MUST: A package must own all directories that it creates or require the package that owns the directory. OK
MUST: Files only listed once in %files listings. OK
MUST: Debuginfo package is complete. OK

MUST: Permissions on files must be set properly. OK
- %defattr(-,root,root) is somewhat obsolete, usually %defattr(-,root,root,-) is used.
- You can also drop this altogether along with the cleaning stuff and BuildRoot tag, since they're defaulted in current versions of rpm.

MUST: Large documentation files must go in a -doc subpackage. N/A
MUST: All relevant items are included in %doc. Items in %doc do not affect runtime of application. OK
MUST: Header files must be in a -devel package. N/A
MUST: Static libraries must be in a -static package. N/A
MUST: If a package contains library files with a suffix then library files ending in .so must go in a -devel package. N/A
MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned, architecture dependent dependency. N/A
MUST: Packages does not contain any .la libtool archives. N/A
MUST: Desktop files are installed properly. N/A
MUST: No file conflicts with other packages and no general names. OK
SHOULD: %{?dist} tag is used in release. OK
SHOULD: If the package does not include license text(s) as separate files from upstream, the packager should query upstream to include it. OK
SHOULD: The package builds in mock. OK
EPEL: Clean section exists. OK
EPEL: Buildroot cleaned before install. OK
EPEL: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig'. N/A

**

Add the check phase and switch the define to global before git import. This package has been

APPROVED

Please also remember to ask upstream to add license boilerplates to the source files.

Comment 11 Thibault North 2011-10-30 19:17:57 UTC
- Fixed permissions for .py and .so files
- Add %check section after %build
- Use %global instead of %define
- Filed a bug upstream about licence boilerplates
- Removed %clean section, defattr and buildroot definition

Thank you for that review.

Comment 12 Thibault North 2011-10-30 19:24:24 UTC
And new SRPM...
http://tnorth.fedorapeople.org/python-numexpr-1.4.2-2.fc15.src.rpm

Comment 13 Thibault North 2011-10-30 19:26:52 UTC
New Package SCM Request
=======================
Package Name: python-numexpr
Short Description: Fast numerical array expression evaluator for Python and NumPy
Owners: tnorth
Branches: f14 f15 f16 el6

Comment 14 Gwyn Ciesla 2011-10-31 12:11:07 UTC
Git done (by process-git-requests).

Comment 15 Thibault North 2011-10-31 14:38:01 UTC
Builds done, updates pending. Thanks.

Comment 16 Orion Poplawski 2015-05-21 16:58:34 UTC
Thibault - would you be willing to maintain this in EPEL7?

Comment 17 Zbigniew Jędrzejewski-Szmek 2015-05-23 03:21:29 UTC
Package Change Request
======================
Package Name: python-numexpr
New Branches: epel7
Owners: tnorth zbyszek
InitialCC:

Comment 18 Gwyn Ciesla 2015-05-24 20:31:33 UTC
Git done (by process-git-requests).


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