summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAndrew W Elble <aweits@rit.edu>2020-10-22 11:59:48 -0400
committerGitHub <noreply@github.com>2020-10-22 11:59:48 -0400
commit745875b00848a6d8229461ab07316d7d8e901625 (patch)
treeda88755381e5ec1a1988a9e44e1a850f58f43149 /var
parent646af812638588f88a86792ce9fb4b58cdde4740 (diff)
downloadspack-745875b00848a6d8229461ab07316d7d8e901625.tar.gz
spack-745875b00848a6d8229461ab07316d7d8e901625.tar.bz2
spack-745875b00848a6d8229461ab07316d7d8e901625.tar.xz
spack-745875b00848a6d8229461ab07316d7d8e901625.zip
New package: py-or-tools (#19431)
* py-or-tools * python is, of course, a runtime dep * more dependency fixes, use extends. * protobuf is >= 3.12.2
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-or-tools/package.py52
1 files changed, 52 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-or-tools/package.py b/var/spack/repos/builtin/packages/py-or-tools/package.py
new file mode 100644
index 0000000000..068a22d165
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-or-tools/package.py
@@ -0,0 +1,52 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+class PyOrTools(CMakePackage):
+ """This project hosts operations research tools developed at
+ Google and made available as open source under the Apache 2.0
+ License."""
+
+ homepage = "https://developers.google.com/optimization/"
+ url = "https://github.com/google/or-tools/archive/v7.8.tar.gz"
+
+ version('7.8', sha256='d93a9502b18af51902abd130ff5f23768fcf47e266e6d1f34b3586387aa2de68')
+
+ depends_on('cmake@3.14:', type='build')
+ depends_on('py-setuptools', type='build')
+ depends_on('py-numpy', type=('build', 'run'))
+ depends_on('py-protobuf@3.12.2:', type=('build', 'run'))
+ depends_on('protobuf@3.12.2:')
+ depends_on('py-six@1.10:', type=('build', 'run'))
+ depends_on('gflags@2.2.2')
+ depends_on('glog@0.4.0')
+ depends_on('protobuf@3.12.2')
+ depends_on('abseil-cpp@20200225.2')
+ depends_on('cbc@2.10.5')
+ depends_on('cgl@0.60.3')
+ depends_on('clp@1.17.4')
+ depends_on('osi@0.108.6')
+ depends_on('coinutils@2.11.4')
+ depends_on('swig')
+ depends_on('python', type=('build', 'run'))
+ depends_on('py-wheel', type='build')
+ depends_on('py-virtualenv', type='build')
+ depends_on('scipoptsuite')
+
+ extends('python')
+
+ def cmake_args(self):
+ cmake_args = []
+ cmake_args.append('-DBUILD_DEPS=OFF')
+ cmake_args.append('-DBUILD_PYTHON=ON')
+ cmake_args.append('-DBUILD_TESTING=OFF')
+ return cmake_args
+
+ def install(self, spec, prefix):
+ with working_dir(self.build_directory):
+ make("install")
+ with working_dir(join_path(self.build_directory, 'python')):
+ setup_py('install', '--prefix=' + prefix,
+ '--single-version-externally-managed', '--root=/')