Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Sep 2018 20:39:09 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r480111 - in head/math: . py-PuLP py-PuLP/files
Message-ID:  <201809192039.w8JKd9OC085798@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Wed Sep 19 20:39:09 2018
New Revision: 480111
URL: https://svnweb.freebsd.org/changeset/ports/480111

Log:
  New port: math/py-PuLP: LP modeler written in python

Added:
  head/math/py-PuLP/
  head/math/py-PuLP/Makefile   (contents, props changed)
  head/math/py-PuLP/distinfo   (contents, props changed)
  head/math/py-PuLP/files/
  head/math/py-PuLP/files/patch-setup.py   (contents, props changed)
  head/math/py-PuLP/files/patch-src_pulp_solvers.py   (contents, props changed)
  head/math/py-PuLP/pkg-descr   (contents, props changed)
Modified:
  head/math/Makefile

Modified: head/math/Makefile
==============================================================================
--- head/math/Makefile	Wed Sep 19 19:55:10 2018	(r480110)
+++ head/math/Makefile	Wed Sep 19 20:39:09 2018	(r480111)
@@ -659,6 +659,7 @@
     SUBDIR += pure-rational
     SUBDIR += py-Diofant
     SUBDIR += py-GridDataFormats
+    SUBDIR += py-PuLP
     SUBDIR += py-PyMetis
     SUBDIR += py-PySCIPOpt
     SUBDIR += py-PyWavelets

Added: head/math/py-PuLP/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/py-PuLP/Makefile	Wed Sep 19 20:39:09 2018	(r480111)
@@ -0,0 +1,27 @@
+# $FreeBSD$
+
+PORTNAME=	PuLP
+DISTVERSION=	1.6.8
+CATEGORIES=	math python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	LP modeler written in python
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pyparsing>=2.0.1:devel/py-pyparsing@${PY_FLAVOR} \
+		cbc:math/cbc \
+		glpsol:math/glpk
+
+USES=		python
+USE_PYTHON=	distutils autoplist
+NO_ARCH=	yes
+
+post-patch:
+	@${CP} ${WRKSRC}/src/pulp/pulp.cfg.linux ${WRKSRC}/src/pulp/pulp.cfg.freebsd
+	@${REINPLACE_CMD} -E 's/^(CplexPath|PulpCbcPath) = .*/#&/' ${WRKSRC}/src/pulp/pulp.cfg.freebsd
+
+.include <bsd.port.mk>

Added: head/math/py-PuLP/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/py-PuLP/distinfo	Wed Sep 19 20:39:09 2018	(r480111)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1522614449
+SHA256 (PuLP-1.6.8.tar.gz) = cfecd6a78c2b08539dc29b7e8281f43d729b1089bdb5e491c3c0956aadbb3fc7
+SIZE (PuLP-1.6.8.tar.gz) = 13546246

Added: head/math/py-PuLP/files/patch-setup.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/py-PuLP/files/patch-setup.py	Wed Sep 19 20:39:09 2018	(r480111)
@@ -0,0 +1,32 @@
+--- setup.py.orig	2017-07-10 22:15:07 UTC
++++ setup.py
+@@ -38,26 +38,12 @@ setup(name="PuLP",
+       #ext_modules = [pulpCOIN],
+       package_dir={'':'src'},
+       #need the cbc directories here as the executable bit is set
+-      packages = ['pulp', 
+-      'pulp.solverdir',
+-      'pulp.solverdir.cbc.linux.32',
+-      'pulp.solverdir.cbc.linux.64',
+-      'pulp.solverdir.cbc.win.32',
+-      'pulp.solverdir.cbc.win.64',
+-      'pulp.solverdir.cbc.osx.64'],
+-      package_data = {'pulp' : ["AUTHORS","LICENSE",
+-                                "pulp.cfg.linux",
+-                                "pulp.cfg.win",
+-                                "pulp.cfg.osx",
+-                                "LICENSE.CoinMP.txt",
++      packages = ['pulp'],
++      package_data = {'pulp' : ["AUTHORS",
++                                "pulp.cfg.freebsd",
+                                 "AUTHORS.CoinMP.txt",
+                                 "README.CoinMP.txt",
+                                 ],
+-                      'pulp.solverdir.cbc.linux.32' : ['*','*.*'],
+-                      'pulp.solverdir.cbc.linux.64' : ['*','*.*'],
+-                      'pulp.solverdir.cbc.win.32' : ['*','*.*'],
+-                      'pulp.solverdir.cbc.win.64' : ['*','*.*'],
+-                      'pulp.solverdir.cbc.osx.64' : ['*','*.*'],
+                       },
+       install_requires = ['pyparsing>=2.0.1'],
+       entry_points = ("""

Added: head/math/py-PuLP/files/patch-src_pulp_solvers.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/py-PuLP/files/patch-src_pulp_solvers.py	Wed Sep 19 20:39:09 2018	(r480111)
@@ -0,0 +1,12 @@
+--- src/pulp/solvers.py.orig	2017-07-16 22:25:50 UTC
++++ src/pulp/solvers.py
+@@ -135,6 +135,9 @@ elif sys.platform in ['darwin']:
+     operating_system = "osx"
+     arch = '64'
+     PULPCFGFILE += ".osx"
++elif sys.platform in ['freebsd']:
++    operating_system = "freebsd"
++    PULPCFGFILE += ".freebsd"
+ else:
+     operating_system = "linux"
+     PULPCFGFILE += ".linux"

Added: head/math/py-PuLP/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/py-PuLP/pkg-descr	Wed Sep 19 20:39:09 2018	(r480111)
@@ -0,0 +1,10 @@
+PuLP is an LP modeler written in python. PuLP can generate MPS or LP files and
+call
+* GLPK
+* COIN
+* CLP/CBC
+* CPLEX (commercial package)
+* GUROBI (commercial package)
+to solve linear problems
+
+WWW: https://github.com/coin-or/pulp



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809192039.w8JKd9OC085798>