Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cbc from coin-or-cbc rather than binaries in pulp tar-ball #41

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
13 changes: 10 additions & 3 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ package:
source:
url: https://pypi.io/packages/source/P/PuLP/PuLP-{{ version }}.tar.gz
sha256: 4903bf96110bbab8ed2c68533f90565ebb76aa367d9e4df38e51bf727927c125
patches:
# Use the conda provided cbc binary, not those bundled in tar-ball:
- pulp.cfg.linux.patch
- pulp.cfg.osx.patch

build:
number: 0
number: 1
script:
- rm -rf "pulp/solverdir/cbc/"
- {{ PYTHON }} -m pip install . -vv
# Remove bundled cbc binaries, using coin-or-cbc provided cbc instead:
- rm "${SP_DIR}/pulp/solverdir/cbc"
peterjc marked this conversation as resolved.
Show resolved Hide resolved
- rm "${SP_DIR}/pulp/solverdir/CoinMP.dll" # [not win]

requirements:
Expand All @@ -23,8 +30,8 @@ requirements:
- python
run:
- amply >=0.1.2
# We use glpk on Windows because coincbc is only packaged on Unix, currently.
- coincbc # [not win]
# We use glpk on Windows because coin-or-cbc is only packaged on Unix, currently.
- coin-or-cbc # [not win]
- glpk # [win]
- python

Expand Down
11 changes: 11 additions & 0 deletions recipe/pulp.cfg.linux.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- pulp/pulp.cfg.linux.orig 2024-08-15 12:52:19.000000000 +0100
+++ pulp/pulp.cfg.linux 2024-08-15 12:52:33.000000000 +0100
@@ -12,7 +12,7 @@
GurobiPath = /opt/gurobi201/linux32/lib/python2.5
CbcPath = cbc
GlpkPath = glpsol
-PulpCbcPath = %(here)s/solverdir/cbc/%(os)s/%(arch)s/cbc
+PulpCbcPath = cbc
PulpChocoPath = %(here)s/solverdir/choco/choco-parsers-with-dependencies.jar
[licenses]
ilm_cplex_license = "LICENSE your-enterprise\nRUNTIME NEVER ..."
11 changes: 11 additions & 0 deletions recipe/pulp.cfg.osx.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- pulp/pulp.cfg.osx.orig 2024-08-15 12:52:02.000000000 +0100
+++ pulp/pulp.cfg.osx 2024-08-15 12:52:38.000000000 +0100
@@ -12,7 +12,7 @@
GurobiPath = /opt/gurobi201/linux32/lib/python2.5
CbcPath = cbc
GlpkPath = glpsol
-PulpCbcPath = %(here)s/solverdir/cbc/%(os)s/%(arch)s/cbc
+PulpCbcPath = cbc
PulpChocoPath = %(here)s/solverdir/choco/choco-parsers-with-dependencies.jar
[licenses]
ilm_cplex_license = "LICENSE your-enterprise\nRUNTIME NEVER ..."
Loading