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

Add or-tools package #16147

Merged
merged 115 commits into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
b3e22f2
Copy previous attempt
BastianZim Sep 11, 2021
78529d1
Add me as maintainer
BastianZim Sep 11, 2021
c244651
Update to 9.0
BastianZim Sep 11, 2021
645a12d
Remove build dir
BastianZim Sep 11, 2021
5fb6bba
Add explicit versions
BastianZim Sep 11, 2021
c12fe61
Switch to conda-forge abseil-cpp
BastianZim Sep 11, 2021
b0cd548
Cleanup
BastianZim Sep 12, 2021
53e70b0
Try to fix overlink
BastianZim Sep 12, 2021
354a454
Revert "Try to fix overlink"
BastianZim Sep 12, 2021
f97462b
Switch to BUILD_DEPS
BastianZim Sep 12, 2021
72ef0dd
Do not use SCIP
BastianZim Sep 12, 2021
1d799d5
Fix missing \
BastianZim Sep 12, 2021
47d0c01
Add var
BastianZim Sep 13, 2021
fa1de09
Delete cmake.patch
BastianZim Sep 13, 2021
a79ac82
Remove CXX mods
BastianZim Sep 13, 2021
10c60f9
Remove duplicate
BastianZim Sep 14, 2021
672e194
Remove old dependencies
BastianZim Sep 14, 2021
f5253dc
Skip osx too
BastianZim Sep 14, 2021
3c2528f
Add min cmake
BastianZim Sep 14, 2021
c63a414
change to pure cmake
BastianZim Sep 14, 2021
21c3cb2
Remove space and mkdir
BastianZim Sep 15, 2021
a7962ac
Make deps stricter
BastianZim Sep 15, 2021
967b94c
Relax versions
BastianZim Sep 15, 2021
8ab936f
Don't build samples and examples
BastianZim Sep 26, 2021
8c000c2
Set versions correctly
BastianZim Sep 26, 2021
c14f6e3
Set license correctly
BastianZim Sep 26, 2021
60710df
Build examples for testing
BastianZim Sep 26, 2021
8830cac
Prepare multi recipe
BastianZim Sep 26, 2021
fec8a7b
Relax versions again
BastianZim Sep 26, 2021
dd6f9ac
Revert "Build examples for testing"
BastianZim Sep 26, 2021
1f96c2c
Add cpp to outputs
BastianZim Sep 26, 2021
034f2a3
Add python output
BastianZim Sep 26, 2021
bdd4b0b
Add python patch
BastianZim Sep 26, 2021
099e0f3
Fix linter
BastianZim Sep 26, 2021
a90b22b
Create build-python.sh
BastianZim Sep 26, 2021
29e3422
Change skip to not Linux for now
BastianZim Sep 27, 2021
3d9dedc
Fix skip
BastianZim Sep 27, 2021
7e27065
Update depts
BastianZim Sep 27, 2021
f2b11f1
Supply conda python
BastianZim Sep 28, 2021
79a1012
Add feedstock name
BastianZim Sep 28, 2021
9bae2ce
Fix builds to non-leaking
BastianZim Sep 28, 2021
4af2f54
Fix coin-or-utils dep
BastianZim Sep 28, 2021
7e3734b
Fix to h232ff3c build
BastianZim Sep 29, 2021
0026ce9
Try something
BastianZim Sep 29, 2021
9b2a5fb
Move coin-or to run
BastianZim Sep 29, 2021
ff26e61
Merge branch 'conda-forge:main' into add-or-tools-package
BastianZim Oct 2, 2021
53a3190
Update version to 9.1
BastianZim Oct 2, 2021
46ab906
Update deps
BastianZim Oct 2, 2021
4473a4a
Merge branch 'conda-forge:main' into add-or-tools-package
BastianZim Oct 2, 2021
15a577e
Add back coin-or completely
BastianZim Oct 2, 2021
a5a3fb4
Set builds
BastianZim Oct 2, 2021
5185e5c
Merge branch 'add-or-tools-package' of https://github.com/BastianZim/…
BastianZim Oct 2, 2021
0d95e4e
Fix spacing
BastianZim Oct 2, 2021
a1cb241
Change formatting
BastianZim Oct 2, 2021
497516a
Correct build version
BastianZim Oct 2, 2021
ba1bf1c
Change coin-or-cgl temporarily
BastianZim Oct 3, 2021
de2233a
Pin zlib to newest build number
BastianZim Oct 3, 2021
475ca9e
Make zlib pin explicit
BastianZim Oct 3, 2021
56eef98
Indicate python build
BastianZim Oct 3, 2021
1d5d3d7
Revert "Change coin-or-cgl temporarily"
BastianZim Oct 3, 2021
cbdb8d3
Remove samples from test
BastianZim Oct 6, 2021
c5f1ddb
Try to fix python building
BastianZim Oct 6, 2021
c627cf8
Add python compilation
BastianZim Oct 6, 2021
554ec75
Add patch to not build python deps
BastianZim Oct 6, 2021
1ea9577
Fix spelling
BastianZim Oct 6, 2021
9a807e3
Install python package
BastianZim Oct 6, 2021
d6f68e6
Add mypy-protobuf
BastianZim Oct 6, 2021
212ad71
Add second patch
BastianZim Oct 6, 2021
6e4611a
Change build python to new conda-forge format
BastianZim Oct 6, 2021
4aa41b6
Add source of truth
BastianZim Oct 6, 2021
03d89b5
Change URL
BastianZim Oct 6, 2021
41954d3
Merge branch 'conda-forge:main' into add-or-tools-package
BastianZim Oct 15, 2021
eacd576
Remove explicit builds
BastianZim Oct 15, 2021
245158d
Remove python
BastianZim Oct 16, 2021
663017d
Build shared libs
BastianZim Oct 16, 2021
3825bda
Explicitly include dir
BastianZim Oct 16, 2021
9723cfd
Try filepath
BastianZim Oct 16, 2021
a787423
Give more explicit path for python
BastianZim Oct 16, 2021
734cb33
Remove brackets
BastianZim Oct 16, 2021
b69e633
Change back to docs example
BastianZim Oct 18, 2021
e6c9194
Remove duplicate deps
BastianZim Oct 18, 2021
fd3cc59
Add debugging
BastianZim Oct 18, 2021
bdb46cd
Add patch from upstream
BastianZim Oct 18, 2021
fa25b2d
Combine patches
BastianZim Oct 18, 2021
53f815b
Update 0001-Fail-when-module-not-found.patch
BastianZim Oct 18, 2021
258ab9b
Do not install deps
BastianZim Oct 18, 2021
8701dda
Use build
BastianZim Oct 18, 2021
1da0950
Move wheel to host
BastianZim Oct 18, 2021
4cd3e37
Just compile for now
BastianZim Oct 18, 2021
d5e6a3b
Use custom install
BastianZim Oct 18, 2021
43760b4
Change patch
BastianZim Oct 19, 2021
e0ad72e
Create 0001-Unified-patch.patch
BastianZim Oct 19, 2021
5f2dec6
Remove no deps
BastianZim Oct 19, 2021
44b3e7d
Change patch
BastianZim Oct 19, 2021
855cb0b
Change dir
BastianZim Oct 19, 2021
8fbb4b8
Change pip
BastianZim Oct 19, 2021
d3e40d2
Find links
BastianZim Oct 19, 2021
f422663
Do not install deps
BastianZim Oct 19, 2021
aa37fe3
Update dir
BastianZim Oct 19, 2021
4465ca2
Change links
BastianZim Oct 19, 2021
4bc500c
Use correct variable
BastianZim Oct 19, 2021
99e7ad9
Try sdist
BastianZim Oct 19, 2021
3960265
Add python test
BastianZim Oct 19, 2021
a8c2e54
Build wheel again
BastianZim Oct 19, 2021
a818b20
Clean up patches
BastianZim Oct 19, 2021
1e65b5d
Clean up deps
BastianZim Oct 19, 2021
1824f07
Move mypy
BastianZim Oct 19, 2021
59759fd
Move mypy-protobuf back
BastianZim Oct 19, 2021
89c107b
Do not install from PyPI
BastianZim Oct 25, 2021
c5b5bc3
Make naming more clear
BastianZim Oct 25, 2021
a8832d5
Make more verbose
BastianZim Oct 25, 2021
372a1f7
Use conda pinning for libprotobuf
BastianZim Oct 25, 2021
1e577dd
Fix spelling
BastianZim Oct 25, 2021
1b67352
Remove protobuf pinning
BastianZim Oct 25, 2021
4a374ce
Add sat test
BastianZim Oct 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions recipes/or-tools/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note that or-tools need c++17 and absl must use the SAME language dialect
-> verify you have this in the absl recipe https://github.com/Homebrew/homebrew-core/blob/master/Formula/abseil.rb#L24 (maybe with a comment to this recipe e.g. need absl/abseil recipe to use C++17 to build or-tools)

Copy link

@Mizux Mizux Sep 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EDIT: you should add it here: https://github.com/conda-forge/abseil-cpp-feedstock/blob/master/recipe/build.sh

"-DCMAKE_CXX_STANDARD=17"

note: I don't use conda so feel free to correct me ;)

note2: the absl build recipe use the (IMHO) ugly

mkidr build && cd build
cmake ARGS ..
ninja

here it works because they create the build dir "build" cd to it call cmake .. (aka to the parent directory) then call the build system (ninja).

cmake ARGS -S. -Bbuild
cmake --build build

do the same and don't depend on the build system generator name...

Copy link
Member Author

@BastianZim BastianZim Sep 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's probably why it was excluded the last time. Problem is that if I change something there it might break something in the overall conda-forge environment so let me see what I can do.

note: I don't use conda so feel free to correct me ;)

I normally only build normal, run-of-the-mill python packages so any help is much appreciated...! 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here it works because they create the build dir "build" cd to it call cmake .. (aka to the parent directory) then call the build system (ninja).

That was the previous approach here but it failed. I'll move everything to cmake and the commands you suggested and then we should have something more concrete.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

@BastianZim BastianZim Sep 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do add it there

I suspect you mean don't here?

I have to admit that that would be so far above my paygrade that it probably makes no sense if I start it 😄. Does that mean that we should build abseil here or wait until it is changed there? From how I understand the issue, Linux already uses c++17 so should we maybe restrict ourselves to that for now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect you mean don't here?

Yes 😂

Start with Linux, we can add osx later once Linux is passing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, will skip it 😄. Maybe it's ready when I finally figure out how to build cmake recipes...
Is there a flag or dependency I can set somewhere in case conda-forge ever updates to c++20 and or-tools is still at 17?

-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_LIBDIR=lib \
-BUILD_DEPS=OFF \
-DUSE_SCIP=OFF \
$SRC_DIR
BastianZim marked this conversation as resolved.
Show resolved Hide resolved

make -j${CPU_COUNT}
BastianZim marked this conversation as resolved.
Show resolved Hide resolved
make install
BastianZim marked this conversation as resolved.
Show resolved Hide resolved

# run tests
make test
BastianZim marked this conversation as resolved.
Show resolved Hide resolved
64 changes: 64 additions & 0 deletions recipes/or-tools/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{% set name = "or-tools" %}
{% set version = "9.0" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/google/or-tools/archive/v{{ version }}.tar.gz
sha256: fa7700b614ea2a5b2b6e37b76874bd2c3f04a80f03cbbf7871a2d2d5cd3a6091

build:
number: 0
skip: true # [win]

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- cmake
- git
- pkg-config
host:
- abseil-cpp 20210324.1
- libprotobuf 3.15.8
- zlib 1.2.11
# coin or deps
- coin-or-utils 2.11
- coin-or-osi 0.108
- coin-or-clp 1.17.4
- coin-or-cgl 0.60
- coin-or-cbc 2.10

test:
commands:
- test -f $PREFIX/lib/libortools${SHLIB_EXT}
- test -f $PREFIX/lib/cmake/ortools/ortoolsTargets.cmake
- test -f $PREFIX/lib/cmake/ortools/ortoolsConfig.cmake
- test -f $PREFIX/include/ortools_export.h
- test -f $PREFIX/include/ortools/algorithms/dense_doubly_linked_list.h
- test -f $PREFIX/bin/costas_array_sat
- costas_array_sat

about:
home: https://developers.google.com/optimization
license: BSD-3-Clause
license_family: BSD
license_file: LICENSE-2.0.txt
summary: 'Google Operations Research Tools (or-tools)'
description: |
OR-Tools is an open source software suite for optimization, tuned for tackling
the world's toughest problems in vehicle routing, flows, integer and linear
programming, and constraint programming.

After modeling your problem in the programming language of your choice, you
can use any of a half dozen solvers to solve it: commercial solvers such as
Gurobi or CPLEX, or open-source solvers such as SCIP, GLPK, or Google's GLOP
and award-winning CP-SAT.
dev_url: https://github.com/google/or-tools

extra:
recipe-maintainers:
- wolfv
- BastianZim