diff options
author | yuri <yuri@FreeBSD.org> | 2018-09-20 04:39:09 +0800 |
---|---|---|
committer | yuri <yuri@FreeBSD.org> | 2018-09-20 04:39:09 +0800 |
commit | 6e0e60ecca39bc0799f6c512dcdbb4b8418f475d (patch) | |
tree | 9a3690dcce585986431e88e13ae1aedcc09aabe8 | |
parent | fe6eb1f55402c1653900233fdefb2d4e8c05c0c2 (diff) | |
download | freebsd-ports-gnome-6e0e60ecca39bc0799f6c512dcdbb4b8418f475d.tar.gz freebsd-ports-gnome-6e0e60ecca39bc0799f6c512dcdbb4b8418f475d.tar.zst freebsd-ports-gnome-6e0e60ecca39bc0799f6c512dcdbb4b8418f475d.zip |
New port: math/py-PuLP: LP modeler written in python
-rw-r--r-- | math/Makefile | 1 | ||||
-rw-r--r-- | math/py-PuLP/Makefile | 27 | ||||
-rw-r--r-- | math/py-PuLP/distinfo | 3 | ||||
-rw-r--r-- | math/py-PuLP/files/patch-setup.py | 32 | ||||
-rw-r--r-- | math/py-PuLP/files/patch-src_pulp_solvers.py | 12 | ||||
-rw-r--r-- | math/py-PuLP/pkg-descr | 10 |
6 files changed, 85 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile index f83a8d58c638..83d833270f7f 100644 --- a/math/Makefile +++ b/math/Makefile @@ -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 diff --git a/math/py-PuLP/Makefile b/math/py-PuLP/Makefile new file mode 100644 index 000000000000..ba7ab22ec572 --- /dev/null +++ b/math/py-PuLP/Makefile @@ -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> diff --git a/math/py-PuLP/distinfo b/math/py-PuLP/distinfo new file mode 100644 index 000000000000..beab99cf7c75 --- /dev/null +++ b/math/py-PuLP/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1522614449 +SHA256 (PuLP-1.6.8.tar.gz) = cfecd6a78c2b08539dc29b7e8281f43d729b1089bdb5e491c3c0956aadbb3fc7 +SIZE (PuLP-1.6.8.tar.gz) = 13546246 diff --git a/math/py-PuLP/files/patch-setup.py b/math/py-PuLP/files/patch-setup.py new file mode 100644 index 000000000000..0705cf472c65 --- /dev/null +++ b/math/py-PuLP/files/patch-setup.py @@ -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 = (""" diff --git a/math/py-PuLP/files/patch-src_pulp_solvers.py b/math/py-PuLP/files/patch-src_pulp_solvers.py new file mode 100644 index 000000000000..6702cd387d3b --- /dev/null +++ b/math/py-PuLP/files/patch-src_pulp_solvers.py @@ -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" diff --git a/math/py-PuLP/pkg-descr b/math/py-PuLP/pkg-descr new file mode 100644 index 000000000000..ef9ab94a7672 --- /dev/null +++ b/math/py-PuLP/pkg-descr @@ -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 |