From b3e22f2ec98f66be3d342a6d04707c969a711f3f Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 11 Sep 2021 22:33:59 +0200 Subject: [PATCH 001/111] Copy previous attempt Co-Authored-By: Wolf Vollprecht --- recipes/or-tools/build.sh | 23 ++++ recipes/or-tools/cmake.patch | 235 +++++++++++++++++++++++++++++++++++ recipes/or-tools/meta.yaml | 66 ++++++++++ 3 files changed, 324 insertions(+) create mode 100644 recipes/or-tools/build.sh create mode 100644 recipes/or-tools/cmake.patch create mode 100644 recipes/or-tools/meta.yaml diff --git a/recipes/or-tools/build.sh b/recipes/or-tools/build.sh new file mode 100644 index 0000000000000..def909f3c3785 --- /dev/null +++ b/recipes/or-tools/build.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +mkdir build && cd build +export CXXFLAGS="${CXXFLAGS//-std=c++17/}" +export CXXFLAGS="$CXXFLAGS -std=c++11" + +cmake -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_absl=ON \ + -DBUILD_Protobuf=OFF \ + -DBUILD_CoinUtils=OFF \ + -DBUILD_Osi=OFF \ + -DBUILD_Clp=OFF \ + -DBUILD_Cgl=OFF \ + -DBUILD_Cbc=OFF \ + $SRC_DIR + +make -j${CPU_COUNT} +make install + +# run tests +make test diff --git a/recipes/or-tools/cmake.patch b/recipes/or-tools/cmake.patch new file mode 100644 index 0000000000000..c662123eadbb6 --- /dev/null +++ b/recipes/or-tools/cmake.patch @@ -0,0 +1,235 @@ +diff --git a/cmake/cpp.cmake b/cmake/cpp.cmake +index 9d4f9f26c..fb47fb1db 100644 +--- a/cmake/cpp.cmake ++++ b/cmake/cpp.cmake +@@ -80,12 +80,12 @@ add_library(${PROJECT_NAME} "") + + if(CMAKE_VERSION VERSION_LESS "3.8.2") + set_target_properties(${PROJECT_NAME} PROPERTIES +- CXX_STANDARD 11 ++ CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF + ) + else() +- target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11) ++ target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17) + endif() + + if(NOT APPLE) +@@ -134,7 +134,7 @@ target_compile_definitions(${PROJECT_NAME} PUBLIC __WIN32__) + endif() + target_compile_definitions(${PROJECT_NAME} + PUBLIC USE_BOP USE_GLOP USE_CBC USE_CLP) +-target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11) ++target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17) + add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) + + # Generate Protobuf cpp sources +@@ -174,7 +174,7 @@ endforeach() + #add_library(${PROJECT_NAME}_proto STATIC ${PROTO_SRCS} ${PROTO_HDRS}) + add_library(${PROJECT_NAME}_proto OBJECT ${PROTO_SRCS} ${PROTO_HDRS}) + set_target_properties(${PROJECT_NAME}_proto PROPERTIES POSITION_INDEPENDENT_CODE ON) +-set_target_properties(${PROJECT_NAME}_proto PROPERTIES CXX_STANDARD 11) ++set_target_properties(${PROJECT_NAME}_proto PROPERTIES CXX_STANDARD 17) + set_target_properties(${PROJECT_NAME}_proto PROPERTIES CXX_STANDARD_REQUIRED ON) + set_target_properties(${PROJECT_NAME}_proto PROPERTIES CXX_EXTENSIONS OFF) + target_include_directories(${PROJECT_NAME}_proto PRIVATE +diff --git a/cmake/dependencies/CMakeLists.txt b/cmake/dependencies/CMakeLists.txt +index ae26db9db..78a33ff15 100644 +--- a/cmake/dependencies/CMakeLists.txt ++++ b/cmake/dependencies/CMakeLists.txt +@@ -55,6 +55,11 @@ if(BUILD_absl) + "https://github.com/abseil/abseil-cpp.git" + TAG + "8ba96a8" ++ CMAKE_ARGS ++ -DCMAKE_CXX_COMPILER=$ENV{CXX} ++ -DCMAKE_CXX_STANDARD=17 ++ -DCMAKE_CXX_FLAGS=$ENV{CXXFLAGS} ++ -ELDFLAGS=$ENV{LDFLAGS} + ) + endif() + +diff --git a/cmake/sample/CMakeLists.txt b/cmake/sample/CMakeLists.txt +index 97dfe663c..a3dad9325 100644 +--- a/cmake/sample/CMakeLists.txt ++++ b/cmake/sample/CMakeLists.txt +@@ -5,7 +5,7 @@ include(CTest) + find_package(ortools CONFIG REQUIRED) + + add_executable(sample main.cpp) +-target_compile_features(sample PUBLIC cxx_std_11) ++target_compile_features(sample PUBLIC cxx_std_17) + set_target_properties(sample PROPERTIES VERSION ${PROJECT_VERSION}) + target_link_libraries(sample PRIVATE ortools::ortools) + +diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt +index c864621d8..8d592ca94 100644 +--- a/examples/cpp/CMakeLists.txt ++++ b/examples/cpp/CMakeLists.txt +@@ -49,7 +49,7 @@ foreach(EXECUTABLE + weighted_tardiness_sat) + add_executable(${EXECUTABLE} ${EXECUTABLE}.cc) + target_include_directories(${EXECUTABLE} PUBLIC ${PARENT_SOURCE_DIR}) +- target_compile_features(${EXECUTABLE} PRIVATE cxx_std_11) ++ target_compile_features(${EXECUTABLE} PRIVATE cxx_std_17) + target_link_libraries(${EXECUTABLE} PRIVATE ortools::ortools) + install(TARGETS ${EXECUTABLE} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +diff --git a/ortools/algorithms/CMakeLists.txt b/ortools/algorithms/CMakeLists.txt +index 867668a61..b5333d754 100644 +--- a/ortools/algorithms/CMakeLists.txt ++++ b/ortools/algorithms/CMakeLists.txt +@@ -10,7 +10,7 @@ set(NAME ${PROJECT_NAME}_algorithms) + #add_library(${NAME} STATIC ${_SRCS}) + add_library(${NAME} OBJECT ${_SRCS}) + set_target_properties(${NAME} PROPERTIES +- CXX_STANDARD 11 ++ CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF + POSITION_INDEPENDENT_CODE ON +diff --git a/ortools/base/CMakeLists.txt b/ortools/base/CMakeLists.txt +index 3af8148ec..dea5f039a 100644 +--- a/ortools/base/CMakeLists.txt ++++ b/ortools/base/CMakeLists.txt +@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_base) + #add_library(${NAME} STATIC ${_SRCS}) + add_library(${NAME} OBJECT ${_SRCS}) + set_target_properties(${NAME} PROPERTIES +- CXX_STANDARD 11 ++ CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF + POSITION_INDEPENDENT_CODE ON +diff --git a/ortools/bop/CMakeLists.txt b/ortools/bop/CMakeLists.txt +index b604d8980..77f936594 100644 +--- a/ortools/bop/CMakeLists.txt ++++ b/ortools/bop/CMakeLists.txt +@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_bop) + #add_library(${NAME} STATIC ${_SRCS}) + add_library(${NAME} OBJECT ${_SRCS}) + set_target_properties(${NAME} PROPERTIES +- CXX_STANDARD 11 ++ CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF + POSITION_INDEPENDENT_CODE ON +diff --git a/ortools/constraint_solver/CMakeLists.txt b/ortools/constraint_solver/CMakeLists.txt +index 8ac574ffb..086443017 100644 +--- a/ortools/constraint_solver/CMakeLists.txt ++++ b/ortools/constraint_solver/CMakeLists.txt +@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_constraint_solver) + #add_library(${NAME} STATIC ${_SRCS}) + add_library(${NAME} OBJECT ${_SRCS}) + set_target_properties(${NAME} PROPERTIES +- CXX_STANDARD 11 ++ CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF + POSITION_INDEPENDENT_CODE ON +diff --git a/ortools/data/CMakeLists.txt b/ortools/data/CMakeLists.txt +index f9f794ede..1edfbdf6c 100644 +--- a/ortools/data/CMakeLists.txt ++++ b/ortools/data/CMakeLists.txt +@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_data) + #add_library(${NAME} STATIC ${_SRCS}) + add_library(${NAME} OBJECT ${_SRCS}) + set_target_properties(${NAME} PROPERTIES +- CXX_STANDARD 11 ++ CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF + POSITION_INDEPENDENT_CODE ON +diff --git a/ortools/glop/CMakeLists.txt b/ortools/glop/CMakeLists.txt +index 0e7cb813e..3e06b6c9b 100644 +--- a/ortools/glop/CMakeLists.txt ++++ b/ortools/glop/CMakeLists.txt +@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_glop) + #add_library(${NAME} STATIC ${_SRCS}) + add_library(${NAME} OBJECT ${_SRCS}) + set_target_properties(${NAME} PROPERTIES +- CXX_STANDARD 11 ++ CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF + POSITION_INDEPENDENT_CODE ON +diff --git a/ortools/graph/CMakeLists.txt b/ortools/graph/CMakeLists.txt +index 5ec7072f0..9e9064afd 100644 +--- a/ortools/graph/CMakeLists.txt ++++ b/ortools/graph/CMakeLists.txt +@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_graph) + #add_library(${NAME} STATIC ${_SRCS}) + add_library(${NAME} OBJECT ${_SRCS}) + set_target_properties(${NAME} PROPERTIES +- CXX_STANDARD 11 ++ CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF + POSITION_INDEPENDENT_CODE ON +diff --git a/ortools/linear_solver/CMakeLists.txt b/ortools/linear_solver/CMakeLists.txt +index 35f8239fc..94a985039 100644 +--- a/ortools/linear_solver/CMakeLists.txt ++++ b/ortools/linear_solver/CMakeLists.txt +@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_linear_solver) + #add_library(${NAME} STATIC ${_SRCS}) + add_library(${NAME} OBJECT ${_SRCS}) + set_target_properties(${NAME} PROPERTIES +- CXX_STANDARD 11 ++ CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF + POSITION_INDEPENDENT_CODE ON +diff --git a/ortools/lp_data/CMakeLists.txt b/ortools/lp_data/CMakeLists.txt +index c4f930c85..5ffa9826e 100644 +--- a/ortools/lp_data/CMakeLists.txt ++++ b/ortools/lp_data/CMakeLists.txt +@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_lp_data) + #add_library(${NAME} STATIC ${_SRCS}) + add_library(${NAME} OBJECT ${_SRCS}) + set_target_properties(${NAME} PROPERTIES +- CXX_STANDARD 11 ++ CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF + POSITION_INDEPENDENT_CODE ON +diff --git a/ortools/port/CMakeLists.txt b/ortools/port/CMakeLists.txt +index 87407ef4f..885c97c4a 100644 +--- a/ortools/port/CMakeLists.txt ++++ b/ortools/port/CMakeLists.txt +@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_port) + #add_library(${NAME} STATIC ${_SRCS}) + add_library(${NAME} OBJECT ${_SRCS}) + set_target_properties(${NAME} PROPERTIES +- CXX_STANDARD 11 ++ CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF + POSITION_INDEPENDENT_CODE ON +diff --git a/ortools/sat/CMakeLists.txt b/ortools/sat/CMakeLists.txt +index 7ddcca8b3..1887620b8 100644 +--- a/ortools/sat/CMakeLists.txt ++++ b/ortools/sat/CMakeLists.txt +@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_sat) + #add_library(${NAME} STATIC ${_SRCS}) + add_library(${NAME} OBJECT ${_SRCS}) + set_target_properties(${NAME} PROPERTIES +- CXX_STANDARD 11 ++ CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF + POSITION_INDEPENDENT_CODE ON +diff --git a/ortools/util/CMakeLists.txt b/ortools/util/CMakeLists.txt +index 1d155aaa7..666e7b0c4 100644 +--- a/ortools/util/CMakeLists.txt ++++ b/ortools/util/CMakeLists.txt +@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_util) + #add_library(${NAME} STATIC ${_SRCS}) + add_library(${NAME} OBJECT ${_SRCS}) + set_target_properties(${NAME} PROPERTIES +- CXX_STANDARD 11 ++ CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF + POSITION_INDEPENDENT_CODE ON \ No newline at end of file diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml new file mode 100644 index 0000000000000..f4bb14aed2bb2 --- /dev/null +++ b/recipes/or-tools/meta.yaml @@ -0,0 +1,66 @@ +{% set name = "or-tools" %} +{% set version = "7.5" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + url: https://github.com/google/or-tools/archive/v{{ version }}.tar.gz + sha256: fb111aaacaf89d395d62e9e871833afdcf7f168b9f004bcfc9b70a894852f808 + +build: + number: 0 + skip: true # [win] + +requirements: + build: + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - cmake + - git + - pkg-config + host: + # Cannot use the release of abseil currently on CF + # - abseil-cpp + - gflags + - glog + - libprotobuf + - zlib + # 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 From 78529d135bfe16b93a48de2db6826fb728d9dec8 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 11 Sep 2021 22:34:49 +0200 Subject: [PATCH 002/111] Add me as maintainer --- recipes/or-tools/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index f4bb14aed2bb2..2e48cbd7b99cf 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -64,3 +64,4 @@ about: extra: recipe-maintainers: - wolfv + - BastianZim From c244651e35e8fdb90ffdc5b0b881c07a2d050e7a Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 11 Sep 2021 22:35:25 +0200 Subject: [PATCH 003/111] Update to 9.0 --- recipes/or-tools/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 2e48cbd7b99cf..a3a566eaff303 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -1,5 +1,5 @@ {% set name = "or-tools" %} -{% set version = "7.5" %} +{% set version = "9.0" %} package: name: {{ name|lower }} @@ -7,7 +7,7 @@ package: source: url: https://github.com/google/or-tools/archive/v{{ version }}.tar.gz - sha256: fb111aaacaf89d395d62e9e871833afdcf7f168b9f004bcfc9b70a894852f808 + sha256: fa7700b614ea2a5b2b6e37b76874bd2c3f04a80f03cbbf7871a2d2d5cd3a6091 build: number: 0 From 645a12d76be0d1f07b0b514b4833ad194c9555e3 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 11 Sep 2021 22:36:09 +0200 Subject: [PATCH 004/111] Remove build dir --- recipes/or-tools/build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/or-tools/build.sh b/recipes/or-tools/build.sh index def909f3c3785..a842b62189606 100644 --- a/recipes/or-tools/build.sh +++ b/recipes/or-tools/build.sh @@ -1,6 +1,5 @@ #!/bin/sh -mkdir build && cd build export CXXFLAGS="${CXXFLAGS//-std=c++17/}" export CXXFLAGS="$CXXFLAGS -std=c++11" From 5fb6bba6d5beeecea5edc2f8760f157813bffbf2 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 11 Sep 2021 22:37:06 +0200 Subject: [PATCH 005/111] Add explicit versions --- recipes/or-tools/meta.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index a3a566eaff303..245440e4abede 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -22,11 +22,11 @@ requirements: - pkg-config host: # Cannot use the release of abseil currently on CF - # - abseil-cpp + # - abseil-cpp 20210324.1 - gflags - glog - - libprotobuf - - zlib + - libprotobuf 3.15.8 + - zlib 1.2.11 # coin or deps - coin-or-utils 2.11 - coin-or-osi 0.108 @@ -64,4 +64,3 @@ about: extra: recipe-maintainers: - wolfv - - BastianZim From c12fe61e0542d8b6962431bbc112c6fac0a49787 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 11 Sep 2021 22:37:46 +0200 Subject: [PATCH 006/111] Switch to conda-forge abseil-cpp --- recipes/or-tools/build.sh | 3 ++- recipes/or-tools/meta.yaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/or-tools/build.sh b/recipes/or-tools/build.sh index a842b62189606..74e36f0ab6e93 100644 --- a/recipes/or-tools/build.sh +++ b/recipes/or-tools/build.sh @@ -6,13 +6,14 @@ export CXXFLAGS="$CXXFLAGS -std=c++11" cmake -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=lib \ - -DBUILD_absl=ON \ + -DBUILD_absl=OFF \ -DBUILD_Protobuf=OFF \ -DBUILD_CoinUtils=OFF \ -DBUILD_Osi=OFF \ -DBUILD_Clp=OFF \ -DBUILD_Cgl=OFF \ -DBUILD_Cbc=OFF \ + -DUSE_SCIP=OFF \ $SRC_DIR make -j${CPU_COUNT} diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 245440e4abede..f5ad9b739dd66 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -22,7 +22,7 @@ requirements: - pkg-config host: # Cannot use the release of abseil currently on CF - # - abseil-cpp 20210324.1 + - abseil-cpp 20210324.1 - gflags - glog - libprotobuf 3.15.8 From b0cd5487eb569da98b765191a6c307e4851247ec Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 12 Sep 2021 13:10:38 +0200 Subject: [PATCH 007/111] Cleanup --- recipes/or-tools/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index f5ad9b739dd66..a50e53ed0153a 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -21,7 +21,6 @@ requirements: - git - pkg-config host: - # Cannot use the release of abseil currently on CF - abseil-cpp 20210324.1 - gflags - glog @@ -64,3 +63,4 @@ about: extra: recipe-maintainers: - wolfv + - BastianZim From 53e70b0a8218ac6ae012f3e5bb35a4ad6ebc2201 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 12 Sep 2021 13:10:51 +0200 Subject: [PATCH 008/111] Try to fix overlink --- recipes/or-tools/meta.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index a50e53ed0153a..c4f9a42d6f76a 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -32,6 +32,14 @@ requirements: - coin-or-clp 1.17.4 - coin-or-cgl 0.60 - coin-or-cbc 2.10 + run: + # 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: From 354a454175f87b5be6fd5486bb5438bd5c2b86d4 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 12 Sep 2021 13:56:10 +0200 Subject: [PATCH 009/111] Revert "Try to fix overlink" This reverts commit 53e70b0a8218ac6ae012f3e5bb35a4ad6ebc2201. --- recipes/or-tools/meta.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index c4f9a42d6f76a..a50e53ed0153a 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -32,14 +32,6 @@ requirements: - coin-or-clp 1.17.4 - coin-or-cgl 0.60 - coin-or-cbc 2.10 - run: - # 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: From f97462ba4e013695e35fe07d23b3537b5c4f9904 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 12 Sep 2021 13:57:09 +0200 Subject: [PATCH 010/111] Switch to BUILD_DEPS --- recipes/or-tools/build.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/recipes/or-tools/build.sh b/recipes/or-tools/build.sh index 74e36f0ab6e93..de139bb42f5e7 100644 --- a/recipes/or-tools/build.sh +++ b/recipes/or-tools/build.sh @@ -6,13 +6,7 @@ export CXXFLAGS="$CXXFLAGS -std=c++11" cmake -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=lib \ - -DBUILD_absl=OFF \ - -DBUILD_Protobuf=OFF \ - -DBUILD_CoinUtils=OFF \ - -DBUILD_Osi=OFF \ - -DBUILD_Clp=OFF \ - -DBUILD_Cgl=OFF \ - -DBUILD_Cbc=OFF \ + -BUILD_DEPS=OFF -DUSE_SCIP=OFF \ $SRC_DIR From 72ef0dda2c42fb3564beb2af9fd12d904e358366 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 12 Sep 2021 14:21:58 +0200 Subject: [PATCH 011/111] Do not use SCIP --- recipes/or-tools/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/or-tools/build.sh b/recipes/or-tools/build.sh index de139bb42f5e7..2767c328ce880 100644 --- a/recipes/or-tools/build.sh +++ b/recipes/or-tools/build.sh @@ -6,8 +6,9 @@ export CXXFLAGS="$CXXFLAGS -std=c++11" cmake -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=lib \ - -BUILD_DEPS=OFF + -BUILD_DEPS=OFF \ -DUSE_SCIP=OFF \ + -USE_SCIP=OFF $SRC_DIR make -j${CPU_COUNT} From 1d799d5d717ae3d6862b630f3c87bbd5d6d44dfa Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 12 Sep 2021 14:37:45 +0200 Subject: [PATCH 012/111] Fix missing \ --- recipes/or-tools/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/build.sh b/recipes/or-tools/build.sh index 2767c328ce880..c2ec9b8c70f15 100644 --- a/recipes/or-tools/build.sh +++ b/recipes/or-tools/build.sh @@ -8,7 +8,7 @@ cmake -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_INSTALL_LIBDIR=lib \ -BUILD_DEPS=OFF \ -DUSE_SCIP=OFF \ - -USE_SCIP=OFF + -USE_SCIP=OFF \ $SRC_DIR make -j${CPU_COUNT} From 47d0c014c5e663c8f4337f4a1dcaf776723b919a Mon Sep 17 00:00:00 2001 From: Bastian Zimmermann <10774221+BastianZim@users.noreply.github.com> Date: Mon, 13 Sep 2021 15:47:24 +0200 Subject: [PATCH 013/111] Add var Co-authored-by: Uwe L. Korn --- recipes/or-tools/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/build.sh b/recipes/or-tools/build.sh index c2ec9b8c70f15..dc3d7444bd592 100644 --- a/recipes/or-tools/build.sh +++ b/recipes/or-tools/build.sh @@ -3,7 +3,7 @@ export CXXFLAGS="${CXXFLAGS//-std=c++17/}" export CXXFLAGS="$CXXFLAGS -std=c++11" -cmake -DCMAKE_INSTALL_PREFIX=$PREFIX \ +cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=lib \ -BUILD_DEPS=OFF \ From fa1de09d398878fad8c92da23b05032e2593a1fe Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 13 Sep 2021 15:47:48 +0200 Subject: [PATCH 014/111] Delete cmake.patch --- recipes/or-tools/cmake.patch | 235 ----------------------------------- 1 file changed, 235 deletions(-) delete mode 100644 recipes/or-tools/cmake.patch diff --git a/recipes/or-tools/cmake.patch b/recipes/or-tools/cmake.patch deleted file mode 100644 index c662123eadbb6..0000000000000 --- a/recipes/or-tools/cmake.patch +++ /dev/null @@ -1,235 +0,0 @@ -diff --git a/cmake/cpp.cmake b/cmake/cpp.cmake -index 9d4f9f26c..fb47fb1db 100644 ---- a/cmake/cpp.cmake -+++ b/cmake/cpp.cmake -@@ -80,12 +80,12 @@ add_library(${PROJECT_NAME} "") - - if(CMAKE_VERSION VERSION_LESS "3.8.2") - set_target_properties(${PROJECT_NAME} PROPERTIES -- CXX_STANDARD 11 -+ CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS OFF - ) - else() -- target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11) -+ target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17) - endif() - - if(NOT APPLE) -@@ -134,7 +134,7 @@ target_compile_definitions(${PROJECT_NAME} PUBLIC __WIN32__) - endif() - target_compile_definitions(${PROJECT_NAME} - PUBLIC USE_BOP USE_GLOP USE_CBC USE_CLP) --target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11) -+target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17) - add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) - - # Generate Protobuf cpp sources -@@ -174,7 +174,7 @@ endforeach() - #add_library(${PROJECT_NAME}_proto STATIC ${PROTO_SRCS} ${PROTO_HDRS}) - add_library(${PROJECT_NAME}_proto OBJECT ${PROTO_SRCS} ${PROTO_HDRS}) - set_target_properties(${PROJECT_NAME}_proto PROPERTIES POSITION_INDEPENDENT_CODE ON) --set_target_properties(${PROJECT_NAME}_proto PROPERTIES CXX_STANDARD 11) -+set_target_properties(${PROJECT_NAME}_proto PROPERTIES CXX_STANDARD 17) - set_target_properties(${PROJECT_NAME}_proto PROPERTIES CXX_STANDARD_REQUIRED ON) - set_target_properties(${PROJECT_NAME}_proto PROPERTIES CXX_EXTENSIONS OFF) - target_include_directories(${PROJECT_NAME}_proto PRIVATE -diff --git a/cmake/dependencies/CMakeLists.txt b/cmake/dependencies/CMakeLists.txt -index ae26db9db..78a33ff15 100644 ---- a/cmake/dependencies/CMakeLists.txt -+++ b/cmake/dependencies/CMakeLists.txt -@@ -55,6 +55,11 @@ if(BUILD_absl) - "https://github.com/abseil/abseil-cpp.git" - TAG - "8ba96a8" -+ CMAKE_ARGS -+ -DCMAKE_CXX_COMPILER=$ENV{CXX} -+ -DCMAKE_CXX_STANDARD=17 -+ -DCMAKE_CXX_FLAGS=$ENV{CXXFLAGS} -+ -ELDFLAGS=$ENV{LDFLAGS} - ) - endif() - -diff --git a/cmake/sample/CMakeLists.txt b/cmake/sample/CMakeLists.txt -index 97dfe663c..a3dad9325 100644 ---- a/cmake/sample/CMakeLists.txt -+++ b/cmake/sample/CMakeLists.txt -@@ -5,7 +5,7 @@ include(CTest) - find_package(ortools CONFIG REQUIRED) - - add_executable(sample main.cpp) --target_compile_features(sample PUBLIC cxx_std_11) -+target_compile_features(sample PUBLIC cxx_std_17) - set_target_properties(sample PROPERTIES VERSION ${PROJECT_VERSION}) - target_link_libraries(sample PRIVATE ortools::ortools) - -diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt -index c864621d8..8d592ca94 100644 ---- a/examples/cpp/CMakeLists.txt -+++ b/examples/cpp/CMakeLists.txt -@@ -49,7 +49,7 @@ foreach(EXECUTABLE - weighted_tardiness_sat) - add_executable(${EXECUTABLE} ${EXECUTABLE}.cc) - target_include_directories(${EXECUTABLE} PUBLIC ${PARENT_SOURCE_DIR}) -- target_compile_features(${EXECUTABLE} PRIVATE cxx_std_11) -+ target_compile_features(${EXECUTABLE} PRIVATE cxx_std_17) - target_link_libraries(${EXECUTABLE} PRIVATE ortools::ortools) - install(TARGETS ${EXECUTABLE} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -diff --git a/ortools/algorithms/CMakeLists.txt b/ortools/algorithms/CMakeLists.txt -index 867668a61..b5333d754 100644 ---- a/ortools/algorithms/CMakeLists.txt -+++ b/ortools/algorithms/CMakeLists.txt -@@ -10,7 +10,7 @@ set(NAME ${PROJECT_NAME}_algorithms) - #add_library(${NAME} STATIC ${_SRCS}) - add_library(${NAME} OBJECT ${_SRCS}) - set_target_properties(${NAME} PROPERTIES -- CXX_STANDARD 11 -+ CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS OFF - POSITION_INDEPENDENT_CODE ON -diff --git a/ortools/base/CMakeLists.txt b/ortools/base/CMakeLists.txt -index 3af8148ec..dea5f039a 100644 ---- a/ortools/base/CMakeLists.txt -+++ b/ortools/base/CMakeLists.txt -@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_base) - #add_library(${NAME} STATIC ${_SRCS}) - add_library(${NAME} OBJECT ${_SRCS}) - set_target_properties(${NAME} PROPERTIES -- CXX_STANDARD 11 -+ CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS OFF - POSITION_INDEPENDENT_CODE ON -diff --git a/ortools/bop/CMakeLists.txt b/ortools/bop/CMakeLists.txt -index b604d8980..77f936594 100644 ---- a/ortools/bop/CMakeLists.txt -+++ b/ortools/bop/CMakeLists.txt -@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_bop) - #add_library(${NAME} STATIC ${_SRCS}) - add_library(${NAME} OBJECT ${_SRCS}) - set_target_properties(${NAME} PROPERTIES -- CXX_STANDARD 11 -+ CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS OFF - POSITION_INDEPENDENT_CODE ON -diff --git a/ortools/constraint_solver/CMakeLists.txt b/ortools/constraint_solver/CMakeLists.txt -index 8ac574ffb..086443017 100644 ---- a/ortools/constraint_solver/CMakeLists.txt -+++ b/ortools/constraint_solver/CMakeLists.txt -@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_constraint_solver) - #add_library(${NAME} STATIC ${_SRCS}) - add_library(${NAME} OBJECT ${_SRCS}) - set_target_properties(${NAME} PROPERTIES -- CXX_STANDARD 11 -+ CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS OFF - POSITION_INDEPENDENT_CODE ON -diff --git a/ortools/data/CMakeLists.txt b/ortools/data/CMakeLists.txt -index f9f794ede..1edfbdf6c 100644 ---- a/ortools/data/CMakeLists.txt -+++ b/ortools/data/CMakeLists.txt -@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_data) - #add_library(${NAME} STATIC ${_SRCS}) - add_library(${NAME} OBJECT ${_SRCS}) - set_target_properties(${NAME} PROPERTIES -- CXX_STANDARD 11 -+ CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS OFF - POSITION_INDEPENDENT_CODE ON -diff --git a/ortools/glop/CMakeLists.txt b/ortools/glop/CMakeLists.txt -index 0e7cb813e..3e06b6c9b 100644 ---- a/ortools/glop/CMakeLists.txt -+++ b/ortools/glop/CMakeLists.txt -@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_glop) - #add_library(${NAME} STATIC ${_SRCS}) - add_library(${NAME} OBJECT ${_SRCS}) - set_target_properties(${NAME} PROPERTIES -- CXX_STANDARD 11 -+ CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS OFF - POSITION_INDEPENDENT_CODE ON -diff --git a/ortools/graph/CMakeLists.txt b/ortools/graph/CMakeLists.txt -index 5ec7072f0..9e9064afd 100644 ---- a/ortools/graph/CMakeLists.txt -+++ b/ortools/graph/CMakeLists.txt -@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_graph) - #add_library(${NAME} STATIC ${_SRCS}) - add_library(${NAME} OBJECT ${_SRCS}) - set_target_properties(${NAME} PROPERTIES -- CXX_STANDARD 11 -+ CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS OFF - POSITION_INDEPENDENT_CODE ON -diff --git a/ortools/linear_solver/CMakeLists.txt b/ortools/linear_solver/CMakeLists.txt -index 35f8239fc..94a985039 100644 ---- a/ortools/linear_solver/CMakeLists.txt -+++ b/ortools/linear_solver/CMakeLists.txt -@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_linear_solver) - #add_library(${NAME} STATIC ${_SRCS}) - add_library(${NAME} OBJECT ${_SRCS}) - set_target_properties(${NAME} PROPERTIES -- CXX_STANDARD 11 -+ CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS OFF - POSITION_INDEPENDENT_CODE ON -diff --git a/ortools/lp_data/CMakeLists.txt b/ortools/lp_data/CMakeLists.txt -index c4f930c85..5ffa9826e 100644 ---- a/ortools/lp_data/CMakeLists.txt -+++ b/ortools/lp_data/CMakeLists.txt -@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_lp_data) - #add_library(${NAME} STATIC ${_SRCS}) - add_library(${NAME} OBJECT ${_SRCS}) - set_target_properties(${NAME} PROPERTIES -- CXX_STANDARD 11 -+ CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS OFF - POSITION_INDEPENDENT_CODE ON -diff --git a/ortools/port/CMakeLists.txt b/ortools/port/CMakeLists.txt -index 87407ef4f..885c97c4a 100644 ---- a/ortools/port/CMakeLists.txt -+++ b/ortools/port/CMakeLists.txt -@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_port) - #add_library(${NAME} STATIC ${_SRCS}) - add_library(${NAME} OBJECT ${_SRCS}) - set_target_properties(${NAME} PROPERTIES -- CXX_STANDARD 11 -+ CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS OFF - POSITION_INDEPENDENT_CODE ON -diff --git a/ortools/sat/CMakeLists.txt b/ortools/sat/CMakeLists.txt -index 7ddcca8b3..1887620b8 100644 ---- a/ortools/sat/CMakeLists.txt -+++ b/ortools/sat/CMakeLists.txt -@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_sat) - #add_library(${NAME} STATIC ${_SRCS}) - add_library(${NAME} OBJECT ${_SRCS}) - set_target_properties(${NAME} PROPERTIES -- CXX_STANDARD 11 -+ CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS OFF - POSITION_INDEPENDENT_CODE ON -diff --git a/ortools/util/CMakeLists.txt b/ortools/util/CMakeLists.txt -index 1d155aaa7..666e7b0c4 100644 ---- a/ortools/util/CMakeLists.txt -+++ b/ortools/util/CMakeLists.txt -@@ -5,7 +5,7 @@ set(NAME ${PROJECT_NAME}_util) - #add_library(${NAME} STATIC ${_SRCS}) - add_library(${NAME} OBJECT ${_SRCS}) - set_target_properties(${NAME} PROPERTIES -- CXX_STANDARD 11 -+ CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS OFF - POSITION_INDEPENDENT_CODE ON \ No newline at end of file From a79ac825b0f92968b1f3a47f8ff2ef5d9a112884 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 13 Sep 2021 15:48:14 +0200 Subject: [PATCH 015/111] Remove CXX mods --- recipes/or-tools/build.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/recipes/or-tools/build.sh b/recipes/or-tools/build.sh index dc3d7444bd592..e0e77c85e2135 100644 --- a/recipes/or-tools/build.sh +++ b/recipes/or-tools/build.sh @@ -1,8 +1,5 @@ #!/bin/sh -export CXXFLAGS="${CXXFLAGS//-std=c++17/}" -export CXXFLAGS="$CXXFLAGS -std=c++11" - cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=lib \ From 10c60f915d1afcc80a042096132c1af188aa327f Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 14 Sep 2021 15:41:02 +0200 Subject: [PATCH 016/111] Remove duplicate --- recipes/or-tools/build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/or-tools/build.sh b/recipes/or-tools/build.sh index e0e77c85e2135..303540b44df5a 100644 --- a/recipes/or-tools/build.sh +++ b/recipes/or-tools/build.sh @@ -5,7 +5,6 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_INSTALL_LIBDIR=lib \ -BUILD_DEPS=OFF \ -DUSE_SCIP=OFF \ - -USE_SCIP=OFF \ $SRC_DIR make -j${CPU_COUNT} From 672e1940eea3d633cd69554cf2712917ee741235 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 14 Sep 2021 15:41:30 +0200 Subject: [PATCH 017/111] Remove old dependencies --- recipes/or-tools/meta.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index a50e53ed0153a..f1a73114f85a4 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -22,8 +22,6 @@ requirements: - pkg-config host: - abseil-cpp 20210324.1 - - gflags - - glog - libprotobuf 3.15.8 - zlib 1.2.11 # coin or deps From f5253dc42b0ea99660a507426532fdeb1e3c21d7 Mon Sep 17 00:00:00 2001 From: Bastian Zimmermann <10774221+BastianZim@users.noreply.github.com> Date: Tue, 14 Sep 2021 16:57:04 +0200 Subject: [PATCH 018/111] Skip osx too --- recipes/or-tools/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index f1a73114f85a4..d30e25b440aa5 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -11,7 +11,7 @@ source: build: number: 0 - skip: true # [win] + skip: True # [not linux] requirements: build: From 3c2528fed988155dd6acf498e748fe9b7cb8a26d Mon Sep 17 00:00:00 2001 From: Bastian Zimmermann <10774221+BastianZim@users.noreply.github.com> Date: Tue, 14 Sep 2021 16:58:20 +0200 Subject: [PATCH 019/111] Add min cmake --- recipes/or-tools/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index d30e25b440aa5..4e882c0b081b0 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -11,13 +11,13 @@ source: build: number: 0 - skip: True # [not linux] + skip: True # [not linux] requirements: build: - {{ compiler('c') }} - {{ compiler('cxx') }} - - cmake + - cmake >=3.18 - git - pkg-config host: From c63a4144cddac2faa01cfa03f39a675828fdad03 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 14 Sep 2021 22:47:37 +0200 Subject: [PATCH 020/111] change to pure cmake --- recipes/or-tools/build.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/recipes/or-tools/build.sh b/recipes/or-tools/build.sh index 303540b44df5a..985af02ba5e26 100644 --- a/recipes/or-tools/build.sh +++ b/recipes/or-tools/build.sh @@ -1,14 +1,13 @@ #!/bin/sh +mkdir build + cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=lib \ -BUILD_DEPS=OFF \ -DUSE_SCIP=OFF \ - $SRC_DIR - -make -j${CPU_COUNT} -make install + -S. \ + -B build -# run tests -make test +cmake --build build --target install -j${CPU_COUNT} From 21c3cb22d1d2fe6bad48c0e1c3de16b4186b1a17 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Wed, 15 Sep 2021 10:50:50 +0200 Subject: [PATCH 021/111] Remove space and mkdir --- recipes/or-tools/build.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/recipes/or-tools/build.sh b/recipes/or-tools/build.sh index 985af02ba5e26..4f23688c734ce 100644 --- a/recipes/or-tools/build.sh +++ b/recipes/or-tools/build.sh @@ -1,13 +1,11 @@ #!/bin/sh -mkdir build - cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=lib \ -BUILD_DEPS=OFF \ -DUSE_SCIP=OFF \ -S. \ - -B build + -Bbuild cmake --build build --target install -j${CPU_COUNT} From a7962ace7ff8d3944235ad4adda5d4f5e6e0a89a Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Wed, 15 Sep 2021 13:45:34 +0200 Subject: [PATCH 022/111] Make deps stricter --- recipes/or-tools/meta.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 4e882c0b081b0..d16827608607f 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -21,15 +21,15 @@ requirements: - git - pkg-config host: - - abseil-cpp 20210324.1 - - libprotobuf 3.15.8 - - zlib 1.2.11 + - 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 + - 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: From 967b94cd252d954625e08a5a6fbd80a7e22b560a Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Wed, 15 Sep 2021 14:03:12 +0200 Subject: [PATCH 023/111] Relax versions --- recipes/or-tools/meta.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index d16827608607f..520d0f312aea6 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -25,11 +25,11 @@ requirements: - 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 + - 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: From 8ab936fc3ccadf1b7484d22c8f19edf20265fa83 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 26 Sep 2021 15:33:45 +0200 Subject: [PATCH 024/111] Don't build samples and examples --- recipes/or-tools/build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/or-tools/build.sh b/recipes/or-tools/build.sh index 4f23688c734ce..f263fde50600a 100644 --- a/recipes/or-tools/build.sh +++ b/recipes/or-tools/build.sh @@ -6,6 +6,8 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -BUILD_DEPS=OFF \ -DUSE_SCIP=OFF \ -S. \ - -Bbuild + -Bbuild \ + -DBUILD_SAMPLES=OFF \ + -DBUILD_EXAMPLES=OFF cmake --build build --target install -j${CPU_COUNT} From 8c000c2123e4201144098517363ed36c468ec7c1 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 26 Sep 2021 16:04:57 +0200 Subject: [PATCH 025/111] Set versions correctly --- recipes/or-tools/meta.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 520d0f312aea6..44e510bc6a983 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -25,11 +25,13 @@ requirements: - 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 + - coin-or-utils ==2.11.4 + - coin-or-osi ==0.108.6 + - coin-or-clp ==1.17.4 + - coin-or-cgl ==0.60.3 + - coin-or-cbc ==2.10.5 + run_constrained: + - scip ==7.0.1 test: commands: From c14f6e33d5b14782e097cd6a34899d7941ec9b01 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 26 Sep 2021 16:05:26 +0200 Subject: [PATCH 026/111] Set license correctly --- recipes/or-tools/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 44e510bc6a983..547bec5fd176f 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -45,8 +45,8 @@ test: about: home: https://developers.google.com/optimization - license: BSD-3-Clause - license_family: BSD + license: Apache-2.0 + license_family: Apache license_file: LICENSE-2.0.txt summary: 'Google Operations Research Tools (or-tools)' description: | From 60710dff0a1c2dddc4f692a9d6ce9c49683c5e01 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 26 Sep 2021 16:21:29 +0200 Subject: [PATCH 027/111] Build examples for testing --- recipes/or-tools/build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/or-tools/build.sh b/recipes/or-tools/build.sh index f263fde50600a..f8279f34a974f 100644 --- a/recipes/or-tools/build.sh +++ b/recipes/or-tools/build.sh @@ -7,7 +7,6 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DUSE_SCIP=OFF \ -S. \ -Bbuild \ - -DBUILD_SAMPLES=OFF \ - -DBUILD_EXAMPLES=OFF + -DBUILD_SAMPLES=OFF cmake --build build --target install -j${CPU_COUNT} From 8830cace8efcc51258484526434f1fd38eaf0d2f Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 26 Sep 2021 16:39:08 +0200 Subject: [PATCH 028/111] Prepare multi recipe --- recipes/or-tools/meta.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 547bec5fd176f..53cac4166b846 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -1,5 +1,11 @@ {% set name = "or-tools" %} {% set version = "9.0" %} +{% set home = "https://developers.google.com/optimization" %} +{% set license = "Apache-2.0" %} +{% set license_family = "Apache" %} +{% set license_file = "LICENSE-2.0.txt" %} +{% set dev_url = "https://github.com/google/or-tools" %} + package: name: {{ name|lower }} From fec8a7b67da1bb580ee833e619c99f786df126f4 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 26 Sep 2021 19:38:35 +0200 Subject: [PATCH 029/111] Relax versions again Conda cannot solve the strict specs --- recipes/or-tools/meta.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 53cac4166b846..4fa2fc1dc0cc7 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -27,17 +27,17 @@ requirements: - git - pkg-config host: - - abseil-cpp ==20210324.1 - - libprotobuf ==3.15.8 - - zlib ==1.2.11 + - abseil-cpp =20210324.1 + - libprotobuf =3.15.8 + - zlib =1.2.11 # coin or deps - - coin-or-utils ==2.11.4 - - coin-or-osi ==0.108.6 - - coin-or-clp ==1.17.4 - - coin-or-cgl ==0.60.3 - - coin-or-cbc ==2.10.5 + - 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 run_constrained: - - scip ==7.0.1 + - scip =7.0.1 test: commands: From dd6f9acae2bb5d67ed2ab44171a30f4c1536c3f4 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 26 Sep 2021 21:12:56 +0200 Subject: [PATCH 030/111] Revert "Build examples for testing" This reverts commit 60710dff0a1c2dddc4f692a9d6ce9c49683c5e01. --- recipes/or-tools/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/or-tools/build.sh b/recipes/or-tools/build.sh index f8279f34a974f..f263fde50600a 100644 --- a/recipes/or-tools/build.sh +++ b/recipes/or-tools/build.sh @@ -7,6 +7,7 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DUSE_SCIP=OFF \ -S. \ -Bbuild \ - -DBUILD_SAMPLES=OFF + -DBUILD_SAMPLES=OFF \ + -DBUILD_EXAMPLES=OFF cmake --build build --target install -j${CPU_COUNT} From 1f96c2ca314b0bf179976918a0c8851010ca5605 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 26 Sep 2021 21:22:06 +0200 Subject: [PATCH 031/111] Add cpp to outputs --- recipes/or-tools/{build.sh => build-cpp.sh} | 0 recipes/or-tools/meta.yaml | 94 +++++++++++---------- 2 files changed, 49 insertions(+), 45 deletions(-) rename recipes/or-tools/{build.sh => build-cpp.sh} (100%) diff --git a/recipes/or-tools/build.sh b/recipes/or-tools/build-cpp.sh similarity index 100% rename from recipes/or-tools/build.sh rename to recipes/or-tools/build-cpp.sh diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 4fa2fc1dc0cc7..47d55f1207a13 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -8,7 +8,7 @@ package: - name: {{ name|lower }} + name: {{ name|lower }}-package version: {{ version }} source: @@ -17,54 +17,58 @@ source: build: number: 0 - skip: True # [not linux] -requirements: - build: - - {{ compiler('c') }} - - {{ compiler('cxx') }} - - cmake >=3.18 - - 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 - run_constrained: - - scip =7.0.1 +outputs + - name: {{ name|lower }} + script: build-cpp.sh + skip: True # [not x86_64] + + requirements: + build: + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - cmake >=3.18 + - 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 + run_constrained: + - scip =7.0.1 -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 + 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: Apache-2.0 - license_family: Apache - 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. + about: + home: {{ home }} + license: {{ license }} + license_family: {{ license_family }} + license_file: {{ license_file }} + 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 + 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: {{ dev_url }} extra: recipe-maintainers: From 034f2a33f33a81dfbf3968115727fbaad5ae86f8 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 26 Sep 2021 22:18:00 +0200 Subject: [PATCH 032/111] Add python output --- recipes/or-tools/meta.yaml | 79 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 47d55f1207a13..03cdb9de7018c 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -15,10 +15,30 @@ source: url: https://github.com/google/or-tools/archive/v{{ version }}.tar.gz sha256: fa7700b614ea2a5b2b6e37b76874bd2c3f04a80f03cbbf7871a2d2d5cd3a6091 +# The meta package + build: number: 0 +about: + home: {{ home }} + license: {{ license }} + license_family: {{ license_family }} + license_file: {{ license_file }} + summary: 'Google Operations Research Tools (or-tools) python package' + 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: {{ dev_url }} + outputs + # The core package - name: {{ name|lower }} script: build-cpp.sh skip: True # [not x86_64] @@ -70,6 +90,65 @@ outputs and award-winning CP-SAT. dev_url: {{ dev_url }} + # The python package. + - name: ortools + script: build-python.sh + skip: True # [not x86_64] + + requirements: + build: + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - cmake >=3.18 + - git + - pkg-config + - setuptools + - swig + host: + - abseil-cpp =20210324.1 + - libprotobuf =3.15.8 + - pip >=9.0.1 + - python >=3.6 + - 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 + run: + - absl-py >=0.11 + - protobuf >=3.15.8 + - python >=3.6 + run_constrained: + - scip =7.0.1 + + test: + imports: + - ortools + - ortools.linear_solver.pywraplp + commands: + - pip check + requires: + - pip + + about: + home: {{ home }} + license: {{ license }} + license_family: {{ license_family }} + license_file: {{ license_file }} + summary: 'Google Operations Research Tools (or-tools) python package' + 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: {{ dev_url }} + extra: recipe-maintainers: - wolfv From bdd4b0b80be0cbacae0132466e7ddf6ad28389f6 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 26 Sep 2021 22:26:31 +0200 Subject: [PATCH 033/111] Add python patch We do not need the extra dependencies when building the wrappers since they come from conda-forge. --- ...0001-Do-not-build-deps-with-wrappers.patch | 29 +++++++++++++++++++ recipes/or-tools/meta.yaml | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 recipes/or-tools/0001-Do-not-build-deps-with-wrappers.patch diff --git a/recipes/or-tools/0001-Do-not-build-deps-with-wrappers.patch b/recipes/or-tools/0001-Do-not-build-deps-with-wrappers.patch new file mode 100644 index 0000000000000..af3bcf653f171 --- /dev/null +++ b/recipes/or-tools/0001-Do-not-build-deps-with-wrappers.patch @@ -0,0 +1,29 @@ +From 7bdcc0fcfaca2af660285ff90b2b157b65fa3adf Mon Sep 17 00:00:00 2001 +From: BastianZim <10774221+BastianZim@users.noreply.github.com> +Date: Sun, 26 Sep 2021 22:22:39 +0200 +Subject: [PATCH] Do not build deps with wrappers + +--- + CMakeLists.txt | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7a6be9deca..0cdd4ac2a7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -151,11 +151,7 @@ endif() + + # By default all dependencies are NOT built (i.e. BUILD_DEPS=OFF), + # BUT if building any wrappers (Python, Java or .Net) then BUILD_DEPS=ON. +-if(BUILD_PYTHON OR BUILD_JAVA OR BUILD_DOTNET) +- option(BUILD_DEPS "Build all dependencies" ON) +-else() +- option(BUILD_DEPS "Build all dependencies" OFF) +-endif() ++option(BUILD_DEPS "Build all dependencies" OFF) + message(STATUS "Build all dependencies: ${BUILD_DEPS}") + # Install built dependencies if any, + option(INSTALL_BUILD_DEPS "Install build all dependencies" ON) +-- +2.33.0 + diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 03cdb9de7018c..9c213b195a9ce 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -94,6 +94,8 @@ outputs - name: ortools script: build-python.sh skip: True # [not x86_64] + patches: + - 0001-Do-not-build-deps-with-wrappers.patch requirements: build: From 099e0f3e815470eaec58e0cff0b67398de68be84 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 26 Sep 2021 22:31:49 +0200 Subject: [PATCH 034/111] Fix linter --- recipes/or-tools/meta.yaml | 43 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 9c213b195a9ce..9c43f071575fa 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -14,34 +14,19 @@ package: source: url: https://github.com/google/or-tools/archive/v{{ version }}.tar.gz sha256: fa7700b614ea2a5b2b6e37b76874bd2c3f04a80f03cbbf7871a2d2d5cd3a6091 + patches: + - 0001-Do-not-build-deps-with-wrappers.patch # The meta package build: number: 0 + skip: True # [not x86_64] -about: - home: {{ home }} - license: {{ license }} - license_family: {{ license_family }} - license_file: {{ license_file }} - summary: 'Google Operations Research Tools (or-tools) python package' - 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: {{ dev_url }} - -outputs +outputs: # The core package - name: {{ name|lower }} script: build-cpp.sh - skip: True # [not x86_64] requirements: build: @@ -93,9 +78,6 @@ outputs # The python package. - name: ortools script: build-python.sh - skip: True # [not x86_64] - patches: - - 0001-Do-not-build-deps-with-wrappers.patch requirements: build: @@ -151,6 +133,23 @@ outputs and award-winning CP-SAT. dev_url: {{ dev_url }} +about: + home: {{ home }} + license: {{ license }} + license_family: {{ license_family }} + license_file: {{ license_file }} + summary: 'Google Operations Research Tools (or-tools) python package' + 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: {{ dev_url }} + extra: recipe-maintainers: - wolfv From a90b22b17c65fcb9d2318088c98ec4c7c3eeb019 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 26 Sep 2021 22:41:41 +0200 Subject: [PATCH 035/111] Create build-python.sh --- recipes/or-tools/build-python.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 recipes/or-tools/build-python.sh diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh new file mode 100644 index 0000000000000..5147815921270 --- /dev/null +++ b/recipes/or-tools/build-python.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -BUILD_DEPS=OFF \ + -DUSE_SCIP=OFF \ + -S. \ + -Bbuild \ + -DBUILD_SAMPLES=OFF \ + -DBUILD_EXAMPLES=OFF \ + -BUILD_PYTHON=ON + +cmake --build build --target install -j${CPU_COUNT} From 29e3422b8d61a90adf826944aa022c24f59b55ec Mon Sep 17 00:00:00 2001 From: Bastian Zimmermann <10774221+BastianZim@users.noreply.github.com> Date: Mon, 27 Sep 2021 11:21:02 +0200 Subject: [PATCH 036/111] Change skip to not Linux for now --- recipes/or-tools/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 9c43f071575fa..66ce666274f59 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -21,7 +21,7 @@ source: build: number: 0 - skip: True # [not x86_64] + skip: True # [not Linux] outputs: # The core package From 3d9dedce01b7560dad0aaa8d6c192314658283ce Mon Sep 17 00:00:00 2001 From: Bastian Zimmermann <10774221+BastianZim@users.noreply.github.com> Date: Mon, 27 Sep 2021 11:26:58 +0200 Subject: [PATCH 037/111] Fix skip --- recipes/or-tools/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 66ce666274f59..2fcecff6a7fd1 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -21,7 +21,7 @@ source: build: number: 0 - skip: True # [not Linux] + skip: True # [not linux] outputs: # The core package From 7e2706516dd2b1155b74a1e393ed776f3c1a879e Mon Sep 17 00:00:00 2001 From: Bastian Zimmermann <10774221+BastianZim@users.noreply.github.com> Date: Mon, 27 Sep 2021 19:51:12 +0200 Subject: [PATCH 038/111] Update depts --- recipes/or-tools/meta.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 2fcecff6a7fd1..7d3d7caa5de81 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -85,9 +85,11 @@ outputs: - {{ compiler('cxx') }} - cmake >=3.18 - git + - mypy-protobuf - pkg-config - setuptools - - swig + - swig >=4.0 + - wheel host: - abseil-cpp =20210324.1 - libprotobuf =3.15.8 From f2b11f16734d5b52af487fb63218c5da326aca30 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 28 Sep 2021 11:32:31 +0200 Subject: [PATCH 039/111] Supply conda python --- recipes/or-tools/build-cpp.sh | 3 ++- recipes/or-tools/build-python.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes/or-tools/build-cpp.sh b/recipes/or-tools/build-cpp.sh index f263fde50600a..0012a891bc1bc 100644 --- a/recipes/or-tools/build-cpp.sh +++ b/recipes/or-tools/build-cpp.sh @@ -8,6 +8,7 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -S. \ -Bbuild \ -DBUILD_SAMPLES=OFF \ - -DBUILD_EXAMPLES=OFF + -DBUILD_EXAMPLES=OFF \ + -DPython_EXECUTABLE="$PYTHON" cmake --build build --target install -j${CPU_COUNT} diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index 5147815921270..d2daf8835864c 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -9,6 +9,7 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -Bbuild \ -DBUILD_SAMPLES=OFF \ -DBUILD_EXAMPLES=OFF \ - -BUILD_PYTHON=ON + -BUILD_PYTHON=ON \ + -DPython_EXECUTABLE="$PYTHON" cmake --build build --target install -j${CPU_COUNT} From 79a1012b18717307ab77489a01798d94727986bf Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 28 Sep 2021 11:35:30 +0200 Subject: [PATCH 040/111] Add feedstock name --- recipes/or-tools/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 7d3d7caa5de81..92d1f58c77c93 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -156,3 +156,4 @@ extra: recipe-maintainers: - wolfv - BastianZim + feedstock-name: or-tools From 9bae2ce336c4d9e50d21b57d9f3709ff374e9c6d Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 28 Sep 2021 11:56:02 +0200 Subject: [PATCH 041/111] Fix builds to non-leaking --- recipes/or-tools/meta.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 92d1f58c77c93..6af1b2c14a539 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -40,9 +40,9 @@ outputs: - libprotobuf =3.15.8 - zlib =1.2.11 # coin or deps - - coin-or-utils =2.11 + - coin-or-utils=2.11=*_2 - coin-or-osi =0.108 - - coin-or-clp =1.17.4 + - coin-or-clp=1.17.4=*_2 - coin-or-cgl =0.60 - coin-or-cbc =2.10 run_constrained: @@ -97,9 +97,9 @@ outputs: - python >=3.6 - zlib =1.2.11 # coin or deps - - coin-or-utils =2.11 + - coin-or-utils=2.11=*_2 - coin-or-osi =0.108 - - coin-or-clp =1.17.4 + - coin-or-clp=1.17.4=*_2 - coin-or-cgl =0.60 - coin-or-cbc =2.10 run: From 4af2f54bc630a9a58481f61a6a2b03b06021773d Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 28 Sep 2021 14:51:00 +0200 Subject: [PATCH 042/111] Fix coin-or-utils dep --- recipes/or-tools/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 6af1b2c14a539..577b6139ddd9b 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -40,7 +40,7 @@ outputs: - libprotobuf =3.15.8 - zlib =1.2.11 # coin or deps - - coin-or-utils=2.11=*_2 + - coin-or-utils=2.11*=*_2 - coin-or-osi =0.108 - coin-or-clp=1.17.4=*_2 - coin-or-cgl =0.60 @@ -97,7 +97,7 @@ outputs: - python >=3.6 - zlib =1.2.11 # coin or deps - - coin-or-utils=2.11=*_2 + - coin-or-utils=2.11*=*_2 - coin-or-osi =0.108 - coin-or-clp=1.17.4=*_2 - coin-or-cgl =0.60 From 7e3734bd421fadc1d002d562834d7cbf617fd9ea Mon Sep 17 00:00:00 2001 From: Bastian Zimmermann <10774221+BastianZim@users.noreply.github.com> Date: Wed, 29 Sep 2021 12:49:20 +0200 Subject: [PATCH 043/111] Fix to h232ff3c build --- recipes/or-tools/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 577b6139ddd9b..1760182424ed5 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -42,7 +42,7 @@ outputs: # coin or deps - coin-or-utils=2.11*=*_2 - coin-or-osi =0.108 - - coin-or-clp=1.17.4=*_2 + - coin-or-clp=1.17.4=*_0 - coin-or-cgl =0.60 - coin-or-cbc =2.10 run_constrained: @@ -99,7 +99,7 @@ outputs: # coin or deps - coin-or-utils=2.11*=*_2 - coin-or-osi =0.108 - - coin-or-clp=1.17.4=*_2 + - coin-or-clp=1.17.4=*_0 - coin-or-cgl =0.60 - coin-or-cbc =2.10 run: From 0026ce9f60363c15b6882091fd32970573b09a1c Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Wed, 29 Sep 2021 19:44:10 +0200 Subject: [PATCH 044/111] Try something Only clp actually causes an error so let's see if that is enough --- recipes/or-tools/meta.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 1760182424ed5..4b6ae179c0017 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -45,6 +45,8 @@ outputs: - coin-or-clp=1.17.4=*_0 - coin-or-cgl =0.60 - coin-or-cbc =2.10 + run: + - coin-or-clp=1.17.4=*_0 run_constrained: - scip =7.0.1 @@ -106,6 +108,7 @@ outputs: - absl-py >=0.11 - protobuf >=3.15.8 - python >=3.6 + - coin-or-clp=1.17.4=*_0 run_constrained: - scip =7.0.1 From 9b2a5fbf5ee1fafa2e9f37df6cc863fc4151563f Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Wed, 29 Sep 2021 20:42:01 +0200 Subject: [PATCH 045/111] Move coin-or to run Co-Authored-By: Wolf Vollprecht --- recipes/or-tools/meta.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 4b6ae179c0017..9ef3eb60777ca 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -41,12 +41,13 @@ outputs: - zlib =1.2.11 # coin or deps - coin-or-utils=2.11*=*_2 - - coin-or-osi =0.108 + # - coin-or-osi =0.108 - coin-or-clp=1.17.4=*_0 - - coin-or-cgl =0.60 + # - coin-or-cgl =0.60 - coin-or-cbc =2.10 run: - coin-or-clp=1.17.4=*_0 + - coin-or-utils=2.11*=*_2 run_constrained: - scip =7.0.1 @@ -100,15 +101,16 @@ outputs: - zlib =1.2.11 # coin or deps - coin-or-utils=2.11*=*_2 - - coin-or-osi =0.108 + # - coin-or-osi =0.108 - coin-or-clp=1.17.4=*_0 - - coin-or-cgl =0.60 + # - coin-or-cgl =0.60 - coin-or-cbc =2.10 run: - absl-py >=0.11 - protobuf >=3.15.8 - python >=3.6 - coin-or-clp=1.17.4=*_0 + - coin-or-utils=2.11*=*_2 run_constrained: - scip =7.0.1 From 53a319013722419a7482301f7aa861e9954c3de8 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 2 Oct 2021 15:43:09 +0200 Subject: [PATCH 046/111] Update version to 9.1 --- recipes/or-tools/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 9ef3eb60777ca..6a1adc6648ea3 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -1,5 +1,5 @@ {% set name = "or-tools" %} -{% set version = "9.0" %} +{% set version = "9.1" %} {% set home = "https://developers.google.com/optimization" %} {% set license = "Apache-2.0" %} {% set license_family = "Apache" %} @@ -13,7 +13,7 @@ package: source: url: https://github.com/google/or-tools/archive/v{{ version }}.tar.gz - sha256: fa7700b614ea2a5b2b6e37b76874bd2c3f04a80f03cbbf7871a2d2d5cd3a6091 + sha256: b51ca3b08f768de5a0c1029f7127264640e50d9c7b83383a175109ef213bd307 patches: - 0001-Do-not-build-deps-with-wrappers.patch From 46ab9069c685715e5dda9cd7a5d07de7720efce1 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 2 Oct 2021 15:48:03 +0200 Subject: [PATCH 047/111] Update deps --- recipes/or-tools/meta.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 6a1adc6648ea3..8a383e72d5432 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -36,8 +36,8 @@ outputs: - git - pkg-config host: - - abseil-cpp =20210324.1 - - libprotobuf =3.15.8 + - abseil-cpp =20210324.2 + - libprotobuf =3.18.0 - zlib =1.2.11 # coin or deps - coin-or-utils=2.11*=*_2 @@ -94,8 +94,8 @@ outputs: - swig >=4.0 - wheel host: - - abseil-cpp =20210324.1 - - libprotobuf =3.15.8 + - abseil-cpp =20210324.2 + - libprotobuf =3.18.0 - pip >=9.0.1 - python >=3.6 - zlib =1.2.11 @@ -106,8 +106,8 @@ outputs: # - coin-or-cgl =0.60 - coin-or-cbc =2.10 run: - - absl-py >=0.11 - - protobuf >=3.15.8 + - absl-py >=0.13 + - protobuf >=3.18.0 - python >=3.6 - coin-or-clp=1.17.4=*_0 - coin-or-utils=2.11*=*_2 From 15a577e21dcb0955129c03ac4b4c9963cae3e9ea Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 2 Oct 2021 19:29:21 +0200 Subject: [PATCH 048/111] Add back coin-or completely --- recipes/or-tools/meta.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 8a383e72d5432..209e562764312 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -41,9 +41,9 @@ outputs: - zlib =1.2.11 # coin or deps - coin-or-utils=2.11*=*_2 - # - coin-or-osi =0.108 + - coin-or-osi =0.108 - coin-or-clp=1.17.4=*_0 - # - coin-or-cgl =0.60 + - coin-or-cgl =0.60 - coin-or-cbc =2.10 run: - coin-or-clp=1.17.4=*_0 @@ -101,9 +101,9 @@ outputs: - zlib =1.2.11 # coin or deps - coin-or-utils=2.11*=*_2 - # - coin-or-osi =0.108 + - coin-or-osi =0.108 - coin-or-clp=1.17.4=*_0 - # - coin-or-cgl =0.60 + - coin-or-cgl =0.60 - coin-or-cbc =2.10 run: - absl-py >=0.13 From a5a3fb4e7e0dbf81a51c37a02a8361dadcbbd7d9 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 2 Oct 2021 20:33:31 +0200 Subject: [PATCH 049/111] Set builds --- recipes/or-tools/meta.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 209e562764312..701ec8129b302 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -40,14 +40,14 @@ outputs: - libprotobuf =3.18.0 - zlib =1.2.11 # coin or deps - - coin-or-utils=2.11*=*_2 - - coin-or-osi =0.108 + - coin-or-utils=2.11.4=*_2 + - coin-or-osi =0.108.6=*_1 - coin-or-clp=1.17.4=*_0 - - coin-or-cgl =0.60 - - coin-or-cbc =2.10 + - coin-or-cgl =0.60.3=*_1 + - coin-or-cbc =2.10.5=*_4 run: - coin-or-clp=1.17.4=*_0 - - coin-or-utils=2.11*=*_2 + - coin-or-utils=2.11.4=*_2 run_constrained: - scip =7.0.1 @@ -100,17 +100,17 @@ outputs: - python >=3.6 - zlib =1.2.11 # coin or deps - - coin-or-utils=2.11*=*_2 - - coin-or-osi =0.108 + - coin-or-utils=2.11.4=*_2 + - coin-or-osi =0.108.6=*_1 - coin-or-clp=1.17.4=*_0 - - coin-or-cgl =0.60 - - coin-or-cbc =2.10 + - coin-or-cgl =0.60.3=*_1 + - coin-or-cbc =2.10.5=*_4 run: - absl-py >=0.13 - protobuf >=3.18.0 - python >=3.6 - coin-or-clp=1.17.4=*_0 - - coin-or-utils=2.11*=*_2 + - coin-or-utils=2.11.4=*_2 run_constrained: - scip =7.0.1 From 0d95e4e39f0f64eb5dc67f8496f7b5065db133f5 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 2 Oct 2021 20:37:51 +0200 Subject: [PATCH 050/111] Fix spacing --- recipes/or-tools/meta.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 701ec8129b302..17fe253d2ab9b 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -41,10 +41,10 @@ outputs: - zlib =1.2.11 # coin or deps - coin-or-utils=2.11.4=*_2 - - coin-or-osi =0.108.6=*_1 + - coin-or-osi=0.108.6=*_1 - coin-or-clp=1.17.4=*_0 - - coin-or-cgl =0.60.3=*_1 - - coin-or-cbc =2.10.5=*_4 + - coin-or-cgl=0.60.3=*_1 + - coin-or-cbc=2.10.5=*_4 run: - coin-or-clp=1.17.4=*_0 - coin-or-utils=2.11.4=*_2 @@ -101,10 +101,10 @@ outputs: - zlib =1.2.11 # coin or deps - coin-or-utils=2.11.4=*_2 - - coin-or-osi =0.108.6=*_1 + - coin-or-osi=0.108.6=*_1 - coin-or-clp=1.17.4=*_0 - - coin-or-cgl =0.60.3=*_1 - - coin-or-cbc =2.10.5=*_4 + - coin-or-cgl=0.60.3=*_1 + - coin-or-cbc=2.10.5=*_4 run: - absl-py >=0.13 - protobuf >=3.18.0 From a1cb2419fa7a4714cac10998bb4c703d4cc462e1 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 2 Oct 2021 22:23:58 +0200 Subject: [PATCH 051/111] Change formatting According to https://github.com/conda-forge/staged-recipes/pull/16147#issuecomment-929035972 --- recipes/or-tools/meta.yaml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 17fe253d2ab9b..245a46c38bb76 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -40,14 +40,14 @@ outputs: - libprotobuf =3.18.0 - zlib =1.2.11 # coin or deps - - coin-or-utils=2.11.4=*_2 - - coin-or-osi=0.108.6=*_1 - - coin-or-clp=1.17.4=*_0 - - coin-or-cgl=0.60.3=*_1 - - coin-or-cbc=2.10.5=*_4 + - coin-or-utils 2.11.4 *_2 + - coin-or-osi 0.108.6 *_1 + - coin-or-clp 1.17.4 *_0 + - coin-or-cgl 0.60.3 *_0 + - coin-or-cbc 2.10.5 *_4 run: - - coin-or-clp=1.17.4=*_0 - - coin-or-utils=2.11.4=*_2 + - coin-or-clp 1.17.4 *_0 + - coin-or-utils 2.11.4 *_2 run_constrained: - scip =7.0.1 @@ -100,17 +100,17 @@ outputs: - python >=3.6 - zlib =1.2.11 # coin or deps - - coin-or-utils=2.11.4=*_2 - - coin-or-osi=0.108.6=*_1 - - coin-or-clp=1.17.4=*_0 - - coin-or-cgl=0.60.3=*_1 - - coin-or-cbc=2.10.5=*_4 + - coin-or-utils 2.11.4 *_2 + - coin-or-osi 0.108.6 *_1 + - coin-or-clp 1.17.4 *_0 + - coin-or-cgl 0.60.3 *_0 + - coin-or-cbc 2.10.5 *_4 run: - absl-py >=0.13 - protobuf >=3.18.0 - python >=3.6 - - coin-or-clp=1.17.4=*_0 - - coin-or-utils=2.11.4=*_2 + - coin-or-clp 1.17.4 *_0 + - coin-or-utils 2.11.4 *_2 run_constrained: - scip =7.0.1 From 497516a5552cf20d362c7769e4a7e1ba21d4fa0f Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 2 Oct 2021 23:37:31 +0200 Subject: [PATCH 052/111] Correct build version --- recipes/or-tools/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 245a46c38bb76..57858153fdf1b 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -43,7 +43,7 @@ outputs: - coin-or-utils 2.11.4 *_2 - coin-or-osi 0.108.6 *_1 - coin-or-clp 1.17.4 *_0 - - coin-or-cgl 0.60.3 *_0 + - coin-or-cgl 0.60.3 *_1 - coin-or-cbc 2.10.5 *_4 run: - coin-or-clp 1.17.4 *_0 @@ -103,7 +103,7 @@ outputs: - coin-or-utils 2.11.4 *_2 - coin-or-osi 0.108.6 *_1 - coin-or-clp 1.17.4 *_0 - - coin-or-cgl 0.60.3 *_0 + - coin-or-cgl 0.60.3 *_1 - coin-or-cbc 2.10.5 *_4 run: - absl-py >=0.13 From ba1bf1cad39e5b3a6c65af7ef48a18a87b531b9a Mon Sep 17 00:00:00 2001 From: Bastian Zimmermann <10774221+BastianZim@users.noreply.github.com> Date: Sun, 3 Oct 2021 16:08:30 +0200 Subject: [PATCH 053/111] Change coin-or-cgl temporarily Otherwise, we're unable to tackle the rest. --- recipes/or-tools/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 57858153fdf1b..245a46c38bb76 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -43,7 +43,7 @@ outputs: - coin-or-utils 2.11.4 *_2 - coin-or-osi 0.108.6 *_1 - coin-or-clp 1.17.4 *_0 - - coin-or-cgl 0.60.3 *_1 + - coin-or-cgl 0.60.3 *_0 - coin-or-cbc 2.10.5 *_4 run: - coin-or-clp 1.17.4 *_0 @@ -103,7 +103,7 @@ outputs: - coin-or-utils 2.11.4 *_2 - coin-or-osi 0.108.6 *_1 - coin-or-clp 1.17.4 *_0 - - coin-or-cgl 0.60.3 *_1 + - coin-or-cgl 0.60.3 *_0 - coin-or-cbc 2.10.5 *_4 run: - absl-py >=0.13 From de2233aafc22bf7cad3710b8b8295cf7574e483e Mon Sep 17 00:00:00 2001 From: Bastian Zimmermann <10774221+BastianZim@users.noreply.github.com> Date: Sun, 3 Oct 2021 16:11:19 +0200 Subject: [PATCH 054/111] Pin zlib to newest build number --- recipes/or-tools/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 245a46c38bb76..8b21752268a73 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -38,7 +38,7 @@ outputs: host: - abseil-cpp =20210324.2 - libprotobuf =3.18.0 - - zlib =1.2.11 + - zlib =1.2.11 *_1013 # coin or deps - coin-or-utils 2.11.4 *_2 - coin-or-osi 0.108.6 *_1 @@ -98,7 +98,7 @@ outputs: - libprotobuf =3.18.0 - pip >=9.0.1 - python >=3.6 - - zlib =1.2.11 + - zlib =1.2.11 *_1013 # coin or deps - coin-or-utils 2.11.4 *_2 - coin-or-osi 0.108.6 *_1 From 475ca9e26b3d7d7edea5fe73ea88d7be62f1118c Mon Sep 17 00:00:00 2001 From: Bastian Zimmermann <10774221+BastianZim@users.noreply.github.com> Date: Sun, 3 Oct 2021 16:18:20 +0200 Subject: [PATCH 055/111] Make zlib pin explicit --- recipes/or-tools/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 8b21752268a73..7bb02d1953b8f 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -38,7 +38,7 @@ outputs: host: - abseil-cpp =20210324.2 - libprotobuf =3.18.0 - - zlib =1.2.11 *_1013 + - zlib 1.2.11 *_1013 # coin or deps - coin-or-utils 2.11.4 *_2 - coin-or-osi 0.108.6 *_1 @@ -98,7 +98,7 @@ outputs: - libprotobuf =3.18.0 - pip >=9.0.1 - python >=3.6 - - zlib =1.2.11 *_1013 + - zlib 1.2.11 *_1013 # coin or deps - coin-or-utils 2.11.4 *_2 - coin-or-osi 0.108.6 *_1 From 56eef98b7d973f0591abd20f703cbab73661250a Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 3 Oct 2021 23:47:12 +0200 Subject: [PATCH 056/111] Indicate python build --- recipes/or-tools/build-python.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index d2daf8835864c..d233271c58e64 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -1,5 +1,7 @@ #!/bin/sh +echo Building python + cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=lib \ From 1d5d3d7321291d5e855e46b8374a32e8e3e26a80 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sun, 3 Oct 2021 23:47:20 +0200 Subject: [PATCH 057/111] Revert "Change coin-or-cgl temporarily" This reverts commit ba1bf1cad39e5b3a6c65af7ef48a18a87b531b9a. --- recipes/or-tools/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 7bb02d1953b8f..ebebc119d579c 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -43,7 +43,7 @@ outputs: - coin-or-utils 2.11.4 *_2 - coin-or-osi 0.108.6 *_1 - coin-or-clp 1.17.4 *_0 - - coin-or-cgl 0.60.3 *_0 + - coin-or-cgl 0.60.3 *_1 - coin-or-cbc 2.10.5 *_4 run: - coin-or-clp 1.17.4 *_0 @@ -103,7 +103,7 @@ outputs: - coin-or-utils 2.11.4 *_2 - coin-or-osi 0.108.6 *_1 - coin-or-clp 1.17.4 *_0 - - coin-or-cgl 0.60.3 *_0 + - coin-or-cgl 0.60.3 *_1 - coin-or-cbc 2.10.5 *_4 run: - absl-py >=0.13 From cbdb8d3648fa8bb11ca3312271e04ee5d58e3133 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Wed, 6 Oct 2021 14:13:31 +0200 Subject: [PATCH 058/111] Remove samples from test They aren't being built anymore --- recipes/or-tools/meta.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index ebebc119d579c..16cdcaf628b64 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -58,8 +58,6 @@ outputs: - 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: {{ home }} From c5f1ddb2a8c8091f5d0e9e98f4675199fbc52c9c Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Wed, 6 Oct 2021 16:18:36 +0200 Subject: [PATCH 059/111] Try to fix python building --- recipes/or-tools/build-python.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index d233271c58e64..c2ab15c9a3ba1 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -12,6 +12,6 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DBUILD_SAMPLES=OFF \ -DBUILD_EXAMPLES=OFF \ -BUILD_PYTHON=ON \ - -DPython_EXECUTABLE="$PYTHON" + -DPython3_EXECUTABLE="$PYTHON" -cmake --build build --target install -j${CPU_COUNT} +cmake --build build --target python_package -j${CPU_COUNT} From c627cf87808e03c245706d5e43df700f748fcce2 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Wed, 6 Oct 2021 18:05:00 +0200 Subject: [PATCH 060/111] Add python compilation --- ...0001-Do-not-build-deps-with-wrappers.patch | 29 ------------------- recipes/or-tools/build-python.sh | 6 ++-- recipes/or-tools/meta.yaml | 6 ++-- 3 files changed, 6 insertions(+), 35 deletions(-) delete mode 100644 recipes/or-tools/0001-Do-not-build-deps-with-wrappers.patch diff --git a/recipes/or-tools/0001-Do-not-build-deps-with-wrappers.patch b/recipes/or-tools/0001-Do-not-build-deps-with-wrappers.patch deleted file mode 100644 index af3bcf653f171..0000000000000 --- a/recipes/or-tools/0001-Do-not-build-deps-with-wrappers.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 7bdcc0fcfaca2af660285ff90b2b157b65fa3adf Mon Sep 17 00:00:00 2001 -From: BastianZim <10774221+BastianZim@users.noreply.github.com> -Date: Sun, 26 Sep 2021 22:22:39 +0200 -Subject: [PATCH] Do not build deps with wrappers - ---- - CMakeLists.txt | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7a6be9deca..0cdd4ac2a7 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -151,11 +151,7 @@ endif() - - # By default all dependencies are NOT built (i.e. BUILD_DEPS=OFF), - # BUT if building any wrappers (Python, Java or .Net) then BUILD_DEPS=ON. --if(BUILD_PYTHON OR BUILD_JAVA OR BUILD_DOTNET) -- option(BUILD_DEPS "Build all dependencies" ON) --else() -- option(BUILD_DEPS "Build all dependencies" OFF) --endif() -+option(BUILD_DEPS "Build all dependencies" OFF) - message(STATUS "Build all dependencies: ${BUILD_DEPS}") - # Install built dependencies if any, - option(INSTALL_BUILD_DEPS "Install build all dependencies" ON) --- -2.33.0 - diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index c2ab15c9a3ba1..8441c90c781a2 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -5,13 +5,13 @@ echo Building python cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=lib \ - -BUILD_DEPS=OFF \ + -DBUILD_DEPS=OFF \ -DUSE_SCIP=OFF \ -S. \ -Bbuild \ -DBUILD_SAMPLES=OFF \ -DBUILD_EXAMPLES=OFF \ - -BUILD_PYTHON=ON \ + -DBUILD_PYTHON=ON \ -DPython3_EXECUTABLE="$PYTHON" -cmake --build build --target python_package -j${CPU_COUNT} +cmake --build build -j${CPU_COUNT} diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 16cdcaf628b64..59a3f55fbf53f 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -14,8 +14,6 @@ package: source: url: https://github.com/google/or-tools/archive/v{{ version }}.tar.gz sha256: b51ca3b08f768de5a0c1029f7127264640e50d9c7b83383a175109ef213bd307 - patches: - - 0001-Do-not-build-deps-with-wrappers.patch # The meta package @@ -86,14 +84,15 @@ outputs: - {{ compiler('cxx') }} - cmake >=3.18 - git - - mypy-protobuf - pkg-config - setuptools - swig >=4.0 - wheel host: - abseil-cpp =20210324.2 + - absl-py >=0.13 - libprotobuf =3.18.0 + - mypy-protobuf - pip >=9.0.1 - python >=3.6 - zlib 1.2.11 *_1013 @@ -105,6 +104,7 @@ outputs: - coin-or-cbc 2.10.5 *_4 run: - absl-py >=0.13 + - mypy-protobuf - protobuf >=3.18.0 - python >=3.6 - coin-or-clp 1.17.4 *_0 From 554ec751356b5569ded612d97e21dc6f6ebc1fa6 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Wed, 6 Oct 2021 18:28:07 +0200 Subject: [PATCH 061/111] Add patch to not build python deps --- .../0001-Do-not-install-python-deps.patch | 29 +++++++++++++++++++ recipes/or-tools/meta.yaml | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 recipes/or-tools/0001-Do-not-install-python-deps.patch diff --git a/recipes/or-tools/0001-Do-not-install-python-deps.patch b/recipes/or-tools/0001-Do-not-install-python-deps.patch new file mode 100644 index 0000000000000..d2dc3b1e84eb2 --- /dev/null +++ b/recipes/or-tools/0001-Do-not-install-python-deps.patch @@ -0,0 +1,29 @@ +From 41deb6530ee27d19e50e6d6698ee36e972d70f17 Mon Sep 17 00:00:00 2001 +From: BastianZim <10774221+BastianZim@users.noreply.github.com> +Date: Wed, 6 Oct 2021 18:10:22 +0200 +Subject: [PATCH] Do not install python deps + +--- + cmake/python.cmake | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/cmake/python.cmake b/cmake/python.cmake +index a19d2d2ab3..6db987915d 100644 +--- a/cmake/python.cmake ++++ b/cmake/python.cmake +@@ -39,11 +39,7 @@ function(search_python_module MODULE_NAME) + if(${_RESULT} STREQUAL "0") + message(STATUS "Found python module: ${MODULE_NAME} (found version \"${MODULE_VERSION}\")") + else() +- message(WARNING "Can't find python module \"${MODULE_NAME}\", install it using pip...") +- execute_process( +- COMMAND ${Python3_EXECUTABLE} -m pip install --user ${MODULE_NAME} +- OUTPUT_STRIP_TRAILING_WHITESPACE +- ) ++ message(FATAL_ERROR "Can't find python module \"${MODULE_NAME}\", please install it using your system package manger") + endif() + endfunction() + +-- +2.30.1 (Apple Git-130) + diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 59a3f55fbf53f..133abd97bdb65 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -14,6 +14,8 @@ package: source: url: https://github.com/google/or-tools/archive/v{{ version }}.tar.gz sha256: b51ca3b08f768de5a0c1029f7127264640e50d9c7b83383a175109ef213bd307 + patches: + - 0001-Do-not-install-python-deps.patch # The meta package From 1ea9577f780176c584ecce3733c1b3b6ddaaa353 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Wed, 6 Oct 2021 18:40:23 +0200 Subject: [PATCH 062/111] Fix spelling --- recipes/or-tools/0001-Do-not-install-python-deps.patch | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/recipes/or-tools/0001-Do-not-install-python-deps.patch b/recipes/or-tools/0001-Do-not-install-python-deps.patch index d2dc3b1e84eb2..60ad2dcb444fb 100644 --- a/recipes/or-tools/0001-Do-not-install-python-deps.patch +++ b/recipes/or-tools/0001-Do-not-install-python-deps.patch @@ -20,10 +20,9 @@ index a19d2d2ab3..6db987915d 100644 - COMMAND ${Python3_EXECUTABLE} -m pip install --user ${MODULE_NAME} - OUTPUT_STRIP_TRAILING_WHITESPACE - ) -+ message(FATAL_ERROR "Can't find python module \"${MODULE_NAME}\", please install it using your system package manger") ++ message(FATAL_ERROR "Can't find python module \"${MODULE_NAME}\", please install it using your system package manager.") endif() endfunction() - --- -2.30.1 (Apple Git-130) +-- +2.30.1 (Apple Git-130) From 9a807e32774e1095cbbc53afef57beaf1759202e Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Wed, 6 Oct 2021 18:43:22 +0200 Subject: [PATCH 063/111] Install python package --- recipes/or-tools/build-python.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index 8441c90c781a2..6ec6bf0b57a4c 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -1,7 +1,5 @@ #!/bin/sh -echo Building python - cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=lib \ @@ -15,3 +13,6 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DPython3_EXECUTABLE="$PYTHON" cmake --build build -j${CPU_COUNT} + +${PYTHON} -m pip install . --no-deps -vv + From d6f68e6a7542e5437a3584829c971aba17347736 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Wed, 6 Oct 2021 21:13:02 +0200 Subject: [PATCH 064/111] Add mypy-protobuf --- recipes/or-tools/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 133abd97bdb65..b38716bf2ac02 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -86,6 +86,7 @@ outputs: - {{ compiler('cxx') }} - cmake >=3.18 - git + - mypy-protobuf - pkg-config - setuptools - swig >=4.0 From 212ad719c426b5f9f4c9073e74de757365f92c4c Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Wed, 6 Oct 2021 21:14:42 +0200 Subject: [PATCH 065/111] Add second patch --- .../0001-Do-not-install-python-deps.patch | 2 +- .../or-tools/0002-Change-wheel-to-sdist.patch | 25 +++++++++++++++++++ recipes/or-tools/meta.yaml | 1 + 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 recipes/or-tools/0002-Change-wheel-to-sdist.patch diff --git a/recipes/or-tools/0001-Do-not-install-python-deps.patch b/recipes/or-tools/0001-Do-not-install-python-deps.patch index 60ad2dcb444fb..e5bb087a28b11 100644 --- a/recipes/or-tools/0001-Do-not-install-python-deps.patch +++ b/recipes/or-tools/0001-Do-not-install-python-deps.patch @@ -1,7 +1,7 @@ From 41deb6530ee27d19e50e6d6698ee36e972d70f17 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Wed, 6 Oct 2021 18:10:22 +0200 -Subject: [PATCH] Do not install python deps +Subject: [PATCH 1/2] Do not install python deps --- cmake/python.cmake | 6 +----- diff --git a/recipes/or-tools/0002-Change-wheel-to-sdist.patch b/recipes/or-tools/0002-Change-wheel-to-sdist.patch new file mode 100644 index 0000000000000..73ea9236c47c3 --- /dev/null +++ b/recipes/or-tools/0002-Change-wheel-to-sdist.patch @@ -0,0 +1,25 @@ +From 8e3e8021dfe79157d719418c04b5ed8120f3af18 Mon Sep 17 00:00:00 2001 +From: BastianZim <10774221+BastianZim@users.noreply.github.com> +Date: Wed, 6 Oct 2021 21:09:59 +0200 +Subject: [PATCH 2/2] Change wheel to sdist + +--- + cmake/python.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/python.cmake b/cmake/python.cmake +index a19d2d2ab3..669212dd05 100644 +--- a/cmake/python.cmake ++++ b/cmake/python.cmake +@@ -178,7 +178,7 @@ add_custom_target(python_package ALL + COMMAND ${CMAKE_COMMAND} -E copy $ ${PYTHON_PROJECT}/scheduling + COMMAND ${CMAKE_COMMAND} -E copy $ ${PYTHON_PROJECT}/util + #COMMAND ${Python3_EXECUTABLE} setup.py bdist_egg bdist_wheel +- COMMAND ${Python3_EXECUTABLE} setup.py bdist_wheel ++ COMMAND ${Python3_EXECUTABLE} setup.py sdist + BYPRODUCTS + python/${PYTHON_PROJECT} + python/build +-- +2.33.0 + diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index b38716bf2ac02..f5e1cce852bc4 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -16,6 +16,7 @@ source: sha256: b51ca3b08f768de5a0c1029f7127264640e50d9c7b83383a175109ef213bd307 patches: - 0001-Do-not-install-python-deps.patch + - 0002-Change-wheel-to-sdist.patch # The meta package From 6e4611ab18f8f489286490e561f494788e1f0aed Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Wed, 6 Oct 2021 21:16:05 +0200 Subject: [PATCH 066/111] Change build python to new conda-forge format --- recipes/or-tools/build-python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index 6ec6bf0b57a4c..33d1e8a161c54 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -14,5 +14,5 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ cmake --build build -j${CPU_COUNT} -${PYTHON} -m pip install . --no-deps -vv +${PYTHON} -m pip install . -vv From 4aa41b6742934810aa66a83b28bbf8fe5583a452 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Wed, 6 Oct 2021 21:25:27 +0200 Subject: [PATCH 067/111] Add source of truth --- recipes/or-tools/meta.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index f5e1cce852bc4..44804c62734be 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -34,6 +34,7 @@ outputs: - {{ compiler('c') }} - {{ compiler('cxx') }} - cmake >=3.18 + # Source: https://github.com/google/or-tools/blob/stable/cmake/python.cmake#L6 - git - pkg-config host: @@ -46,6 +47,7 @@ outputs: - coin-or-clp 1.17.4 *_0 - coin-or-cgl 0.60.3 *_1 - coin-or-cbc 2.10.5 *_4 + # Source: https://github.com/google/or-tools/blob/stable/cmake/dependencies/CMakeLists.txt run: - coin-or-clp 1.17.4 *_0 - coin-or-utils 2.11.4 *_2 @@ -113,6 +115,7 @@ outputs: - python >=3.6 - coin-or-clp 1.17.4 *_0 - coin-or-utils 2.11.4 *_2 + # Source: https://github.com/google/or-tools/blob/86d4c543f717fa8716a9d66c25143660668bf825/ortools/python/setup.py.in#L44 run_constrained: - scip =7.0.1 From 03d89b5756d48c748b119e21c1917bd0c2ef13cc Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Wed, 6 Oct 2021 21:33:21 +0200 Subject: [PATCH 068/111] Change URL --- recipes/or-tools/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 44804c62734be..d35735a491f07 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -115,7 +115,7 @@ outputs: - python >=3.6 - coin-or-clp 1.17.4 *_0 - coin-or-utils 2.11.4 *_2 - # Source: https://github.com/google/or-tools/blob/86d4c543f717fa8716a9d66c25143660668bf825/ortools/python/setup.py.in#L44 + # Source: https://github.com/google/or-tools/blob/stable/ortools/python/setup.py.in#L44 run_constrained: - scip =7.0.1 From eacd576f0316c5deaa96fb96e8b31ce84deb5bf6 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Fri, 15 Oct 2021 23:16:09 +0200 Subject: [PATCH 069/111] Remove explicit builds Mamba automatically requests those --- recipes/or-tools/meta.yaml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index d35735a491f07..386c4016e93f5 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -40,17 +40,17 @@ outputs: host: - abseil-cpp =20210324.2 - libprotobuf =3.18.0 - - zlib 1.2.11 *_1013 + - zlib 1.2.11 # coin or deps - - coin-or-utils 2.11.4 *_2 - - coin-or-osi 0.108.6 *_1 - - coin-or-clp 1.17.4 *_0 - - coin-or-cgl 0.60.3 *_1 - - coin-or-cbc 2.10.5 *_4 + - coin-or-utils 2.11.4 + - coin-or-osi 0.108.6 + - coin-or-clp 1.17.4 + - coin-or-cgl 0.60.3 + - coin-or-cbc 2.10.5 # Source: https://github.com/google/or-tools/blob/stable/cmake/dependencies/CMakeLists.txt run: - - coin-or-clp 1.17.4 *_0 - - coin-or-utils 2.11.4 *_2 + - coin-or-clp 1.17.4 + - coin-or-utils 2.11.4 run_constrained: - scip =7.0.1 @@ -101,20 +101,20 @@ outputs: - mypy-protobuf - pip >=9.0.1 - python >=3.6 - - zlib 1.2.11 *_1013 + - zlib 1.2.11 # coin or deps - - coin-or-utils 2.11.4 *_2 - - coin-or-osi 0.108.6 *_1 - - coin-or-clp 1.17.4 *_0 - - coin-or-cgl 0.60.3 *_1 - - coin-or-cbc 2.10.5 *_4 + - coin-or-utils 2.11.4 + - coin-or-osi 0.108.6 + - coin-or-clp 1.17.4 + - coin-or-cgl 0.60.3 + - coin-or-cbc 2.10.5 run: - absl-py >=0.13 - mypy-protobuf - protobuf >=3.18.0 - python >=3.6 - - coin-or-clp 1.17.4 *_0 - - coin-or-utils 2.11.4 *_2 + - coin-or-clp 1.17.4 + - coin-or-utils 2.11.4 # Source: https://github.com/google/or-tools/blob/stable/ortools/python/setup.py.in#L44 run_constrained: - scip =7.0.1 From 245158de88aa0785a28a0d07ebdbcf27db5040d0 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 16 Oct 2021 14:27:55 +0200 Subject: [PATCH 070/111] Remove python --- recipes/or-tools/build-cpp.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/or-tools/build-cpp.sh b/recipes/or-tools/build-cpp.sh index 0012a891bc1bc..f263fde50600a 100644 --- a/recipes/or-tools/build-cpp.sh +++ b/recipes/or-tools/build-cpp.sh @@ -8,7 +8,6 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -S. \ -Bbuild \ -DBUILD_SAMPLES=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DPython_EXECUTABLE="$PYTHON" + -DBUILD_EXAMPLES=OFF cmake --build build --target install -j${CPU_COUNT} From 663017dcb01111f85d29fd9350b648a62329dc8d Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 16 Oct 2021 14:40:00 +0200 Subject: [PATCH 071/111] Build shared libs --- recipes/or-tools/build-cpp.sh | 1 + recipes/or-tools/build-python.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/recipes/or-tools/build-cpp.sh b/recipes/or-tools/build-cpp.sh index f263fde50600a..8795ee503cd43 100644 --- a/recipes/or-tools/build-cpp.sh +++ b/recipes/or-tools/build-cpp.sh @@ -3,6 +3,7 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_SHARED_LIBS=ON \ -BUILD_DEPS=OFF \ -DUSE_SCIP=OFF \ -S. \ diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index 33d1e8a161c54..46d85acd91a09 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -3,6 +3,7 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_SHARED_LIBS=ON \ -DBUILD_DEPS=OFF \ -DUSE_SCIP=OFF \ -S. \ From 3825bda029ed0c86485a098bc759e5abc9737a0e Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 16 Oct 2021 14:44:40 +0200 Subject: [PATCH 072/111] Explicitly include dir --- recipes/or-tools/build-python.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index 46d85acd91a09..fd00e63761bbb 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -12,6 +12,8 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DBUILD_EXAMPLES=OFF \ -DBUILD_PYTHON=ON \ -DPython3_EXECUTABLE="$PYTHON" + -DPYTHON_INCLUDE_DIR=$(${PYTHON} -c 'import sysconfig; print(sysconfig.get_paths()["include"])') \ + -DPYTHON_LIBRARY=${PREFIX}/lib \ cmake --build build -j${CPU_COUNT} From 9723cfd41bea18493407560d7fd1eca785f3bf75 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 16 Oct 2021 15:06:24 +0200 Subject: [PATCH 073/111] Try filepath --- recipes/or-tools/build-python.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index fd00e63761bbb..51ac09e9f7791 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -14,6 +14,7 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DPython3_EXECUTABLE="$PYTHON" -DPYTHON_INCLUDE_DIR=$(${PYTHON} -c 'import sysconfig; print(sysconfig.get_paths()["include"])') \ -DPYTHON_LIBRARY=${PREFIX}/lib \ + -DPYTHON_EXECUTABLE:FILEPATH=${PREFIX}/bin/python cmake --build build -j${CPU_COUNT} From a78742354b64c0bb6445d24f1674c03f93503dd6 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 16 Oct 2021 15:32:36 +0200 Subject: [PATCH 074/111] Give more explicit path for python --- recipes/or-tools/build-python.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index 51ac09e9f7791..fc48333e40e41 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -11,10 +11,7 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DBUILD_SAMPLES=OFF \ -DBUILD_EXAMPLES=OFF \ -DBUILD_PYTHON=ON \ - -DPython3_EXECUTABLE="$PYTHON" - -DPYTHON_INCLUDE_DIR=$(${PYTHON} -c 'import sysconfig; print(sysconfig.get_paths()["include"])') \ - -DPYTHON_LIBRARY=${PREFIX}/lib \ - -DPYTHON_EXECUTABLE:FILEPATH=${PREFIX}/bin/python + -DPython3_EXECUTABLE=${PREFIX}/bin/python cmake --build build -j${CPU_COUNT} From 734cb33880a1cd0d0a1a57645f18b970851b674b Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Sat, 16 Oct 2021 15:51:24 +0200 Subject: [PATCH 075/111] Remove brackets --- recipes/or-tools/build-python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index fc48333e40e41..3e10453a13f26 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -11,7 +11,7 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DBUILD_SAMPLES=OFF \ -DBUILD_EXAMPLES=OFF \ -DBUILD_PYTHON=ON \ - -DPython3_EXECUTABLE=${PREFIX}/bin/python + -DPython3_EXECUTABLE=$PREFIX/bin/python cmake --build build -j${CPU_COUNT} From b69e6336521ea8ed0e4df7e81fe2835a4fc31e8f Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 18 Oct 2021 11:46:50 +0200 Subject: [PATCH 076/111] Change back to docs example https://conda-forge.org/docs/maintainer/knowledge_base.html#using-cmake --- recipes/or-tools/build-python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index 3e10453a13f26..46d85acd91a09 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -11,7 +11,7 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DBUILD_SAMPLES=OFF \ -DBUILD_EXAMPLES=OFF \ -DBUILD_PYTHON=ON \ - -DPython3_EXECUTABLE=$PREFIX/bin/python + -DPython3_EXECUTABLE="$PYTHON" cmake --build build -j${CPU_COUNT} From e6c9194bc1345818b1004929a1fa5f5fdd524e7e Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 18 Oct 2021 12:52:58 +0200 Subject: [PATCH 077/111] Remove duplicate deps --- recipes/or-tools/meta.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 386c4016e93f5..a36b441d5541e 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -48,9 +48,6 @@ outputs: - coin-or-cgl 0.60.3 - coin-or-cbc 2.10.5 # Source: https://github.com/google/or-tools/blob/stable/cmake/dependencies/CMakeLists.txt - run: - - coin-or-clp 1.17.4 - - coin-or-utils 2.11.4 run_constrained: - scip =7.0.1 @@ -113,8 +110,6 @@ outputs: - mypy-protobuf - protobuf >=3.18.0 - python >=3.6 - - coin-or-clp 1.17.4 - - coin-or-utils 2.11.4 # Source: https://github.com/google/or-tools/blob/stable/ortools/python/setup.py.in#L44 run_constrained: - scip =7.0.1 From fd3cc597bc6de19ced2caa98efe18bd8e1af2555 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 18 Oct 2021 13:28:43 +0200 Subject: [PATCH 078/111] Add debugging --- recipes/or-tools/build-python.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index 46d85acd91a09..b43da5f3fabc6 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -1,5 +1,7 @@ #!/bin/sh +echo $PREFIX/bin/python -c "import mypy-protobuf; print(mypy-protobuf.__version__)" + cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=lib \ From bdb46cd0a7883e59a3616068336510f0b5414f97 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 18 Oct 2021 15:22:31 +0200 Subject: [PATCH 079/111] Add patch from upstream --- ...ke-Fix-search_python_module-Fix-2814.patch | 71 +++++++++++++++++++ recipes/or-tools/meta.yaml | 1 + 2 files changed, 72 insertions(+) create mode 100644 recipes/or-tools/0003-cmake-Fix-search_python_module-Fix-2814.patch diff --git a/recipes/or-tools/0003-cmake-Fix-search_python_module-Fix-2814.patch b/recipes/or-tools/0003-cmake-Fix-search_python_module-Fix-2814.patch new file mode 100644 index 0000000000000..5cbbe50a9ce1c --- /dev/null +++ b/recipes/or-tools/0003-cmake-Fix-search_python_module-Fix-2814.patch @@ -0,0 +1,71 @@ +From 3bbe33d9776c8f200a3296344e7df7bdf91188fe Mon Sep 17 00:00:00 2001 +From: Mizux Seiha +Date: Tue, 5 Oct 2021 10:40:52 +0200 +Subject: [PATCH] cmake: Fix search_python_module (Fix #2814) + +--- + cmake/python.cmake | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/cmake/python.cmake b/cmake/python.cmake +index a19d2d2ab3..fe8e8d8917 100644 +--- a/cmake/python.cmake ++++ b/cmake/python.cmake +@@ -27,8 +27,8 @@ find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module) + list(APPEND CMAKE_SWIG_FLAGS "-py3" "-DPY3") + + # Find if python module MODULE_NAME is available, +-# if not install it to the Python 3 user install directory. +-function(search_python_module MODULE_NAME) ++# if not install it (PACKAGE_NAME) to the Python3 user install directory. ++function(search_python_module MODULE_NAME PACKAGE_NAME) + execute_process( + COMMAND ${Python3_EXECUTABLE} -c "import ${MODULE_NAME}; print(${MODULE_NAME}.__version__)" + RESULT_VARIABLE _RESULT +@@ -41,7 +41,7 @@ function(search_python_module MODULE_NAME) + else() + message(WARNING "Can't find python module \"${MODULE_NAME}\", install it using pip...") + execute_process( +- COMMAND ${Python3_EXECUTABLE} -m pip install --user ${MODULE_NAME} ++ COMMAND ${Python3_EXECUTABLE} -m pip install --user ${PACKAGE_NAME} + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + endif() +@@ -59,12 +59,12 @@ function(search_python_internal_module MODULE_NAME) + if(${_RESULT} STREQUAL "0") + message(STATUS "Found python internal module: ${MODULE_NAME}") + else() +- message(FATAL_ERROR "Can't find python internal module \"${MODULE_NAME}\", please install it using your system package manger") ++ message(FATAL_ERROR "Can't find python internal module \"${MODULE_NAME}\", please install it using your system package manager") + endif() + endfunction() + + # Generate Protobuf py sources with mypy support +-search_python_module(mypy-protobuf) ++search_python_module(mypy_protobuf mypy-protobuf) + set(PROTO_PYS) + file(GLOB_RECURSE proto_py_files RELATIVE ${PROJECT_SOURCE_DIR} + "ortools/constraint_solver/*.proto" +@@ -157,8 +157,8 @@ configure_file( + COPYONLY) + + # Look for python module wheel +-search_python_module(setuptools) +-search_python_module(wheel) ++search_python_module(setuptools setuptools) ++search_python_module(wheel wheel) + + # Main Target + add_custom_target(python_package ALL +@@ -199,7 +199,7 @@ install(SCRIPT ${PROJECT_BINARY_DIR}/python/python-install.cmake) + # Test + if(BUILD_TESTING) + # Look for python module venv +- search_python_module(absl-py) ++ search_python_module(absl absl-py) + search_python_internal_module(venv) + # Testing using a vitual environment + set(VENV_EXECUTABLE ${Python3_EXECUTABLE} -m venv) +-- +2.30.1 (Apple Git-130) + diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index a36b441d5541e..0718c20f07cc0 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -17,6 +17,7 @@ source: patches: - 0001-Do-not-install-python-deps.patch - 0002-Change-wheel-to-sdist.patch + - 0003-cmake-Fix-search_python_module-Fix-2814.patch # The meta package From fa25b2d91e982acce1546a3c166542bf51a0bc28 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 18 Oct 2021 15:30:24 +0200 Subject: [PATCH 080/111] Combine patches --- .../0001-Do-not-install-python-deps.patch | 28 --------------- ... => 0001-Fail-when-module-not-found.patch} | 36 ++++++++++--------- recipes/or-tools/meta.yaml | 3 +- 3 files changed, 21 insertions(+), 46 deletions(-) delete mode 100644 recipes/or-tools/0001-Do-not-install-python-deps.patch rename recipes/or-tools/{0003-cmake-Fix-search_python_module-Fix-2814.patch => 0001-Fail-when-module-not-found.patch} (67%) diff --git a/recipes/or-tools/0001-Do-not-install-python-deps.patch b/recipes/or-tools/0001-Do-not-install-python-deps.patch deleted file mode 100644 index e5bb087a28b11..0000000000000 --- a/recipes/or-tools/0001-Do-not-install-python-deps.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 41deb6530ee27d19e50e6d6698ee36e972d70f17 Mon Sep 17 00:00:00 2001 -From: BastianZim <10774221+BastianZim@users.noreply.github.com> -Date: Wed, 6 Oct 2021 18:10:22 +0200 -Subject: [PATCH 1/2] Do not install python deps - ---- - cmake/python.cmake | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -diff --git a/cmake/python.cmake b/cmake/python.cmake -index a19d2d2ab3..6db987915d 100644 ---- a/cmake/python.cmake -+++ b/cmake/python.cmake -@@ -39,11 +39,7 @@ function(search_python_module MODULE_NAME) - if(${_RESULT} STREQUAL "0") - message(STATUS "Found python module: ${MODULE_NAME} (found version \"${MODULE_VERSION}\")") - else() -- message(WARNING "Can't find python module \"${MODULE_NAME}\", install it using pip...") -- execute_process( -- COMMAND ${Python3_EXECUTABLE} -m pip install --user ${MODULE_NAME} -- OUTPUT_STRIP_TRAILING_WHITESPACE -- ) -+ message(FATAL_ERROR "Can't find python module \"${MODULE_NAME}\", please install it using your system package manager.") - endif() - endfunction() - --- -2.30.1 (Apple Git-130) diff --git a/recipes/or-tools/0003-cmake-Fix-search_python_module-Fix-2814.patch b/recipes/or-tools/0001-Fail-when-module-not-found.patch similarity index 67% rename from recipes/or-tools/0003-cmake-Fix-search_python_module-Fix-2814.patch rename to recipes/or-tools/0001-Fail-when-module-not-found.patch index 5cbbe50a9ce1c..5005ee083a8f4 100644 --- a/recipes/or-tools/0003-cmake-Fix-search_python_module-Fix-2814.patch +++ b/recipes/or-tools/0001-Fail-when-module-not-found.patch @@ -1,14 +1,14 @@ -From 3bbe33d9776c8f200a3296344e7df7bdf91188fe Mon Sep 17 00:00:00 2001 -From: Mizux Seiha -Date: Tue, 5 Oct 2021 10:40:52 +0200 -Subject: [PATCH] cmake: Fix search_python_module (Fix #2814) +From 0d0670057a079f2aef437dd6061ea75cbdf7e2a0 Mon Sep 17 00:00:00 2001 +From: BastianZim <10774221+BastianZim@users.noreply.github.com> +Date: Mon, 18 Oct 2021 15:28:44 +0200 +Subject: [PATCH] Fail when module not found --- - cmake/python.cmake | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) + cmake/python.cmake | 20 ++++++++------------ + 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/cmake/python.cmake b/cmake/python.cmake -index a19d2d2ab3..fe8e8d8917 100644 +index a19d2d2ab3..8cdaefdf57 100644 --- a/cmake/python.cmake +++ b/cmake/python.cmake @@ -27,8 +27,8 @@ find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module) @@ -22,16 +22,20 @@ index a19d2d2ab3..fe8e8d8917 100644 execute_process( COMMAND ${Python3_EXECUTABLE} -c "import ${MODULE_NAME}; print(${MODULE_NAME}.__version__)" RESULT_VARIABLE _RESULT -@@ -41,7 +41,7 @@ function(search_python_module MODULE_NAME) +@@ -39,11 +39,7 @@ function(search_python_module MODULE_NAME) + if(${_RESULT} STREQUAL "0") + message(STATUS "Found python module: ${MODULE_NAME} (found version \"${MODULE_VERSION}\")") else() - message(WARNING "Can't find python module \"${MODULE_NAME}\", install it using pip...") - execute_process( +- message(WARNING "Can't find python module \"${MODULE_NAME}\", install it using pip...") +- execute_process( - COMMAND ${Python3_EXECUTABLE} -m pip install --user ${MODULE_NAME} -+ COMMAND ${Python3_EXECUTABLE} -m pip install --user ${PACKAGE_NAME} - OUTPUT_STRIP_TRAILING_WHITESPACE - ) +- OUTPUT_STRIP_TRAILING_WHITESPACE +- ) ++ message(FATAL_ERROR "Can't find python module \"${MODULE_NAME}\", please install it using your system package manager.") endif() -@@ -59,12 +59,12 @@ function(search_python_internal_module MODULE_NAME) + endfunction() + +@@ -59,12 +55,12 @@ function(search_python_internal_module MODULE_NAME) if(${_RESULT} STREQUAL "0") message(STATUS "Found python internal module: ${MODULE_NAME}") else() @@ -46,7 +50,7 @@ index a19d2d2ab3..fe8e8d8917 100644 set(PROTO_PYS) file(GLOB_RECURSE proto_py_files RELATIVE ${PROJECT_SOURCE_DIR} "ortools/constraint_solver/*.proto" -@@ -157,8 +157,8 @@ configure_file( +@@ -157,8 +153,8 @@ configure_file( COPYONLY) # Look for python module wheel @@ -57,7 +61,7 @@ index a19d2d2ab3..fe8e8d8917 100644 # Main Target add_custom_target(python_package ALL -@@ -199,7 +199,7 @@ install(SCRIPT ${PROJECT_BINARY_DIR}/python/python-install.cmake) +@@ -199,7 +195,7 @@ install(SCRIPT ${PROJECT_BINARY_DIR}/python/python-install.cmake) # Test if(BUILD_TESTING) # Look for python module venv diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 0718c20f07cc0..348048a0057ed 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -15,9 +15,8 @@ source: url: https://github.com/google/or-tools/archive/v{{ version }}.tar.gz sha256: b51ca3b08f768de5a0c1029f7127264640e50d9c7b83383a175109ef213bd307 patches: - - 0001-Do-not-install-python-deps.patch + - 0001-Fail-when-module-not-found.patch - 0002-Change-wheel-to-sdist.patch - - 0003-cmake-Fix-search_python_module-Fix-2814.patch # The meta package From 53f815bed1af7627e0729d633210c29555846078 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 18 Oct 2021 18:12:09 +0200 Subject: [PATCH 081/111] Update 0001-Fail-when-module-not-found.patch --- .../0001-Fail-when-module-not-found.patch | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/recipes/or-tools/0001-Fail-when-module-not-found.patch b/recipes/or-tools/0001-Fail-when-module-not-found.patch index 5005ee083a8f4..ab990e8458991 100644 --- a/recipes/or-tools/0001-Fail-when-module-not-found.patch +++ b/recipes/or-tools/0001-Fail-when-module-not-found.patch @@ -1,17 +1,17 @@ -From 0d0670057a079f2aef437dd6061ea75cbdf7e2a0 Mon Sep 17 00:00:00 2001 +From a65fc0b934649ef23dc8749c4b8e85b4aeeaf270 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 18 Oct 2021 15:28:44 +0200 Subject: [PATCH] Fail when module not found --- - cmake/python.cmake | 20 ++++++++------------ - 1 file changed, 8 insertions(+), 12 deletions(-) + cmake/python.cmake | 22 +++++++++------------- + 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/cmake/python.cmake b/cmake/python.cmake -index a19d2d2ab3..8cdaefdf57 100644 +index a19d2d2ab3..65619fcc7a 100644 --- a/cmake/python.cmake +++ b/cmake/python.cmake -@@ -27,8 +27,8 @@ find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module) +@@ -27,10 +27,10 @@ find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module) list(APPEND CMAKE_SWIG_FLAGS "-py3" "-DPY3") # Find if python module MODULE_NAME is available, @@ -20,8 +20,11 @@ index a19d2d2ab3..8cdaefdf57 100644 +# if not install it (PACKAGE_NAME) to the Python3 user install directory. +function(search_python_module MODULE_NAME PACKAGE_NAME) execute_process( - COMMAND ${Python3_EXECUTABLE} -c "import ${MODULE_NAME}; print(${MODULE_NAME}.__version__)" +- COMMAND ${Python3_EXECUTABLE} -c "import ${MODULE_NAME}; print(${MODULE_NAME}.__version__)" ++ COMMAND ${Python3_EXECUTABLE} -c "import ${MODULE_NAME}; print(${MODULE_NAME}.__package__)" RESULT_VARIABLE _RESULT + OUTPUT_VARIABLE MODULE_VERSION + ERROR_QUIET @@ -39,11 +39,7 @@ function(search_python_module MODULE_NAME) if(${_RESULT} STREQUAL "0") message(STATUS "Found python module: ${MODULE_NAME} (found version \"${MODULE_VERSION}\")") From 258ab9b45fc37f71fbb4442caa9c78a3fc0e343b Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 18 Oct 2021 20:40:28 +0200 Subject: [PATCH 082/111] Do not install deps --- recipes/or-tools/build-python.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index b43da5f3fabc6..bf87036005aee 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -1,7 +1,5 @@ #!/bin/sh -echo $PREFIX/bin/python -c "import mypy-protobuf; print(mypy-protobuf.__version__)" - cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=lib \ @@ -17,5 +15,5 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ cmake --build build -j${CPU_COUNT} -${PYTHON} -m pip install . -vv +${PYTHON} -m pip install . --no-deps -vv From 8701dda940e145fdedd595d26706a8d4bea36440 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 18 Oct 2021 21:16:47 +0200 Subject: [PATCH 083/111] Use build --- recipes/or-tools/build-python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index bf87036005aee..17f5136382e8e 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -15,5 +15,5 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ cmake --build build -j${CPU_COUNT} -${PYTHON} -m pip install . --no-deps -vv +${PYTHON} -m pip install build --no-deps -vv From 1da09509543c7f8c78e0129ccef5cd8586abfd1d Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 18 Oct 2021 21:17:42 +0200 Subject: [PATCH 084/111] Move wheel to host --- recipes/or-tools/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 348048a0057ed..052c84f0298fc 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -90,7 +90,6 @@ outputs: - pkg-config - setuptools - swig >=4.0 - - wheel host: - abseil-cpp =20210324.2 - absl-py >=0.13 @@ -98,6 +97,7 @@ outputs: - mypy-protobuf - pip >=9.0.1 - python >=3.6 + - wheel - zlib 1.2.11 # coin or deps - coin-or-utils 2.11.4 From 4cd3e37a517e823a1d360f2d638ecc174ec653bc Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 18 Oct 2021 21:32:08 +0200 Subject: [PATCH 085/111] Just compile for now --- recipes/or-tools/build-python.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index 17f5136382e8e..3f81a1e214819 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -14,6 +14,3 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DPython3_EXECUTABLE="$PYTHON" cmake --build build -j${CPU_COUNT} - -${PYTHON} -m pip install build --no-deps -vv - From d5e6a3bc7cc3a55c0c9e88ea362e1f649b486705 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 18 Oct 2021 22:08:01 +0200 Subject: [PATCH 086/111] Use custom install --- recipes/or-tools/0003-Don-t-install.patch | 30 +++++++++++++++++++++++ recipes/or-tools/build-python.sh | 2 ++ recipes/or-tools/meta.yaml | 1 + 3 files changed, 33 insertions(+) create mode 100644 recipes/or-tools/0003-Don-t-install.patch diff --git a/recipes/or-tools/0003-Don-t-install.patch b/recipes/or-tools/0003-Don-t-install.patch new file mode 100644 index 0000000000000..92630898ddbe5 --- /dev/null +++ b/recipes/or-tools/0003-Don-t-install.patch @@ -0,0 +1,30 @@ +From e97676e2d865d6454a088c3556d9434c98e56e5c Mon Sep 17 00:00:00 2001 +From: BastianZim <10774221+BastianZim@users.noreply.github.com> +Date: Mon, 18 Oct 2021 22:00:20 +0200 +Subject: [PATCH] Don't install + +--- + cmake/python.cmake | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/cmake/python.cmake b/cmake/python.cmake +index a19d2d2ab3..feac574fee 100644 +--- a/cmake/python.cmake ++++ b/cmake/python.cmake +@@ -189,13 +189,6 @@ add_custom_target(python_package ALL + ) + add_dependencies(python_package ortools::ortools Py${PROJECT_NAME}_proto) + +-# Install rules +-configure_file( +- ${PROJECT_SOURCE_DIR}/cmake/python-install.cmake.in +- ${PROJECT_BINARY_DIR}/python/python-install.cmake +- @ONLY) +-install(SCRIPT ${PROJECT_BINARY_DIR}/python/python-install.cmake) +- + # Test + if(BUILD_TESTING) + # Look for python module venv +-- +2.33.0 + diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index 3f81a1e214819..f81e4c5ae2246 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -14,3 +14,5 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DPython3_EXECUTABLE="$PYTHON" cmake --build build -j${CPU_COUNT} + +${PYTHON} -m pip install --no-deps -vv --find-links=${CMAKE_CURRENT_BINARY_DIR}/python/dist ${PROJECT_NAME} diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 052c84f0298fc..f553dd428356e 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -17,6 +17,7 @@ source: patches: - 0001-Fail-when-module-not-found.patch - 0002-Change-wheel-to-sdist.patch + - 0003-Don-t-install.patch # The meta package From 43760b448a6710163aff1c67e19f430e45dc1206 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 19 Oct 2021 14:21:18 +0200 Subject: [PATCH 087/111] Change patch --- .../0001-Fail-when-module-not-found.patch | 78 ------------------- .../or-tools/0002-Change-wheel-to-sdist.patch | 25 ------ recipes/or-tools/0003-Don-t-install.patch | 30 ------- recipes/or-tools/meta.yaml | 4 +- 4 files changed, 1 insertion(+), 136 deletions(-) delete mode 100644 recipes/or-tools/0001-Fail-when-module-not-found.patch delete mode 100644 recipes/or-tools/0002-Change-wheel-to-sdist.patch delete mode 100644 recipes/or-tools/0003-Don-t-install.patch diff --git a/recipes/or-tools/0001-Fail-when-module-not-found.patch b/recipes/or-tools/0001-Fail-when-module-not-found.patch deleted file mode 100644 index ab990e8458991..0000000000000 --- a/recipes/or-tools/0001-Fail-when-module-not-found.patch +++ /dev/null @@ -1,78 +0,0 @@ -From a65fc0b934649ef23dc8749c4b8e85b4aeeaf270 Mon Sep 17 00:00:00 2001 -From: BastianZim <10774221+BastianZim@users.noreply.github.com> -Date: Mon, 18 Oct 2021 15:28:44 +0200 -Subject: [PATCH] Fail when module not found - ---- - cmake/python.cmake | 22 +++++++++------------- - 1 file changed, 9 insertions(+), 13 deletions(-) - -diff --git a/cmake/python.cmake b/cmake/python.cmake -index a19d2d2ab3..65619fcc7a 100644 ---- a/cmake/python.cmake -+++ b/cmake/python.cmake -@@ -27,10 +27,10 @@ find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module) - list(APPEND CMAKE_SWIG_FLAGS "-py3" "-DPY3") - - # Find if python module MODULE_NAME is available, --# if not install it to the Python 3 user install directory. --function(search_python_module MODULE_NAME) -+# if not install it (PACKAGE_NAME) to the Python3 user install directory. -+function(search_python_module MODULE_NAME PACKAGE_NAME) - execute_process( -- COMMAND ${Python3_EXECUTABLE} -c "import ${MODULE_NAME}; print(${MODULE_NAME}.__version__)" -+ COMMAND ${Python3_EXECUTABLE} -c "import ${MODULE_NAME}; print(${MODULE_NAME}.__package__)" - RESULT_VARIABLE _RESULT - OUTPUT_VARIABLE MODULE_VERSION - ERROR_QUIET -@@ -39,11 +39,7 @@ function(search_python_module MODULE_NAME) - if(${_RESULT} STREQUAL "0") - message(STATUS "Found python module: ${MODULE_NAME} (found version \"${MODULE_VERSION}\")") - else() -- message(WARNING "Can't find python module \"${MODULE_NAME}\", install it using pip...") -- execute_process( -- COMMAND ${Python3_EXECUTABLE} -m pip install --user ${MODULE_NAME} -- OUTPUT_STRIP_TRAILING_WHITESPACE -- ) -+ message(FATAL_ERROR "Can't find python module \"${MODULE_NAME}\", please install it using your system package manager.") - endif() - endfunction() - -@@ -59,12 +55,12 @@ function(search_python_internal_module MODULE_NAME) - if(${_RESULT} STREQUAL "0") - message(STATUS "Found python internal module: ${MODULE_NAME}") - else() -- message(FATAL_ERROR "Can't find python internal module \"${MODULE_NAME}\", please install it using your system package manger") -+ message(FATAL_ERROR "Can't find python internal module \"${MODULE_NAME}\", please install it using your system package manager") - endif() - endfunction() - - # Generate Protobuf py sources with mypy support --search_python_module(mypy-protobuf) -+search_python_module(mypy_protobuf mypy-protobuf) - set(PROTO_PYS) - file(GLOB_RECURSE proto_py_files RELATIVE ${PROJECT_SOURCE_DIR} - "ortools/constraint_solver/*.proto" -@@ -157,8 +153,8 @@ configure_file( - COPYONLY) - - # Look for python module wheel --search_python_module(setuptools) --search_python_module(wheel) -+search_python_module(setuptools setuptools) -+search_python_module(wheel wheel) - - # Main Target - add_custom_target(python_package ALL -@@ -199,7 +195,7 @@ install(SCRIPT ${PROJECT_BINARY_DIR}/python/python-install.cmake) - # Test - if(BUILD_TESTING) - # Look for python module venv -- search_python_module(absl-py) -+ search_python_module(absl absl-py) - search_python_internal_module(venv) - # Testing using a vitual environment - set(VENV_EXECUTABLE ${Python3_EXECUTABLE} -m venv) --- -2.30.1 (Apple Git-130) - diff --git a/recipes/or-tools/0002-Change-wheel-to-sdist.patch b/recipes/or-tools/0002-Change-wheel-to-sdist.patch deleted file mode 100644 index 73ea9236c47c3..0000000000000 --- a/recipes/or-tools/0002-Change-wheel-to-sdist.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 8e3e8021dfe79157d719418c04b5ed8120f3af18 Mon Sep 17 00:00:00 2001 -From: BastianZim <10774221+BastianZim@users.noreply.github.com> -Date: Wed, 6 Oct 2021 21:09:59 +0200 -Subject: [PATCH 2/2] Change wheel to sdist - ---- - cmake/python.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cmake/python.cmake b/cmake/python.cmake -index a19d2d2ab3..669212dd05 100644 ---- a/cmake/python.cmake -+++ b/cmake/python.cmake -@@ -178,7 +178,7 @@ add_custom_target(python_package ALL - COMMAND ${CMAKE_COMMAND} -E copy $ ${PYTHON_PROJECT}/scheduling - COMMAND ${CMAKE_COMMAND} -E copy $ ${PYTHON_PROJECT}/util - #COMMAND ${Python3_EXECUTABLE} setup.py bdist_egg bdist_wheel -- COMMAND ${Python3_EXECUTABLE} setup.py bdist_wheel -+ COMMAND ${Python3_EXECUTABLE} setup.py sdist - BYPRODUCTS - python/${PYTHON_PROJECT} - python/build --- -2.33.0 - diff --git a/recipes/or-tools/0003-Don-t-install.patch b/recipes/or-tools/0003-Don-t-install.patch deleted file mode 100644 index 92630898ddbe5..0000000000000 --- a/recipes/or-tools/0003-Don-t-install.patch +++ /dev/null @@ -1,30 +0,0 @@ -From e97676e2d865d6454a088c3556d9434c98e56e5c Mon Sep 17 00:00:00 2001 -From: BastianZim <10774221+BastianZim@users.noreply.github.com> -Date: Mon, 18 Oct 2021 22:00:20 +0200 -Subject: [PATCH] Don't install - ---- - cmake/python.cmake | 7 ------- - 1 file changed, 7 deletions(-) - -diff --git a/cmake/python.cmake b/cmake/python.cmake -index a19d2d2ab3..feac574fee 100644 ---- a/cmake/python.cmake -+++ b/cmake/python.cmake -@@ -189,13 +189,6 @@ add_custom_target(python_package ALL - ) - add_dependencies(python_package ortools::ortools Py${PROJECT_NAME}_proto) - --# Install rules --configure_file( -- ${PROJECT_SOURCE_DIR}/cmake/python-install.cmake.in -- ${PROJECT_BINARY_DIR}/python/python-install.cmake -- @ONLY) --install(SCRIPT ${PROJECT_BINARY_DIR}/python/python-install.cmake) -- - # Test - if(BUILD_TESTING) - # Look for python module venv --- -2.33.0 - diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index f553dd428356e..b4b3dcbef05e9 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -15,9 +15,7 @@ source: url: https://github.com/google/or-tools/archive/v{{ version }}.tar.gz sha256: b51ca3b08f768de5a0c1029f7127264640e50d9c7b83383a175109ef213bd307 patches: - - 0001-Fail-when-module-not-found.patch - - 0002-Change-wheel-to-sdist.patch - - 0003-Don-t-install.patch + - 0001-Unified-patch.patch # The meta package From e0ad72ef50a857a966f43339fa5e987b10ed6bad Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 19 Oct 2021 14:28:32 +0200 Subject: [PATCH 088/111] Create 0001-Unified-patch.patch --- recipes/or-tools/0001-Unified-patch.patch | 81 +++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 recipes/or-tools/0001-Unified-patch.patch diff --git a/recipes/or-tools/0001-Unified-patch.patch b/recipes/or-tools/0001-Unified-patch.patch new file mode 100644 index 0000000000000..39c2665b669bb --- /dev/null +++ b/recipes/or-tools/0001-Unified-patch.patch @@ -0,0 +1,81 @@ +From 228f50663b7c42e96047e3b790d964027cadd667 Mon Sep 17 00:00:00 2001 +From: BastianZim <10774221+BastianZim@users.noreply.github.com> +Date: Tue, 19 Oct 2021 14:19:42 +0200 +Subject: [PATCH] Unified patch + +--- + cmake/python.cmake | 22 +++++++++------------- + 1 file changed, 9 insertions(+), 13 deletions(-) + +diff --git a/cmake/python.cmake b/cmake/python.cmake +index a19d2d2ab3..b6cb7517ab 100644 +--- a/cmake/python.cmake ++++ b/cmake/python.cmake +@@ -27,10 +27,10 @@ find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module) + list(APPEND CMAKE_SWIG_FLAGS "-py3" "-DPY3") + + # Find if python module MODULE_NAME is available, +-# if not install it to the Python 3 user install directory. +-function(search_python_module MODULE_NAME) ++# if not install it (PACKAGE_NAME) to the Python3 user install directory. ++function(search_python_module MODULE_NAME PACKAGE_NAME) + execute_process( +- COMMAND ${Python3_EXECUTABLE} -c "import ${MODULE_NAME}; print(${MODULE_NAME}.__version__)" ++ COMMAND ${Python3_EXECUTABLE} -c "import ${MODULE_NAME}; print(${MODULE_NAME}.__package__)" + RESULT_VARIABLE _RESULT + OUTPUT_VARIABLE MODULE_VERSION + ERROR_QUIET +@@ -39,11 +39,7 @@ function(search_python_module MODULE_NAME) + if(${_RESULT} STREQUAL "0") + message(STATUS "Found python module: ${MODULE_NAME} (found version \"${MODULE_VERSION}\")") + else() +- message(WARNING "Can't find python module \"${MODULE_NAME}\", install it using pip...") +- execute_process( +- COMMAND ${Python3_EXECUTABLE} -m pip install --user ${MODULE_NAME} +- OUTPUT_STRIP_TRAILING_WHITESPACE +- ) ++ message(FATAL_ERROR "Can't find python module \"${MODULE_NAME}\", please install it using your system package manager.") + endif() + endfunction() + +@@ -64,7 +60,7 @@ function(search_python_internal_module MODULE_NAME) + endfunction() + + # Generate Protobuf py sources with mypy support +-search_python_module(mypy-protobuf) ++search_python_module(mypy_protobuf mypy-protobuf) + set(PROTO_PYS) + file(GLOB_RECURSE proto_py_files RELATIVE ${PROJECT_SOURCE_DIR} + "ortools/constraint_solver/*.proto" +@@ -157,8 +153,8 @@ configure_file( + COPYONLY) + + # Look for python module wheel +-search_python_module(setuptools) +-search_python_module(wheel) ++search_python_module(setuptools setuptools) ++search_python_module(wheel wheel) + + # Main Target + add_custom_target(python_package ALL +@@ -178,7 +174,7 @@ add_custom_target(python_package ALL + COMMAND ${CMAKE_COMMAND} -E copy $ ${PYTHON_PROJECT}/scheduling + COMMAND ${CMAKE_COMMAND} -E copy $ ${PYTHON_PROJECT}/util + #COMMAND ${Python3_EXECUTABLE} setup.py bdist_egg bdist_wheel +- COMMAND ${Python3_EXECUTABLE} setup.py bdist_wheel ++ COMMAND ${Python3_EXECUTABLE} setup.py develop sdist --no-deps + BYPRODUCTS + python/${PYTHON_PROJECT} + python/build +@@ -199,7 +195,7 @@ install(SCRIPT ${PROJECT_BINARY_DIR}/python/python-install.cmake) + # Test + if(BUILD_TESTING) + # Look for python module venv +- search_python_module(absl-py) ++ search_python_module(absl absl-py) + search_python_internal_module(venv) + # Testing using a vitual environment + set(VENV_EXECUTABLE ${Python3_EXECUTABLE} -m venv) +-- +2.30.1 (Apple Git-130) + From 5f2dec6c12d72fc8eb2423653f8ebd5dacbf955b Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 19 Oct 2021 14:50:12 +0200 Subject: [PATCH 089/111] Remove no deps --- recipes/or-tools/0001-Unified-patch.patch | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/recipes/or-tools/0001-Unified-patch.patch b/recipes/or-tools/0001-Unified-patch.patch index 39c2665b669bb..a467229cea3ae 100644 --- a/recipes/or-tools/0001-Unified-patch.patch +++ b/recipes/or-tools/0001-Unified-patch.patch @@ -13,7 +13,7 @@ index a19d2d2ab3..b6cb7517ab 100644 +++ b/cmake/python.cmake @@ -27,10 +27,10 @@ find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module) list(APPEND CMAKE_SWIG_FLAGS "-py3" "-DPY3") - + # Find if python module MODULE_NAME is available, -# if not install it to the Python 3 user install directory. -function(search_python_module MODULE_NAME) @@ -37,10 +37,10 @@ index a19d2d2ab3..b6cb7517ab 100644 + message(FATAL_ERROR "Can't find python module \"${MODULE_NAME}\", please install it using your system package manager.") endif() endfunction() - + @@ -64,7 +60,7 @@ function(search_python_internal_module MODULE_NAME) endfunction() - + # Generate Protobuf py sources with mypy support -search_python_module(mypy-protobuf) +search_python_module(mypy_protobuf mypy-protobuf) @@ -49,13 +49,13 @@ index a19d2d2ab3..b6cb7517ab 100644 "ortools/constraint_solver/*.proto" @@ -157,8 +153,8 @@ configure_file( COPYONLY) - + # Look for python module wheel -search_python_module(setuptools) -search_python_module(wheel) +search_python_module(setuptools setuptools) +search_python_module(wheel wheel) - + # Main Target add_custom_target(python_package ALL @@ -178,7 +174,7 @@ add_custom_target(python_package ALL @@ -63,7 +63,7 @@ index a19d2d2ab3..b6cb7517ab 100644 COMMAND ${CMAKE_COMMAND} -E copy $ ${PYTHON_PROJECT}/util #COMMAND ${Python3_EXECUTABLE} setup.py bdist_egg bdist_wheel - COMMAND ${Python3_EXECUTABLE} setup.py bdist_wheel -+ COMMAND ${Python3_EXECUTABLE} setup.py develop sdist --no-deps ++ COMMAND ${Python3_EXECUTABLE} setup.py sdist BYPRODUCTS python/${PYTHON_PROJECT} python/build @@ -76,6 +76,5 @@ index a19d2d2ab3..b6cb7517ab 100644 search_python_internal_module(venv) # Testing using a vitual environment set(VENV_EXECUTABLE ${Python3_EXECUTABLE} -m venv) --- +-- 2.30.1 (Apple Git-130) - From 44b3e7df7b2830320695b8f669f3f57baa0e24b5 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 19 Oct 2021 15:21:08 +0200 Subject: [PATCH 090/111] Change patch --- recipes/or-tools/0001-Unified-patch.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/0001-Unified-patch.patch b/recipes/or-tools/0001-Unified-patch.patch index a467229cea3ae..fdc39d54cf8e0 100644 --- a/recipes/or-tools/0001-Unified-patch.patch +++ b/recipes/or-tools/0001-Unified-patch.patch @@ -63,7 +63,7 @@ index a19d2d2ab3..b6cb7517ab 100644 COMMAND ${CMAKE_COMMAND} -E copy $ ${PYTHON_PROJECT}/util #COMMAND ${Python3_EXECUTABLE} setup.py bdist_egg bdist_wheel - COMMAND ${Python3_EXECUTABLE} setup.py bdist_wheel -+ COMMAND ${Python3_EXECUTABLE} setup.py sdist ++ COMMAND ${Python3_EXECUTABLE} setup.py bdist_wheel BYPRODUCTS python/${PYTHON_PROJECT} python/build From 855cb0b2820810b7ec8cbbb0ff04d8933a0fe683 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 19 Oct 2021 16:09:49 +0200 Subject: [PATCH 091/111] Change dir --- recipes/or-tools/build-python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index f81e4c5ae2246..abbca42308787 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -15,4 +15,4 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ cmake --build build -j${CPU_COUNT} -${PYTHON} -m pip install --no-deps -vv --find-links=${CMAKE_CURRENT_BINARY_DIR}/python/dist ${PROJECT_NAME} +${PYTHON} -m pip install --no-deps -vv python From 8fbb4b811995d3973bf8db67c00558f0631929fe Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 19 Oct 2021 16:36:50 +0200 Subject: [PATCH 092/111] Change pip --- recipes/or-tools/build-python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index abbca42308787..0b40c1ce061ff 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -15,4 +15,4 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ cmake --build build -j${CPU_COUNT} -${PYTHON} -m pip install --no-deps -vv python +{{ PYTHON }} -m pip install python -vv From d3e40d25731a1e3d4fd1bddc6264ce7656120bba Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 19 Oct 2021 17:19:42 +0200 Subject: [PATCH 093/111] Find links --- recipes/or-tools/build-python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index 0b40c1ce061ff..991683d49b669 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -15,4 +15,4 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ cmake --build build -j${CPU_COUNT} -{{ PYTHON }} -m pip install python -vv +{{ PYTHON }} -m pip install --find-links=dist ortools -vv From f4226630a67cd4b976131bee844d846aa21d5191 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 19 Oct 2021 17:34:41 +0200 Subject: [PATCH 094/111] Do not install deps --- recipes/or-tools/0002-Remove-deps.patch | 28 +++++++++++++++++++++++++ recipes/or-tools/meta.yaml | 1 + 2 files changed, 29 insertions(+) create mode 100644 recipes/or-tools/0002-Remove-deps.patch diff --git a/recipes/or-tools/0002-Remove-deps.patch b/recipes/or-tools/0002-Remove-deps.patch new file mode 100644 index 0000000000000..63294a1aefd7f --- /dev/null +++ b/recipes/or-tools/0002-Remove-deps.patch @@ -0,0 +1,28 @@ +From acd149fa4e96058c140f1568ca9cfd3f1b648e64 Mon Sep 17 00:00:00 2001 +From: BastianZim <10774221+BastianZim@users.noreply.github.com> +Date: Tue, 19 Oct 2021 17:22:17 +0200 +Subject: [PATCH] Remove deps + +Since setup.py has no --no-deps flag this should take care of it. +--- + ortools/python/setup.py.in | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/ortools/python/setup.py.in b/ortools/python/setup.py.in +index 8e5bf834d9..0cb915dc1f 100644 +--- a/ortools/python/setup.py.in ++++ b/ortools/python/setup.py.in +@@ -41,10 +41,6 @@ setup( + name='@PROJECT_NAME@', + version='@PROJECT_VERSION@', + packages=find_packages(), +- install_requires=[ +- 'protobuf >= 3.18.0', +- 'absl-py >= 0.13', +- ], + package_data={ + '@PROJECT_NAME@':[$<$,SHARED_LIBRARY>:'.libs/*', '../$'>], + '@PROJECT_NAME@.init':['$'], +-- +2.30.1 (Apple Git-130) + diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index b4b3dcbef05e9..6182a805d1d26 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -16,6 +16,7 @@ source: sha256: b51ca3b08f768de5a0c1029f7127264640e50d9c7b83383a175109ef213bd307 patches: - 0001-Unified-patch.patch + - 0002-Remove-deps.patch # The meta package From aa37fe35464706829787d48f401f88ff754e9de6 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 19 Oct 2021 17:39:55 +0200 Subject: [PATCH 095/111] Update dir --- recipes/or-tools/build-python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index 991683d49b669..c58eb2c07d20a 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -15,4 +15,4 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ cmake --build build -j${CPU_COUNT} -{{ PYTHON }} -m pip install --find-links=dist ortools -vv +{{ PYTHON }} -m pip install --find-links=dist build/python/dist -vv From 4465ca2295567237e63aed3a1057ef296b377cf2 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 19 Oct 2021 17:41:53 +0200 Subject: [PATCH 096/111] Change links --- recipes/or-tools/build-python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index c58eb2c07d20a..9ed884a76eb15 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -15,4 +15,4 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ cmake --build build -j${CPU_COUNT} -{{ PYTHON }} -m pip install --find-links=dist build/python/dist -vv +{{ PYTHON }} -m pip install --find-links=build/python/dist ortools -vv From 4bc500c12c503819f16b98e455748f0d47c5c779 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 19 Oct 2021 18:06:06 +0200 Subject: [PATCH 097/111] Use correct variable --- recipes/or-tools/build-python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index 9ed884a76eb15..cc7c1bd1af7c6 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -15,4 +15,4 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ cmake --build build -j${CPU_COUNT} -{{ PYTHON }} -m pip install --find-links=build/python/dist ortools -vv +${PYTHON} -m pip install --find-links=build/python/dist ortools -vv From 99e7ad9859f63f0b010c9f0913761cc7e3ba7d4c Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 19 Oct 2021 18:57:57 +0200 Subject: [PATCH 098/111] Try sdist --- recipes/or-tools/0001-Unified-patch.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/0001-Unified-patch.patch b/recipes/or-tools/0001-Unified-patch.patch index fdc39d54cf8e0..a467229cea3ae 100644 --- a/recipes/or-tools/0001-Unified-patch.patch +++ b/recipes/or-tools/0001-Unified-patch.patch @@ -63,7 +63,7 @@ index a19d2d2ab3..b6cb7517ab 100644 COMMAND ${CMAKE_COMMAND} -E copy $ ${PYTHON_PROJECT}/util #COMMAND ${Python3_EXECUTABLE} setup.py bdist_egg bdist_wheel - COMMAND ${Python3_EXECUTABLE} setup.py bdist_wheel -+ COMMAND ${Python3_EXECUTABLE} setup.py bdist_wheel ++ COMMAND ${Python3_EXECUTABLE} setup.py sdist BYPRODUCTS python/${PYTHON_PROJECT} python/build From 39602658be59bddd68af23b5f4a1e7cab86f4044 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 19 Oct 2021 19:23:09 +0200 Subject: [PATCH 099/111] Add python test --- recipes/or-tools/meta.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 6182a805d1d26..82b7686c36416 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -120,8 +120,11 @@ outputs: - ortools.linear_solver.pywraplp commands: - pip check + - ${PYTHON} cmake/samples/python/sample.py requires: - pip + source_files: + - cmake/samples/python/sample.py about: home: {{ home }} From a8c2e542e8d177e84122af8cd54b325fd0e8f820 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 19 Oct 2021 19:23:54 +0200 Subject: [PATCH 100/111] Build wheel again --- recipes/or-tools/0001-Unified-patch.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/0001-Unified-patch.patch b/recipes/or-tools/0001-Unified-patch.patch index a467229cea3ae..fdc39d54cf8e0 100644 --- a/recipes/or-tools/0001-Unified-patch.patch +++ b/recipes/or-tools/0001-Unified-patch.patch @@ -63,7 +63,7 @@ index a19d2d2ab3..b6cb7517ab 100644 COMMAND ${CMAKE_COMMAND} -E copy $ ${PYTHON_PROJECT}/util #COMMAND ${Python3_EXECUTABLE} setup.py bdist_egg bdist_wheel - COMMAND ${Python3_EXECUTABLE} setup.py bdist_wheel -+ COMMAND ${Python3_EXECUTABLE} setup.py sdist ++ COMMAND ${Python3_EXECUTABLE} setup.py bdist_wheel BYPRODUCTS python/${PYTHON_PROJECT} python/build From a818b2039137d269a49959344cf0d3bcffb9a12e Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 19 Oct 2021 20:01:25 +0200 Subject: [PATCH 101/111] Clean up patches --- ...=> 0001-Fix-import-and-fail-install.patch} | 25 +++++++------------ ...=> 0002-Do-not-install-dependencies.patch} | 9 +++---- recipes/or-tools/meta.yaml | 4 +-- 3 files changed, 15 insertions(+), 23 deletions(-) rename recipes/or-tools/{0001-Unified-patch.patch => 0001-Fix-import-and-fail-install.patch} (76%) rename recipes/or-tools/{0002-Remove-deps.patch => 0002-Do-not-install-dependencies.patch} (77%) diff --git a/recipes/or-tools/0001-Unified-patch.patch b/recipes/or-tools/0001-Fix-import-and-fail-install.patch similarity index 76% rename from recipes/or-tools/0001-Unified-patch.patch rename to recipes/or-tools/0001-Fix-import-and-fail-install.patch index fdc39d54cf8e0..f6434b5f57f35 100644 --- a/recipes/or-tools/0001-Unified-patch.patch +++ b/recipes/or-tools/0001-Fix-import-and-fail-install.patch @@ -1,14 +1,16 @@ -From 228f50663b7c42e96047e3b790d964027cadd667 Mon Sep 17 00:00:00 2001 +From 2a87f77dcd5a6e4b8bfae3225737548ba69fafcc Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> -Date: Tue, 19 Oct 2021 14:19:42 +0200 -Subject: [PATCH] Unified patch +Date: Tue, 19 Oct 2021 19:55:59 +0200 +Subject: [PATCH 1/2] Fix import and fail install +1) Fix the import until upstream releases a new version. +2) Do not install dependencies if not available. --- - cmake/python.cmake | 22 +++++++++------------- - 1 file changed, 9 insertions(+), 13 deletions(-) + cmake/python.cmake | 20 ++++++++------------ + 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/cmake/python.cmake b/cmake/python.cmake -index a19d2d2ab3..b6cb7517ab 100644 +index a19d2d2ab3..5c77a60669 100644 --- a/cmake/python.cmake +++ b/cmake/python.cmake @@ -27,10 +27,10 @@ find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module) @@ -58,15 +60,6 @@ index a19d2d2ab3..b6cb7517ab 100644 # Main Target add_custom_target(python_package ALL -@@ -178,7 +174,7 @@ add_custom_target(python_package ALL - COMMAND ${CMAKE_COMMAND} -E copy $ ${PYTHON_PROJECT}/scheduling - COMMAND ${CMAKE_COMMAND} -E copy $ ${PYTHON_PROJECT}/util - #COMMAND ${Python3_EXECUTABLE} setup.py bdist_egg bdist_wheel -- COMMAND ${Python3_EXECUTABLE} setup.py bdist_wheel -+ COMMAND ${Python3_EXECUTABLE} setup.py bdist_wheel - BYPRODUCTS - python/${PYTHON_PROJECT} - python/build @@ -199,7 +195,7 @@ install(SCRIPT ${PROJECT_BINARY_DIR}/python/python-install.cmake) # Test if(BUILD_TESTING) @@ -77,4 +70,4 @@ index a19d2d2ab3..b6cb7517ab 100644 # Testing using a vitual environment set(VENV_EXECUTABLE ${Python3_EXECUTABLE} -m venv) -- -2.30.1 (Apple Git-130) +2.33.0 diff --git a/recipes/or-tools/0002-Remove-deps.patch b/recipes/or-tools/0002-Do-not-install-dependencies.patch similarity index 77% rename from recipes/or-tools/0002-Remove-deps.patch rename to recipes/or-tools/0002-Do-not-install-dependencies.patch index 63294a1aefd7f..df55891216529 100644 --- a/recipes/or-tools/0002-Remove-deps.patch +++ b/recipes/or-tools/0002-Do-not-install-dependencies.patch @@ -1,9 +1,8 @@ -From acd149fa4e96058c140f1568ca9cfd3f1b648e64 Mon Sep 17 00:00:00 2001 +From 825c7460902c62a51f585d06d6a11a8bf2420370 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> -Date: Tue, 19 Oct 2021 17:22:17 +0200 -Subject: [PATCH] Remove deps +Date: Tue, 19 Oct 2021 19:57:42 +0200 +Subject: [PATCH 2/2] Do not install dependencies -Since setup.py has no --no-deps flag this should take care of it. --- ortools/python/setup.py.in | 4 ---- 1 file changed, 4 deletions(-) @@ -24,5 +23,5 @@ index 8e5bf834d9..0cb915dc1f 100644 '@PROJECT_NAME@':[$<$,SHARED_LIBRARY>:'.libs/*', '../$'>], '@PROJECT_NAME@.init':['$'], -- -2.30.1 (Apple Git-130) +2.33.0 diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 82b7686c36416..3d25627bb8f0f 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -15,8 +15,8 @@ source: url: https://github.com/google/or-tools/archive/v{{ version }}.tar.gz sha256: b51ca3b08f768de5a0c1029f7127264640e50d9c7b83383a175109ef213bd307 patches: - - 0001-Unified-patch.patch - - 0002-Remove-deps.patch + - 0001-Fix-import-and-fail-install.patch + - 0002-Do-not-install-dependencies.patch # The meta package From 1e65b5dff7d3e8f2b5a7be2b9af54f4d9b0c1f20 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 19 Oct 2021 20:03:57 +0200 Subject: [PATCH 102/111] Clean up deps --- recipes/or-tools/meta.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 3d25627bb8f0f..1444a3cfe2261 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -94,7 +94,6 @@ outputs: - abseil-cpp =20210324.2 - absl-py >=0.13 - libprotobuf =3.18.0 - - mypy-protobuf - pip >=9.0.1 - python >=3.6 - wheel @@ -107,7 +106,6 @@ outputs: - coin-or-cbc 2.10.5 run: - absl-py >=0.13 - - mypy-protobuf - protobuf >=3.18.0 - python >=3.6 # Source: https://github.com/google/or-tools/blob/stable/ortools/python/setup.py.in#L44 From 1824f0766d457933262ae1e0c56c8885b866b4c0 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 19 Oct 2021 20:25:47 +0200 Subject: [PATCH 103/111] Move mypy --- recipes/or-tools/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 1444a3cfe2261..2d57c3d2c24d0 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -86,7 +86,6 @@ outputs: - {{ compiler('cxx') }} - cmake >=3.18 - git - - mypy-protobuf - pkg-config - setuptools - swig >=4.0 @@ -94,6 +93,7 @@ outputs: - abseil-cpp =20210324.2 - absl-py >=0.13 - libprotobuf =3.18.0 + - mypy-protobuf - pip >=9.0.1 - python >=3.6 - wheel From 59759fdeacd66e9eb7526c264e473df64752b7dd Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Tue, 19 Oct 2021 20:48:56 +0200 Subject: [PATCH 104/111] Move mypy-protobuf back --- recipes/or-tools/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 2d57c3d2c24d0..3d25627bb8f0f 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -86,6 +86,7 @@ outputs: - {{ compiler('cxx') }} - cmake >=3.18 - git + - mypy-protobuf - pkg-config - setuptools - swig >=4.0 @@ -106,6 +107,7 @@ outputs: - coin-or-cbc 2.10.5 run: - absl-py >=0.13 + - mypy-protobuf - protobuf >=3.18.0 - python >=3.6 # Source: https://github.com/google/or-tools/blob/stable/ortools/python/setup.py.in#L44 From 89c107b9af2759b9b3fb85df8e162f4e4b5e1a02 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 25 Oct 2021 14:51:34 +0300 Subject: [PATCH 105/111] Do not install from PyPI --- recipes/or-tools/build-python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index cc7c1bd1af7c6..bea1cb5117d2c 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -15,4 +15,4 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ cmake --build build -j${CPU_COUNT} -${PYTHON} -m pip install --find-links=build/python/dist ortools -vv +${PYTHON} -m pip install --no-index --find-links=build/python/dist ortools -vv From c5b5bc385af31b0216c38ae7a27177a02b76fc5e Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 25 Oct 2021 14:53:08 +0300 Subject: [PATCH 106/111] Make naming more clear --- recipes/or-tools/meta.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 3d25627bb8f0f..a1948ee0303eb 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -1,4 +1,5 @@ {% set name = "or-tools" %} +{% set package_name = "ortools" %} {% set version = "9.1" %} {% set home = "https://developers.google.com/optimization" %} {% set license = "Apache-2.0" %} @@ -26,7 +27,7 @@ build: outputs: # The core package - - name: {{ name|lower }} + - name: {{ package_name }}-cpp script: build-cpp.sh requirements: @@ -77,7 +78,7 @@ outputs: dev_url: {{ dev_url }} # The python package. - - name: ortools + - name: {{ package_name }}-python script: build-python.sh requirements: From a8832d5038e90b4fb6ac4884afe9d2e2caf482eb Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 25 Oct 2021 15:35:39 +0300 Subject: [PATCH 107/111] Make more verbose --- recipes/or-tools/build-python.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index bea1cb5117d2c..5448532cc09d7 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -15,4 +15,6 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ cmake --build build -j${CPU_COUNT} +echo Install beginns here + ${PYTHON} -m pip install --no-index --find-links=build/python/dist ortools -vv From 372a1f7cbea01518c4dbdbc448eeb2a33561deba Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 25 Oct 2021 16:13:10 +0300 Subject: [PATCH 108/111] Use conda pinning for libprotobuf --- recipes/or-tools/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index a1948ee0303eb..9dcada03d9062 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -40,7 +40,7 @@ outputs: - pkg-config host: - abseil-cpp =20210324.2 - - libprotobuf =3.18.0 + - libprotobuf - zlib 1.2.11 # coin or deps - coin-or-utils 2.11.4 @@ -94,7 +94,7 @@ outputs: host: - abseil-cpp =20210324.2 - absl-py >=0.13 - - libprotobuf =3.18.0 + - libprotobuf - mypy-protobuf - pip >=9.0.1 - python >=3.6 From 1e577dd6a006a53012976dd4b86f58fe009dfc60 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 25 Oct 2021 16:13:51 +0300 Subject: [PATCH 109/111] Fix spelling --- recipes/or-tools/build-python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/build-python.sh b/recipes/or-tools/build-python.sh index 5448532cc09d7..0ce3a153d9485 100644 --- a/recipes/or-tools/build-python.sh +++ b/recipes/or-tools/build-python.sh @@ -15,6 +15,6 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=$PREFIX \ cmake --build build -j${CPU_COUNT} -echo Install beginns here +echo Install begins here ${PYTHON} -m pip install --no-index --find-links=build/python/dist ortools -vv From 1b6735281f5ddf7f2e1aa8f233c379190d494ab1 Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 25 Oct 2021 16:47:00 +0300 Subject: [PATCH 110/111] Remove protobuf pinning --- recipes/or-tools/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index 9dcada03d9062..db975044e28c7 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -109,7 +109,7 @@ outputs: run: - absl-py >=0.13 - mypy-protobuf - - protobuf >=3.18.0 + - protobuf - python >=3.6 # Source: https://github.com/google/or-tools/blob/stable/ortools/python/setup.py.in#L44 run_constrained: From 4a374ce978071613f00c7d2a52fed3a5baf6459f Mon Sep 17 00:00:00 2001 From: BastianZim <10774221+BastianZim@users.noreply.github.com> Date: Mon, 25 Oct 2021 16:47:43 +0300 Subject: [PATCH 111/111] Add sat test --- recipes/or-tools/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/or-tools/meta.yaml b/recipes/or-tools/meta.yaml index db975044e28c7..2d5c6a8f61e2e 100644 --- a/recipes/or-tools/meta.yaml +++ b/recipes/or-tools/meta.yaml @@ -122,10 +122,12 @@ outputs: commands: - pip check - ${PYTHON} cmake/samples/python/sample.py + - ${PYTHON} ortools/sat/samples/assignment_sat.py requires: - pip source_files: - cmake/samples/python/sample.py + - ortools/sat/samples/assignment_sat.py about: home: {{ home }}