Bug 1418855

Summary: Review Request: python-PuLP - LP modeler written in python
Product: [Community] RDO Reporter: Alan Pevec (Fedora) <apevec>
Component: Package ReviewAssignee: Alan Pevec (Fedora) <apevec>
Status: CLOSED ERRATA QA Contact: hguemar
Severity: medium Docs Contact:
Priority: medium    
Version: trunkCC: apevec, chris.brown, dradez, hguemar, jpena, lobo, randy
Target Milestone: ---Flags: apevec: rdo-review+
Target Release: trunk   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-PuLP-1.6.1-5.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1407000 Environment:
Last Closed: 2017-06-18 13:10:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1327635, 1373513    

Description Alan Pevec (Fedora) 2017-02-02 22:12:09 UTC
+++ This bug was initially created as a clone of Bug #1407000 +++

We are proceeding with the package review in RDO using Conflicts workaround,
while upstreams are talking how to resolve it long term.

--- Additional comment from Dan Radez on 2017-01-13 10:13:32 EST ---

I've updated these files according to Haikel's recommendation:
https://radez.fedorapeople.org/python-PuLP.spec
https://radez.fedorapeople.org/python-PuLP-1.6.1-2.fc25.src.rpm

--- Additional comment from Alan Pevec on 2017-01-17 09:22:33 EST ---

This matches 2nd case, name conflict of not compatible libs : https://fedoraproject.org/wiki/Packaging:Conflicts#Library_Name_Conflicts

Guideline requires to ask one of the upstreams to rename itself, which is unlikely, so we need FPC ticket, I've opened: https://fedorahosted.org/fpc/ticket/671 and FYI bug 1414000 for current pulp RPM maintainers.

--- Additional comment from Alan Pevec on 2017-01-18 17:53:42 EST ---

Asked nicely in https://pulp.plan.io/issues/2531
got nice reply in https://fedorahosted.org/fpc/ticket/671#comment:4
so we are proceeding with Conflicts: solution in this review, while waiting for FPC approval.

Comment 1 Alan Pevec (Fedora) 2017-02-03 01:59:40 UTC
I've conditionalized python3 build so it can build on EL7 https://github.com/rdo-common/python-PuLP/commit/4a8a64a937c244ff64197de0646f800c9ef91c9b

Comment 3 Alan Pevec (Fedora) 2017-02-03 11:18:58 UTC
Final deps fix https://github.com/rdo-common/python-PuLP/commit/a7b349acb85b8e963f67b6392378e0ad18ceff67

With that we have a working package using system provided Coin command:

>>> import pulp
>>> pulp.pulpTestAll()
Solver pulp.solvers.PULP_CBC_CMD unavailable
Solver pulp.solvers.CPLEX_DLL unavailable
Solver pulp.solvers.CPLEX_CMD unavailable
Solver pulp.solvers.CPLEX_PY unavailable
	 Testing zero subtraction
	 Testing inconsistant lp solution
	 Testing continuous LP solution
	 Testing maximize continuous LP solution
	 Testing unbounded continuous LP solution
	 Testing Long Names
	 Testing repeated Names
	 Testing zero constraint
	 Testing zero objective
	 Testing LpVariable (not LpAffineExpression) objective
	 Testing Long lines in LP
	 Testing LpAffineExpression divide
	 Testing MIP solution
	 Testing MIP solution with floats in objective
	 Testing MIP relaxation
	 Testing feasibility problem (no objective)
	 Testing an infeasible problem
	 Testing an integer infeasible problem
	 Testing column based modelling
	 Testing fractional constraints
	 Testing elastic constraints (no change)
	 Testing elastic constraints (freebound)
	 Testing elastic constraints (penalty unchanged)
	 Testing elastic constraints (penalty unbounded)
* Solver pulp.solvers.COIN_CMD passed.
Solver pulp.solvers.COINMP_DLL unavailable
Solver pulp.solvers.GLPK_CMD unavailable
Solver pulp.solvers.XPRESS unavailable
Solver pulp.solvers.GUROBI unavailable
Solver pulp.solvers.GUROBI_CMD unavailable
Solver pulp.solvers.PYGLPK unavailable
Solver pulp.solvers.YAPOSIB unavailable

We might want to get it working also with COINMP_DLL and GLPK_CMD but not sure if it is worth it.

Comment 4 Alan Pevec (Fedora) 2017-02-03 12:01:55 UTC
Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated

===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "MIT/X11 (BSD like)", "Unknown or generated". 39 files have
     unknown license. Detailed output of licensecheck below.
[x]: Package does not own files or directories owned by other packages.
     Note: Dirs in package are owned also by: /usr/lib/python2.7/site-
     packages/pulp(python2-pulp-common)
     Resolved in RDO by Conflicts: python2-pulp-common
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
     Note: explict Conflicts was added to avoid Python namespace collision:
     https://fedorahosted.org/fpc/ticket/671
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[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 %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[x]: Python eggs must not download any dependencies during the build
     process.
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Package functions as described.
[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.
[!]: %check is present and all tests pass.
     Note: there aren't regular unittest upstream but there are examples
     which could be maybe reused as functional tests.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).


Rpmlint
-------
Checking: python2-PuLP-1.6.1-5.el7.noarch.rpm
          python-PuLP-1.6.1-5.el7.src.rpm
python2-PuLP.noarch: W: no-documentation
2 packages and 0 specfiles checked; 0 errors, 1 warnings.




Rpmlint (installed packages)
----------------------------
python2-PuLP.noarch: W: no-documentation
1 packages and 0 specfiles checked; 0 errors, 1 warnings.



Requires
--------
python2-PuLP (rpmlib, GLIBC filtered):
    coin-or-Cbc
    pyparsing
    python(abi)



Provides
--------
python2-PuLP:
    python-PuLP
    python2-PuLP



Source checksums
----------------
https://files.pythonhosted.org/packages/source/P/PuLP/PuLP-1.6.1.tar.gz :
  CHECKSUM(SHA256) this package     : 4281f9ef2e3b009fdae5d944a65d2f895583c23df7fec62f2631dd6083af08e5
  CHECKSUM(SHA256) upstream package : 4281f9ef2e3b009fdae5d944a65d2f895583c23df7fec62f2631dd6083af08e5


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -m rdo-common --rpm-spec --name ./python-PuLP-1.6.1-5.el7.src.rpm
Buildroot used: rdo-common
Active plugins: Python, Generic, Shell-api
Disabled plugins: Java, C/C++, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6


MIT/X11 (BSD like)
------------------
PuLP-1.6.1/LICENSE
PuLP-1.6.1/PKG-INFO
PuLP-1.6.1/src/pulp/__init__.py
PuLP-1.6.1/src/pulp/amply.py
PuLP-1.6.1/src/pulp/constants.py
PuLP-1.6.1/src/pulp/pulp.py
PuLP-1.6.1/src/pulp/solvers.py
PuLP-1.6.1/src/pulp/sparse.py

Unknown or generated
--------------------
PuLP-1.6.1/AUTHORS
PuLP-1.6.1/HISTORY
PuLP-1.6.1/INSTALL
PuLP-1.6.1/MANIFEST.in
PuLP-1.6.1/README.md
PuLP-1.6.1/docs.cfg
PuLP-1.6.1/examples/AmericanSteelProblem.py
PuLP-1.6.1/examples/BeerDistributionProblem.py
PuLP-1.6.1/examples/BeerDistributionProblem_resolve.py
PuLP-1.6.1/examples/CG.py
PuLP-1.6.1/examples/CGcolumnwise.py
PuLP-1.6.1/examples/ComputerPlantProblem.py
PuLP-1.6.1/examples/SpongeRollProblem1.py
PuLP-1.6.1/examples/SpongeRollProblem2.py
PuLP-1.6.1/examples/SpongeRollProblem3.py
PuLP-1.6.1/examples/SpongeRollProblem4.py
PuLP-1.6.1/examples/SpongeRollProblem5.py
PuLP-1.6.1/examples/SpongeRollProblem6.py
PuLP-1.6.1/examples/Sudoku1.py
PuLP-1.6.1/examples/Sudoku2.py
PuLP-1.6.1/examples/WhiskasModel1.py
PuLP-1.6.1/examples/WhiskasModel2.py
PuLP-1.6.1/examples/furniture.py
PuLP-1.6.1/examples/test1.py
PuLP-1.6.1/examples/test2.py
PuLP-1.6.1/examples/test3.py
PuLP-1.6.1/examples/test4.py
PuLP-1.6.1/examples/test5.py
PuLP-1.6.1/examples/test6.py
PuLP-1.6.1/examples/test7.py
PuLP-1.6.1/examples/wedding.py
PuLP-1.6.1/ez_setup.py
PuLP-1.6.1/setup.cfg
PuLP-1.6.1/setup.py
PuLP-1.6.1/src/pulp/pulp.cfg.buildout
PuLP-1.6.1/src/pulp/pulp.cfg.linux
PuLP-1.6.1/src/pulp/pulp.cfg.osx
PuLP-1.6.1/src/pulp/pulp.cfg.win
PuLP-1.6.1/src/pulp/tests.py

Comment 5 Christopher Brown 2017-06-18 13:10:58 UTC
This landed so closing.