diff options
author | yuri <yuri@FreeBSD.org> | 2018-09-24 04:02:46 +0800 |
---|---|---|
committer | yuri <yuri@FreeBSD.org> | 2018-09-24 04:02:46 +0800 |
commit | 0be7a826ea5671f317eadb774a0521d2d7d25cb4 (patch) | |
tree | a1b40e9718c137e7c59ab5ed2e94659a6bad43c1 /math/py-CyLP | |
parent | 39a7f323bc1f2990b0f206f16eceb9b7f37f46e6 (diff) | |
download | freebsd-ports-gnome-0be7a826ea5671f317eadb774a0521d2d7d25cb4.tar.gz freebsd-ports-gnome-0be7a826ea5671f317eadb774a0521d2d7d25cb4.tar.zst freebsd-ports-gnome-0be7a826ea5671f317eadb774a0521d2d7d25cb4.zip |
New port: math/py-CyLP: Python interface to CLP, CBC, and CGL to solve LPs and MIPs
Diffstat (limited to 'math/py-CyLP')
-rw-r--r-- | math/py-CyLP/Makefile | 37 | ||||
-rw-r--r-- | math/py-CyLP/distinfo | 3 | ||||
-rw-r--r-- | math/py-CyLP/files/patch-setup.py | 11 | ||||
-rw-r--r-- | math/py-CyLP/pkg-descr | 7 |
4 files changed, 58 insertions, 0 deletions
diff --git a/math/py-CyLP/Makefile b/math/py-CyLP/Makefile new file mode 100644 index 000000000000..1a81629ad17c --- /dev/null +++ b/math/py-CyLP/Makefile @@ -0,0 +1,37 @@ +# $FreeBSD$ + +PORTNAME= cylp +DISTVERSION= 0.7.2-30 +DISTVERSIONSUFFIX= -g65a985b +CATEGORIES= math python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Python interface to CLP, CBC, and CGL to solve LPs and MIPs + +LICENSE= CPL10 +LICENSE_NAME= Common Public License Version 1.0 +LICENSE_FILE= ${WRKSRC}/LICENSE +LICENSE_PERMS= auto-accept dist-mirror dist-sell pkg-mirror pkg-sell + +BUILD_DEPENDS= ${PYNUMPY} \ + ${PYTHON_PKGNAMEPREFIX}scipy>=0.10.0:science/py-scipy@${FLAVOR} +LIB_DEPENDS= libblas.so:math/blas \ + libCbc.so:math/cbc \ + libCgl.so:math/cgl \ + libClp.so:math/clp \ + liblapack.so:math/lapack +RUN_DEPENDS:= ${BUILD_DEPENDS} + +USES= python:2.7 # 3.X support is still in the pull request: https://github.com/coin-or/CyLP/pull/28 +USE_GITHUB= yes +GH_ACCOUNT= coin-or +GH_PROJECT= CyLP +USE_PYTHON= distutils cython autoplist + +MAKE_ENV= COIN_INSTALL_DIR=${LOCALBASE} + +post-install: + @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/cylp/cy/Cy*.so + +.include <bsd.port.mk> diff --git a/math/py-CyLP/distinfo b/math/py-CyLP/distinfo new file mode 100644 index 000000000000..8a17a538a021 --- /dev/null +++ b/math/py-CyLP/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1537731308 +SHA256 (coin-or-CyLP-0.7.2-30-g65a985b_GH0.tar.gz) = 9a611fe5e530b61ac4d9c496d7cae88f25491bb571cb3ce3c37ebcb785ee1870 +SIZE (coin-or-CyLP-0.7.2-30-g65a985b_GH0.tar.gz) = 10514134 diff --git a/math/py-CyLP/files/patch-setup.py b/math/py-CyLP/files/patch-setup.py new file mode 100644 index 000000000000..f2607cf7e063 --- /dev/null +++ b/math/py-CyLP/files/patch-setup.py @@ -0,0 +1,11 @@ +--- setup.py.orig 2014-02-14 17:25:06 UTC ++++ setup.py +@@ -108,7 +108,7 @@ ext_modules = [] + + if operatingSystem == 'mac': + extra_link_args = ['-Wl,-framework', '-Wl,Accelerate', '-headerpad_max_install_names'] +-elif operatingSystem == 'linux': ++elif operatingSystem == 'linux' or operatingSystem.startswith('freebsd'): + extra_link_args = ['-lrt'] + else: + # Assuming Windows diff --git a/math/py-CyLP/pkg-descr b/math/py-CyLP/pkg-descr new file mode 100644 index 000000000000..7c8a40505c64 --- /dev/null +++ b/math/py-CyLP/pkg-descr @@ -0,0 +1,7 @@ +CyLP is a Python interface to COIN-OR's Linear and mixed-integer program solvers +(CLP, CBC, and CGL). CyLP's unique feature is that you can use it to alter the +solution process of the solvers from within Python. For example, you may define +cut generators, branch-and-bound strategies, and primal/dual Simplex pivot rules +completely in Python. + +WWW: https://github.com/coin-or/CyLP |