diff --git a/.github/workflows/python-wheel-build.yml b/.github/workflows/python-wheel-build.yml index ee8c0003f..d6aa2ac2e 100644 --- a/.github/workflows/python-wheel-build.yml +++ b/.github/workflows/python-wheel-build.yml @@ -16,25 +16,25 @@ jobs: steps: - uses: actions/checkout@v3 - # - name: Checkout CaDiCaL - # uses: actions/checkout@v3 - # with: - # repository: meelgroup/cadical - # ref: 'add_dynamic_lib' - # path: python/cadical + - name: Checkout CaDiCaL + uses: actions/checkout@v3 + with: + repository: meelgroup/cadical + ref: 'add_dynamic_lib' + path: python/cadical - # - name: Checkout Cadiback - # uses: actions/checkout@v3 - # with: - # repository: meelgroup/cadiback - # ref: 'mate' - # path: python/cadiback + - name: Checkout Cadiback + uses: actions/checkout@v3 + with: + repository: meelgroup/cadiback + ref: 'mate' + path: python/cadiback - # - name: configure and build CaDiCaL - # run: cd python/cadical && CXXFLAGS=-fPIC ./configure --competition && make -j4 + - name: configure and build CaDiCaL + run: cd python/cadical && CXXFLAGS=-fPIC ./configure --competition && make -j4 - # - name: Configure and build Cadiback - # run: cd python/cadiback && ./configure && make -j4 + - name: Configure and build Cadiback + run: cd python/cadiback && ./configure && make -j4 && sudo make install # Used to host cibuildwheel - uses: actions/setup-python@v3 @@ -45,23 +45,6 @@ jobs: - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse env: - CIBW_BEFORE_BUILD: > - pwd - echo "here" - ls - echo "here2" - git clone https://github.com/meelgroup/cadical.git - cd cadical - git checkout add_dynamic_lib - ./configure - make -j4 - cd .. - git clone https://github.com/meelgroup/cadiback.git - cd cadical - git checkout mate - ./configure - make -j4 - cd .. CIBW_BEFORE_ALL_LINUX: yum install -y gmp-devel CIBW_SKIP: "*musl*" CIBW_ARCHS: "auto64" diff --git a/setup.py b/setup.py index 1a163443a..391241f01 100644 --- a/setup.py +++ b/setup.py @@ -49,12 +49,12 @@ def _parse_toml(pyproject_path): def gen_modules(version): if platform == "win32" or platform == "cygwin": - extra_compile_args_val = ['-I../', '-Isrc/', '/std:c++17', "/DCMS_FULL_VERSION=\""+version+"\""] - define_macros_val = [("TRACE", "")] + extra_compile_args_val = ['-I../', '-Isrc/', '/std:c++17', "/DINSTALLED_CADIBACK", "/DCMS_FULL_VERSION=\""+version+"\""] + define_macros_val = [("TRACE", ""), ("INSTALLED_CADIBACK", "")] else: - extra_compile_args_val = ['-I../', '-Isrc/', '-std=c++17'] - define_macros_val = [("TRACE", ""), ("CMS_FULL_VERSION", "\""+version+"\"")] + extra_compile_args_val = ['-I../', '-Isrc/', '-std=c++17', "-DINSTALLED_CADIBACK"] + define_macros_val = [("TRACE", ""), ("INSTALLED_CADIBACK", ""), ("CMS_FULL_VERSION", "\""+version+"\"")] modules = Extension( name = "pycryptosat", diff --git a/src/backbone.cpp b/src/backbone.cpp index dc8ec8d4d..bfa52c8ca 100644 --- a/src/backbone.cpp +++ b/src/backbone.cpp @@ -21,7 +21,11 @@ THE SOFTWARE. ***********************************************/ #include "solver.h" +#ifdef INSTALLED_CADIBACK +#include +#else #include "../cadiback/cadiback.h" +#endif using namespace CMSat;