New port: math/py-PuLP: LP modeler written in python
This commit is contained in:
parent
a473212128
commit
594fe32030
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=480111
6 changed files with 85 additions and 0 deletions
|
@ -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
|
||||
|
|
27
math/py-PuLP/Makefile
Normal file
27
math/py-PuLP/Makefile
Normal file
|
@ -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>
|
3
math/py-PuLP/distinfo
Normal file
3
math/py-PuLP/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1522614449
|
||||
SHA256 (PuLP-1.6.8.tar.gz) = cfecd6a78c2b08539dc29b7e8281f43d729b1089bdb5e491c3c0956aadbb3fc7
|
||||
SIZE (PuLP-1.6.8.tar.gz) = 13546246
|
32
math/py-PuLP/files/patch-setup.py
Normal file
32
math/py-PuLP/files/patch-setup.py
Normal file
|
@ -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 = ("""
|
12
math/py-PuLP/files/patch-src_pulp_solvers.py
Normal file
12
math/py-PuLP/files/patch-src_pulp_solvers.py
Normal file
|
@ -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"
|
10
math/py-PuLP/pkg-descr
Normal file
10
math/py-PuLP/pkg-descr
Normal file
|
@ -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
|
Loading…
Reference in a new issue