├── .github ├── CODEOWNERS └── workflows │ ├── webservices.yml │ └── automerge.yml ├── conda-forge.yml ├── azure-pipelines.yml ├── .ci_support ├── README ├── win_64_python3.9.____cpython.yaml ├── win_64_python3.10.____cpython.yaml ├── win_64_python3.11.____cpython.yaml ├── win_64_python3.12.____cpython.yaml ├── linux_64_python3.8.____cpython.yaml ├── linux_64_python3.9.____cpython.yaml ├── linux_64_python3.10.____cpython.yaml ├── linux_64_python3.11.____cpython.yaml ├── linux_64_python3.12.____cpython.yaml ├── osx_64_python3.10.____cpython.yaml ├── osx_64_python3.11.____cpython.yaml ├── osx_64_python3.12.____cpython.yaml ├── osx_64_python3.8.____cpython.yaml ├── osx_64_python3.9.____cpython.yaml └── migrations │ └── python312.yaml ├── .circleci └── config.yml ├── recipe ├── fix-compile.patch ├── graphcut_boost_lib.patch └── meta.yaml ├── .gitignore ├── .gitattributes ├── .scripts ├── logging_utils.sh ├── build_steps.sh ├── run_osx_build.sh ├── run_win_build.bat └── run_docker_build.sh ├── LICENSE.txt ├── .azure-pipelines ├── azure-pipelines-osx.yml ├── azure-pipelines-win.yml └── azure-pipelines-linux.yml └── README.md /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @loli @sarthakpati -------------------------------------------------------------------------------- /conda-forge.yml: -------------------------------------------------------------------------------- 1 | conda_forge_output_validation: true 2 | bot: 3 | automerge: true 4 | github: 5 | branch_name: main 6 | tooling_branch_name: main 7 | conda_build: 8 | pkg_format: '2' 9 | -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | # This file was generated automatically from conda-smithy. To update this configuration, 2 | # update the conda-forge.yml and/or the recipe/meta.yaml. 3 | # -*- mode: yaml -*- 4 | 5 | jobs: 6 | - template: ./.azure-pipelines/azure-pipelines-linux.yml 7 | - template: ./.azure-pipelines/azure-pipelines-osx.yml 8 | - template: ./.azure-pipelines/azure-pipelines-win.yml -------------------------------------------------------------------------------- /.ci_support/README: -------------------------------------------------------------------------------- 1 | This file is automatically generated by conda-smithy. If any 2 | particular build configuration is expected, but it is not found, 3 | please make sure all dependencies are satisfiable. To add/modify any 4 | matrix elements, you should create/change conda-smithy's input 5 | recipe/conda_build_config.yaml and re-render the recipe, rather than 6 | editing these files directly. 7 | -------------------------------------------------------------------------------- /.ci_support/win_64_python3.9.____cpython.yaml: -------------------------------------------------------------------------------- 1 | c_compiler: 2 | - vs2019 3 | c_stdlib: 4 | - vs 5 | channel_sources: 6 | - conda-forge 7 | channel_targets: 8 | - conda-forge main 9 | cxx_compiler: 10 | - vs2019 11 | libboost_python_devel: 12 | - '1.84' 13 | pin_run_as_build: 14 | python: 15 | min_pin: x.x 16 | max_pin: x.x 17 | python: 18 | - 3.9.* *_cpython 19 | target_platform: 20 | - win-64 21 | -------------------------------------------------------------------------------- /.ci_support/win_64_python3.10.____cpython.yaml: -------------------------------------------------------------------------------- 1 | c_compiler: 2 | - vs2019 3 | c_stdlib: 4 | - vs 5 | channel_sources: 6 | - conda-forge 7 | channel_targets: 8 | - conda-forge main 9 | cxx_compiler: 10 | - vs2019 11 | libboost_python_devel: 12 | - '1.84' 13 | pin_run_as_build: 14 | python: 15 | min_pin: x.x 16 | max_pin: x.x 17 | python: 18 | - 3.10.* *_cpython 19 | target_platform: 20 | - win-64 21 | -------------------------------------------------------------------------------- /.ci_support/win_64_python3.11.____cpython.yaml: -------------------------------------------------------------------------------- 1 | c_compiler: 2 | - vs2019 3 | c_stdlib: 4 | - vs 5 | channel_sources: 6 | - conda-forge 7 | channel_targets: 8 | - conda-forge main 9 | cxx_compiler: 10 | - vs2019 11 | libboost_python_devel: 12 | - '1.84' 13 | pin_run_as_build: 14 | python: 15 | min_pin: x.x 16 | max_pin: x.x 17 | python: 18 | - 3.11.* *_cpython 19 | target_platform: 20 | - win-64 21 | -------------------------------------------------------------------------------- /.ci_support/win_64_python3.12.____cpython.yaml: -------------------------------------------------------------------------------- 1 | c_compiler: 2 | - vs2019 3 | c_stdlib: 4 | - vs 5 | channel_sources: 6 | - conda-forge 7 | channel_targets: 8 | - conda-forge main 9 | cxx_compiler: 10 | - vs2019 11 | libboost_python_devel: 12 | - '1.84' 13 | pin_run_as_build: 14 | python: 15 | min_pin: x.x 16 | max_pin: x.x 17 | python: 18 | - 3.12.* *_cpython 19 | target_platform: 20 | - win-64 21 | -------------------------------------------------------------------------------- /.github/workflows/webservices.yml: -------------------------------------------------------------------------------- 1 | on: repository_dispatch 2 | 3 | jobs: 4 | webservices: 5 | runs-on: ubuntu-latest 6 | name: webservices 7 | steps: 8 | - name: webservices 9 | id: webservices 10 | uses: conda-forge/webservices-dispatch-action@main 11 | with: 12 | github_token: ${{ secrets.GITHUB_TOKEN }} 13 | rerendering_github_token: ${{ secrets.RERENDERING_GITHUB_TOKEN }} 14 | -------------------------------------------------------------------------------- /.github/workflows/automerge.yml: -------------------------------------------------------------------------------- 1 | on: 2 | status: {} 3 | check_suite: 4 | types: 5 | - completed 6 | 7 | jobs: 8 | automerge-action: 9 | runs-on: ubuntu-latest 10 | name: automerge 11 | steps: 12 | - name: automerge-action 13 | id: automerge-action 14 | uses: conda-forge/automerge-action@main 15 | with: 16 | github_token: ${{ secrets.GITHUB_TOKEN }} 17 | rerendering_github_token: ${{ secrets.RERENDERING_GITHUB_TOKEN }} 18 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # This file was generated automatically from conda-smithy. To update this configuration, 2 | # update the conda-forge.yml and/or the recipe/meta.yaml. 3 | # -*- mode: jinja-yaml -*- 4 | 5 | version: 2 6 | 7 | jobs: 8 | build: 9 | working_directory: ~/test 10 | machine: 11 | image: ubuntu-2004:current 12 | steps: 13 | - run: 14 | # The Circle-CI build should not be active, but if this is not true for some reason, do a fast finish. 15 | command: exit 0 16 | 17 | workflows: 18 | version: 2 19 | build_and_test: 20 | jobs: 21 | - build: 22 | filters: 23 | branches: 24 | ignore: 25 | - /.*/ 26 | -------------------------------------------------------------------------------- /.ci_support/linux_64_python3.8.____cpython.yaml: -------------------------------------------------------------------------------- 1 | c_compiler: 2 | - gcc 3 | c_compiler_version: 4 | - '12' 5 | c_stdlib: 6 | - sysroot 7 | c_stdlib_version: 8 | - '2.17' 9 | cdt_name: 10 | - cos7 11 | channel_sources: 12 | - conda-forge 13 | channel_targets: 14 | - conda-forge main 15 | cxx_compiler: 16 | - gxx 17 | cxx_compiler_version: 18 | - '12' 19 | docker_image: 20 | - quay.io/condaforge/linux-anvil-cos7-x86_64 21 | libboost_python_devel: 22 | - '1.84' 23 | pin_run_as_build: 24 | python: 25 | min_pin: x.x 26 | max_pin: x.x 27 | python: 28 | - 3.8.* *_cpython 29 | target_platform: 30 | - linux-64 31 | zip_keys: 32 | - - c_compiler_version 33 | - cxx_compiler_version 34 | - - c_stdlib_version 35 | - cdt_name 36 | -------------------------------------------------------------------------------- /.ci_support/linux_64_python3.9.____cpython.yaml: -------------------------------------------------------------------------------- 1 | c_compiler: 2 | - gcc 3 | c_compiler_version: 4 | - '12' 5 | c_stdlib: 6 | - sysroot 7 | c_stdlib_version: 8 | - '2.17' 9 | cdt_name: 10 | - cos7 11 | channel_sources: 12 | - conda-forge 13 | channel_targets: 14 | - conda-forge main 15 | cxx_compiler: 16 | - gxx 17 | cxx_compiler_version: 18 | - '12' 19 | docker_image: 20 | - quay.io/condaforge/linux-anvil-cos7-x86_64 21 | libboost_python_devel: 22 | - '1.84' 23 | pin_run_as_build: 24 | python: 25 | min_pin: x.x 26 | max_pin: x.x 27 | python: 28 | - 3.9.* *_cpython 29 | target_platform: 30 | - linux-64 31 | zip_keys: 32 | - - c_compiler_version 33 | - cxx_compiler_version 34 | - - c_stdlib_version 35 | - cdt_name 36 | -------------------------------------------------------------------------------- /.ci_support/linux_64_python3.10.____cpython.yaml: -------------------------------------------------------------------------------- 1 | c_compiler: 2 | - gcc 3 | c_compiler_version: 4 | - '12' 5 | c_stdlib: 6 | - sysroot 7 | c_stdlib_version: 8 | - '2.17' 9 | cdt_name: 10 | - cos7 11 | channel_sources: 12 | - conda-forge 13 | channel_targets: 14 | - conda-forge main 15 | cxx_compiler: 16 | - gxx 17 | cxx_compiler_version: 18 | - '12' 19 | docker_image: 20 | - quay.io/condaforge/linux-anvil-cos7-x86_64 21 | libboost_python_devel: 22 | - '1.84' 23 | pin_run_as_build: 24 | python: 25 | min_pin: x.x 26 | max_pin: x.x 27 | python: 28 | - 3.10.* *_cpython 29 | target_platform: 30 | - linux-64 31 | zip_keys: 32 | - - c_compiler_version 33 | - cxx_compiler_version 34 | - - c_stdlib_version 35 | - cdt_name 36 | -------------------------------------------------------------------------------- /.ci_support/linux_64_python3.11.____cpython.yaml: -------------------------------------------------------------------------------- 1 | c_compiler: 2 | - gcc 3 | c_compiler_version: 4 | - '12' 5 | c_stdlib: 6 | - sysroot 7 | c_stdlib_version: 8 | - '2.17' 9 | cdt_name: 10 | - cos7 11 | channel_sources: 12 | - conda-forge 13 | channel_targets: 14 | - conda-forge main 15 | cxx_compiler: 16 | - gxx 17 | cxx_compiler_version: 18 | - '12' 19 | docker_image: 20 | - quay.io/condaforge/linux-anvil-cos7-x86_64 21 | libboost_python_devel: 22 | - '1.84' 23 | pin_run_as_build: 24 | python: 25 | min_pin: x.x 26 | max_pin: x.x 27 | python: 28 | - 3.11.* *_cpython 29 | target_platform: 30 | - linux-64 31 | zip_keys: 32 | - - c_compiler_version 33 | - cxx_compiler_version 34 | - - c_stdlib_version 35 | - cdt_name 36 | -------------------------------------------------------------------------------- /.ci_support/linux_64_python3.12.____cpython.yaml: -------------------------------------------------------------------------------- 1 | c_compiler: 2 | - gcc 3 | c_compiler_version: 4 | - '12' 5 | c_stdlib: 6 | - sysroot 7 | c_stdlib_version: 8 | - '2.17' 9 | cdt_name: 10 | - cos7 11 | channel_sources: 12 | - conda-forge 13 | channel_targets: 14 | - conda-forge main 15 | cxx_compiler: 16 | - gxx 17 | cxx_compiler_version: 18 | - '12' 19 | docker_image: 20 | - quay.io/condaforge/linux-anvil-cos7-x86_64 21 | libboost_python_devel: 22 | - '1.84' 23 | pin_run_as_build: 24 | python: 25 | min_pin: x.x 26 | max_pin: x.x 27 | python: 28 | - 3.12.* *_cpython 29 | target_platform: 30 | - linux-64 31 | zip_keys: 32 | - - c_compiler_version 33 | - cxx_compiler_version 34 | - - c_stdlib_version 35 | - cdt_name 36 | -------------------------------------------------------------------------------- /.ci_support/osx_64_python3.10.____cpython.yaml: -------------------------------------------------------------------------------- 1 | MACOSX_DEPLOYMENT_TARGET: 2 | - '10.13' 3 | MACOSX_SDK_VERSION: 4 | - '10.13' 5 | c_compiler: 6 | - clang 7 | c_compiler_version: 8 | - '16' 9 | c_stdlib: 10 | - macosx_deployment_target 11 | c_stdlib_version: 12 | - '10.13' 13 | channel_sources: 14 | - conda-forge 15 | channel_targets: 16 | - conda-forge main 17 | cxx_compiler: 18 | - clangxx 19 | cxx_compiler_version: 20 | - '16' 21 | libboost_python_devel: 22 | - '1.84' 23 | macos_machine: 24 | - x86_64-apple-darwin13.4.0 25 | pin_run_as_build: 26 | python: 27 | min_pin: x.x 28 | max_pin: x.x 29 | python: 30 | - 3.10.* *_cpython 31 | target_platform: 32 | - osx-64 33 | zip_keys: 34 | - - c_compiler_version 35 | - cxx_compiler_version 36 | -------------------------------------------------------------------------------- /.ci_support/osx_64_python3.11.____cpython.yaml: -------------------------------------------------------------------------------- 1 | MACOSX_DEPLOYMENT_TARGET: 2 | - '10.13' 3 | MACOSX_SDK_VERSION: 4 | - '10.13' 5 | c_compiler: 6 | - clang 7 | c_compiler_version: 8 | - '16' 9 | c_stdlib: 10 | - macosx_deployment_target 11 | c_stdlib_version: 12 | - '10.13' 13 | channel_sources: 14 | - conda-forge 15 | channel_targets: 16 | - conda-forge main 17 | cxx_compiler: 18 | - clangxx 19 | cxx_compiler_version: 20 | - '16' 21 | libboost_python_devel: 22 | - '1.84' 23 | macos_machine: 24 | - x86_64-apple-darwin13.4.0 25 | pin_run_as_build: 26 | python: 27 | min_pin: x.x 28 | max_pin: x.x 29 | python: 30 | - 3.11.* *_cpython 31 | target_platform: 32 | - osx-64 33 | zip_keys: 34 | - - c_compiler_version 35 | - cxx_compiler_version 36 | -------------------------------------------------------------------------------- /.ci_support/osx_64_python3.12.____cpython.yaml: -------------------------------------------------------------------------------- 1 | MACOSX_DEPLOYMENT_TARGET: 2 | - '10.13' 3 | MACOSX_SDK_VERSION: 4 | - '10.13' 5 | c_compiler: 6 | - clang 7 | c_compiler_version: 8 | - '16' 9 | c_stdlib: 10 | - macosx_deployment_target 11 | c_stdlib_version: 12 | - '10.13' 13 | channel_sources: 14 | - conda-forge 15 | channel_targets: 16 | - conda-forge main 17 | cxx_compiler: 18 | - clangxx 19 | cxx_compiler_version: 20 | - '16' 21 | libboost_python_devel: 22 | - '1.84' 23 | macos_machine: 24 | - x86_64-apple-darwin13.4.0 25 | pin_run_as_build: 26 | python: 27 | min_pin: x.x 28 | max_pin: x.x 29 | python: 30 | - 3.12.* *_cpython 31 | target_platform: 32 | - osx-64 33 | zip_keys: 34 | - - c_compiler_version 35 | - cxx_compiler_version 36 | -------------------------------------------------------------------------------- /.ci_support/osx_64_python3.8.____cpython.yaml: -------------------------------------------------------------------------------- 1 | MACOSX_DEPLOYMENT_TARGET: 2 | - '10.13' 3 | MACOSX_SDK_VERSION: 4 | - '10.13' 5 | c_compiler: 6 | - clang 7 | c_compiler_version: 8 | - '16' 9 | c_stdlib: 10 | - macosx_deployment_target 11 | c_stdlib_version: 12 | - '10.13' 13 | channel_sources: 14 | - conda-forge 15 | channel_targets: 16 | - conda-forge main 17 | cxx_compiler: 18 | - clangxx 19 | cxx_compiler_version: 20 | - '16' 21 | libboost_python_devel: 22 | - '1.84' 23 | macos_machine: 24 | - x86_64-apple-darwin13.4.0 25 | pin_run_as_build: 26 | python: 27 | min_pin: x.x 28 | max_pin: x.x 29 | python: 30 | - 3.8.* *_cpython 31 | target_platform: 32 | - osx-64 33 | zip_keys: 34 | - - c_compiler_version 35 | - cxx_compiler_version 36 | -------------------------------------------------------------------------------- /.ci_support/osx_64_python3.9.____cpython.yaml: -------------------------------------------------------------------------------- 1 | MACOSX_DEPLOYMENT_TARGET: 2 | - '10.13' 3 | MACOSX_SDK_VERSION: 4 | - '10.13' 5 | c_compiler: 6 | - clang 7 | c_compiler_version: 8 | - '16' 9 | c_stdlib: 10 | - macosx_deployment_target 11 | c_stdlib_version: 12 | - '10.13' 13 | channel_sources: 14 | - conda-forge 15 | channel_targets: 16 | - conda-forge main 17 | cxx_compiler: 18 | - clangxx 19 | cxx_compiler_version: 20 | - '16' 21 | libboost_python_devel: 22 | - '1.84' 23 | macos_machine: 24 | - x86_64-apple-darwin13.4.0 25 | pin_run_as_build: 26 | python: 27 | min_pin: x.x 28 | max_pin: x.x 29 | python: 30 | - 3.9.* *_cpython 31 | target_platform: 32 | - osx-64 33 | zip_keys: 34 | - - c_compiler_version 35 | - cxx_compiler_version 36 | -------------------------------------------------------------------------------- /recipe/fix-compile.patch: -------------------------------------------------------------------------------- 1 | --- a/lib/maxflow/src/pythongraph.h 2021-04-29 14:28:31.000000000 -0600 2 | +++ b/lib/maxflow/src/pythongraph.h 2021-04-29 14:28:49.000000000 -0600 3 | @@ -17,8 +17,8 @@ 4 | { 5 | public: 6 | Pythongraph(int node_num_max, int edge_num_max) : Graph(node_num_max, edge_num_max, NULL) {}; 7 | - flowtype maxflow() { Graph::maxflow(); }; 8 | - typename Graph::termtype what_segment(int i) { Graph::what_segment(i); }; 9 | + flowtype maxflow() { return Graph::maxflow(); }; 10 | + typename Graph::termtype what_segment(int i) { return Graph::what_segment(i); }; 11 | }; 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # User content belongs under recipe/. 2 | # Feedstock configuration goes in `conda-forge.yml` 3 | # Everything else is managed by the conda-smithy rerender process. 4 | # Please do not modify 5 | 6 | # Ignore all files and folders in root 7 | * 8 | !/conda-forge.yml 9 | 10 | # Don't ignore any files/folders if the parent folder is 'un-ignored' 11 | # This also avoids warnings when adding an already-checked file with an ignored parent. 12 | !/**/ 13 | # Don't ignore any files/folders recursively in the following folders 14 | !/recipe/** 15 | !/.ci_support/** 16 | 17 | # Since we ignore files/folders recursively, any folders inside 18 | # build_artifacts gets ignored which trips some build systems. 19 | # To avoid that we 'un-ignore' all files/folders recursively 20 | # and only ignore the root build_artifacts folder. 21 | !/build_artifacts/** 22 | /build_artifacts 23 | 24 | *.pyc 25 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.patch binary 4 | *.diff binary 5 | meta.yaml text eol=lf 6 | build.sh text eol=lf 7 | bld.bat text eol=crlf 8 | 9 | # github helper pieces to make some files not show up in diffs automatically 10 | .azure-pipelines/* linguist-generated=true 11 | .circleci/* linguist-generated=true 12 | .ci_support/README linguist-generated=true 13 | .drone/* linguist-generated=true 14 | .drone.yml linguist-generated=true 15 | .github/* linguist-generated=true 16 | .travis/* linguist-generated=true 17 | .appveyor.yml linguist-generated=true 18 | .gitattributes linguist-generated=true 19 | .gitignore linguist-generated=true 20 | .travis.yml linguist-generated=true 21 | .scripts/* linguist-generated=true 22 | .woodpecker.yml linguist-generated=true 23 | /LICENSE.txt linguist-generated=true 24 | /README.md linguist-generated=true 25 | azure-pipelines.yml linguist-generated=true 26 | build-locally.py linguist-generated=true 27 | shippable.yml linguist-generated=true 28 | -------------------------------------------------------------------------------- /.scripts/logging_utils.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Provide a unified interface for the different logging 4 | # utilities CI providers offer. If unavailable, provide 5 | # a compatible fallback (e.g. bare `echo xxxxxx`). 6 | 7 | function startgroup { 8 | # Start a foldable group of log lines 9 | # Pass a single argument, quoted 10 | case ${CI:-} in 11 | azure ) 12 | echo "##[group]$1";; 13 | travis ) 14 | echo "$1" 15 | echo -en 'travis_fold:start:'"${1// /}"'\r';; 16 | github_actions ) 17 | echo "::group::$1";; 18 | * ) 19 | echo "$1";; 20 | esac 21 | } 2> /dev/null 22 | 23 | function endgroup { 24 | # End a foldable group of log lines 25 | # Pass a single argument, quoted 26 | 27 | case ${CI:-} in 28 | azure ) 29 | echo "##[endgroup]";; 30 | travis ) 31 | echo -en 'travis_fold:end:'"${1// /}"'\r';; 32 | github_actions ) 33 | echo "::endgroup::";; 34 | esac 35 | } 2> /dev/null 36 | -------------------------------------------------------------------------------- /.ci_support/migrations/python312.yaml: -------------------------------------------------------------------------------- 1 | migrator_ts: 1695046563 2 | __migrator: 3 | migration_number: 1 4 | operation: key_add 5 | primary_key: python 6 | ordering: 7 | python: 8 | - 3.6.* *_cpython 9 | - 3.7.* *_cpython 10 | - 3.8.* *_cpython 11 | - 3.9.* *_cpython 12 | - 3.10.* *_cpython 13 | - 3.11.* *_cpython 14 | - 3.12.* *_cpython # new entry 15 | - 3.6.* *_73_pypy 16 | - 3.7.* *_73_pypy 17 | - 3.8.* *_73_pypy 18 | - 3.9.* *_73_pypy 19 | paused: false 20 | longterm: True 21 | pr_limit: 30 22 | max_solver_attempts: 6 # this will make the bot retry "not solvable" stuff 6 times 23 | exclude: 24 | # this shouldn't attempt to modify the python feedstocks 25 | - python 26 | - pypy3.6 27 | - pypy-meta 28 | - cross-python 29 | - python_abi 30 | exclude_pinned_pkgs: false 31 | 32 | python: 33 | - 3.12.* *_cpython 34 | # additional entries to add for zip_keys 35 | numpy: 36 | - 1.26 37 | python_impl: 38 | - cpython 39 | -------------------------------------------------------------------------------- /recipe/graphcut_boost_lib.patch: -------------------------------------------------------------------------------- 1 | diff --git a/setup.py b/setup.py 2 | index c30017d..5618c0b 100755 3 | --- a/setup.py 4 | +++ b/setup.py 5 | @@ -42,27 +42,8 @@ def try_find_library(lib_name): 6 | ### PREDEFINED MODULES 7 | # The maxflow graphcut wrapper using boost.python 8 | 9 | -# Special handling for homebrew Boost Python library 10 | -if sys.platform == "darwin": 11 | - if sys.version_info.major > 2: 12 | - boost_python_library = "boost_python" + str(sys.version_info.major) 13 | - else: 14 | - boost_python_library = "boost_python" 15 | -else: 16 | - boost_python_library = try_find_library( 17 | - "boost_python-py" + str(sys.version_info.major) + str(sys.version_info.minor) 18 | - ) 19 | - if not boost_python_library: 20 | - boost_python_library = try_find_library( 21 | - "boost_python-py" + str(sys.version_info.major) 22 | - ) 23 | - if not boost_python_library: 24 | - boost_python_library = try_find_library( 25 | - "boost_python" + str(sys.version_info.major) + str(sys.version_info.minor) 26 | - ) 27 | - if not boost_python_library: 28 | - # exact version not found, trying with major fit only as fallback 29 | - boost_python_library = "boost_python" + str(sys.version_info.major) 30 | +# Find boost library as installed from conda-forge 31 | +boost_python_library = 'boost_python' + str(sys.version_info.major) + str(sys.version_info.minor) 32 | 33 | maxflow = Extension( 34 | "medpy.graphcut.maxflow", 35 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | BSD-3-Clause license 2 | Copyright (c) 2015-2022, conda-forge contributors 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 3. Neither the name of the copyright holder nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR 21 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 23 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 24 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 27 | DAMAGE. 28 | -------------------------------------------------------------------------------- /.azure-pipelines/azure-pipelines-osx.yml: -------------------------------------------------------------------------------- 1 | # This file was generated automatically from conda-smithy. To update this configuration, 2 | # update the conda-forge.yml and/or the recipe/meta.yaml. 3 | # -*- mode: yaml -*- 4 | 5 | jobs: 6 | - job: osx 7 | pool: 8 | vmImage: macOS-12 9 | strategy: 10 | matrix: 11 | osx_64_python3.10.____cpython: 12 | CONFIG: osx_64_python3.10.____cpython 13 | UPLOAD_PACKAGES: 'True' 14 | osx_64_python3.11.____cpython: 15 | CONFIG: osx_64_python3.11.____cpython 16 | UPLOAD_PACKAGES: 'True' 17 | osx_64_python3.12.____cpython: 18 | CONFIG: osx_64_python3.12.____cpython 19 | UPLOAD_PACKAGES: 'True' 20 | osx_64_python3.8.____cpython: 21 | CONFIG: osx_64_python3.8.____cpython 22 | UPLOAD_PACKAGES: 'True' 23 | osx_64_python3.9.____cpython: 24 | CONFIG: osx_64_python3.9.____cpython 25 | UPLOAD_PACKAGES: 'True' 26 | timeoutInMinutes: 360 27 | variables: {} 28 | 29 | steps: 30 | # TODO: Fast finish on azure pipelines? 31 | - script: | 32 | export CI=azure 33 | export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) 34 | export remote_url=$(Build.Repository.Uri) 35 | export sha=$(Build.SourceVersion) 36 | export OSX_FORCE_SDK_DOWNLOAD="1" 37 | export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME 38 | export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) 39 | if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then 40 | export IS_PR_BUILD="True" 41 | else 42 | export IS_PR_BUILD="False" 43 | fi 44 | ./.scripts/run_osx_build.sh 45 | displayName: Run OSX build 46 | env: 47 | BINSTAR_TOKEN: $(BINSTAR_TOKEN) 48 | FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) 49 | STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) -------------------------------------------------------------------------------- /.azure-pipelines/azure-pipelines-win.yml: -------------------------------------------------------------------------------- 1 | # This file was generated automatically from conda-smithy. To update this configuration, 2 | # update the conda-forge.yml and/or the recipe/meta.yaml. 3 | # -*- mode: yaml -*- 4 | 5 | jobs: 6 | - job: win 7 | pool: 8 | vmImage: windows-2022 9 | strategy: 10 | matrix: 11 | win_64_python3.10.____cpython: 12 | CONFIG: win_64_python3.10.____cpython 13 | UPLOAD_PACKAGES: 'True' 14 | win_64_python3.11.____cpython: 15 | CONFIG: win_64_python3.11.____cpython 16 | UPLOAD_PACKAGES: 'True' 17 | win_64_python3.12.____cpython: 18 | CONFIG: win_64_python3.12.____cpython 19 | UPLOAD_PACKAGES: 'True' 20 | win_64_python3.9.____cpython: 21 | CONFIG: win_64_python3.9.____cpython 22 | UPLOAD_PACKAGES: 'True' 23 | timeoutInMinutes: 360 24 | variables: 25 | CONDA_BLD_PATH: D:\\bld\\ 26 | UPLOAD_TEMP: D:\\tmp 27 | 28 | steps: 29 | 30 | - task: PythonScript@0 31 | displayName: 'Download Miniforge' 32 | inputs: 33 | scriptSource: inline 34 | script: | 35 | import urllib.request 36 | url = 'https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Windows-x86_64.exe' 37 | path = r"$(Build.ArtifactStagingDirectory)/Miniforge.exe" 38 | urllib.request.urlretrieve(url, path) 39 | 40 | - script: | 41 | start /wait "" %BUILD_ARTIFACTSTAGINGDIRECTORY%\Miniforge.exe /InstallationType=JustMe /RegisterPython=0 /S /D=C:\Miniforge 42 | displayName: Install Miniforge 43 | 44 | - powershell: Write-Host "##vso[task.prependpath]C:\Miniforge\Scripts" 45 | displayName: Add conda to PATH 46 | 47 | - script: | 48 | call ".scripts\run_win_build.bat" 49 | displayName: Run Windows build 50 | env: 51 | PYTHONUNBUFFERED: 1 52 | CONFIG: $(CONFIG) 53 | CI: azure 54 | flow_run_id: azure_$(Build.BuildNumber).$(System.JobAttempt) 55 | remote_url: $(Build.Repository.Uri) 56 | sha: $(Build.SourceVersion) 57 | UPLOAD_PACKAGES: $(UPLOAD_PACKAGES) 58 | UPLOAD_TEMP: $(UPLOAD_TEMP) 59 | BINSTAR_TOKEN: $(BINSTAR_TOKEN) 60 | FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) 61 | STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) -------------------------------------------------------------------------------- /recipe/meta.yaml: -------------------------------------------------------------------------------- 1 | {% set name = "medpy" %} 2 | {% set version = "0.5.2" %} 3 | 4 | 5 | package: 6 | name: {{ name|lower }} 7 | version: {{ version }} 8 | 9 | source: 10 | url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/medpy-{{ version }}.tar.gz 11 | sha256: f4233c2f4adc79abe4b8ff5b683ba4778322d4545e71d51d6a328ad31275972d 12 | patches: 13 | - graphcut_boost_lib.patch 14 | - fix-compile.patch 15 | 16 | build: 17 | number: 0 18 | skip: true # [win and py==38] 19 | script: 20 | - export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib" # [unix] 21 | - export CXXFLAGS="${CXXFLAGS} -I${PREFIX}/include -I${PYTHON_INCLUDE_DIR}" # [unix] 22 | # see https://github.com/boostorg/system/issues/32#issuecomment-462912013 23 | - set "CXXFLAGS=%CXXFLAGS% /DHAVE_SNPRINTF=1" # [win] 24 | - set "CFLAGS=%CFLAGS% /DHAVE_SNPRINTF=1" # [win] 25 | - python setup.py build_ext --include-dirs=%PREFIX%\include --library-dirs=%PREFIX%\lib # [win] 26 | - python setup.py build_ext --include-dirs=$PREFIX/include --library-dirs=$PREFIX/lib # [not win] 27 | - "{{ PYTHON }} -m pip install . --no-deps --ignore-installed -vvv " 28 | 29 | requirements: 30 | build: 31 | - {{ compiler('c') }} 32 | - {{ stdlib("c") }} 33 | - {{ compiler('cxx') }} 34 | host: 35 | - libboost-python-devel 36 | - pip 37 | - python 38 | run: 39 | - numpy >=1.24 40 | - python 41 | - simpleitk >=2.1 42 | - scipy >=1.10 43 | 44 | test: 45 | imports: 46 | - medpy 47 | - medpy.core 48 | - medpy.features 49 | - medpy.filter 50 | - medpy.graphcut 51 | - medpy.io 52 | - medpy.iterators 53 | - medpy.metric 54 | - medpy.neighbours 55 | - medpy.utilities 56 | commands: 57 | - pip check 58 | requires: 59 | - pip 60 | 61 | about: 62 | home: https://github.com/loli/medpy 63 | summary: Medical image processing in Python 64 | license: GPL-2.0-or-later 65 | license_family: GPL 66 | license_file: LICENSE.txt 67 | doc_url: http://loli.github.io/medpy/ 68 | dev_url: http://loli.github.io/medpy/installation/developmentmode.html 69 | 70 | extra: 71 | recipe-maintainers: 72 | - sarthakpati 73 | - loli 74 | -------------------------------------------------------------------------------- /.azure-pipelines/azure-pipelines-linux.yml: -------------------------------------------------------------------------------- 1 | # This file was generated automatically from conda-smithy. To update this configuration, 2 | # update the conda-forge.yml and/or the recipe/meta.yaml. 3 | # -*- mode: yaml -*- 4 | 5 | jobs: 6 | - job: linux 7 | pool: 8 | vmImage: ubuntu-latest 9 | strategy: 10 | matrix: 11 | linux_64_python3.10.____cpython: 12 | CONFIG: linux_64_python3.10.____cpython 13 | UPLOAD_PACKAGES: 'True' 14 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 15 | linux_64_python3.11.____cpython: 16 | CONFIG: linux_64_python3.11.____cpython 17 | UPLOAD_PACKAGES: 'True' 18 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 19 | linux_64_python3.12.____cpython: 20 | CONFIG: linux_64_python3.12.____cpython 21 | UPLOAD_PACKAGES: 'True' 22 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 23 | linux_64_python3.8.____cpython: 24 | CONFIG: linux_64_python3.8.____cpython 25 | UPLOAD_PACKAGES: 'True' 26 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 27 | linux_64_python3.9.____cpython: 28 | CONFIG: linux_64_python3.9.____cpython 29 | UPLOAD_PACKAGES: 'True' 30 | DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 31 | timeoutInMinutes: 360 32 | variables: {} 33 | 34 | steps: 35 | # configure qemu binfmt-misc running. This allows us to run docker containers 36 | # embedded qemu-static 37 | - script: | 38 | docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes 39 | ls /proc/sys/fs/binfmt_misc/ 40 | condition: not(startsWith(variables['CONFIG'], 'linux_64')) 41 | displayName: Configure binfmt_misc 42 | 43 | - script: | 44 | export CI=azure 45 | export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) 46 | export remote_url=$(Build.Repository.Uri) 47 | export sha=$(Build.SourceVersion) 48 | export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME 49 | export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) 50 | if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then 51 | export IS_PR_BUILD="True" 52 | else 53 | export IS_PR_BUILD="False" 54 | fi 55 | .scripts/run_docker_build.sh 56 | displayName: Run docker build 57 | env: 58 | BINSTAR_TOKEN: $(BINSTAR_TOKEN) 59 | FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) 60 | STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) -------------------------------------------------------------------------------- /.scripts/build_steps.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here 4 | # will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent 5 | # changes to this script, consider a proposal to conda-smithy so that other feedstocks can also 6 | # benefit from the improvement. 7 | 8 | # -*- mode: jinja-shell -*- 9 | 10 | set -xeuo pipefail 11 | export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" 12 | source ${FEEDSTOCK_ROOT}/.scripts/logging_utils.sh 13 | 14 | 15 | ( endgroup "Start Docker" ) 2> /dev/null 16 | 17 | ( startgroup "Configuring conda" ) 2> /dev/null 18 | 19 | export PYTHONUNBUFFERED=1 20 | export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" 21 | export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" 22 | export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" 23 | 24 | cat >~/.condarc <=24.1" 38 | mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ 39 | pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" 40 | 41 | # set up the condarc 42 | setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" 43 | 44 | source run_conda_forge_build_setup 45 | 46 | # make the build number clobber 47 | make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" 48 | 49 | 50 | 51 | ( endgroup "Configuring conda" ) 2> /dev/null 52 | 53 | if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then 54 | cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" 55 | fi 56 | 57 | if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then 58 | if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then 59 | EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" 60 | fi 61 | conda debug "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ 62 | ${EXTRA_CB_OPTIONS:-} \ 63 | --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" 64 | 65 | # Drop into an interactive shell 66 | /bin/bash 67 | else 68 | conda-build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ 69 | --suppress-variables ${EXTRA_CB_OPTIONS:-} \ 70 | --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ 71 | --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" 72 | ( startgroup "Inspecting artifacts" ) 2> /dev/null 73 | 74 | # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 75 | command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" 76 | 77 | ( endgroup "Inspecting artifacts" ) 2> /dev/null 78 | ( startgroup "Validating outputs" ) 2> /dev/null 79 | 80 | validate_recipe_outputs "${FEEDSTOCK_NAME}" 81 | 82 | ( endgroup "Validating outputs" ) 2> /dev/null 83 | 84 | ( startgroup "Uploading packages" ) 2> /dev/null 85 | 86 | if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then 87 | upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" 88 | fi 89 | 90 | ( endgroup "Uploading packages" ) 2> /dev/null 91 | fi 92 | 93 | ( startgroup "Final checks" ) 2> /dev/null 94 | 95 | touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}" -------------------------------------------------------------------------------- /.scripts/run_osx_build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # -*- mode: jinja-shell -*- 4 | 5 | source .scripts/logging_utils.sh 6 | 7 | set -xe 8 | 9 | MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3} 10 | 11 | ( startgroup "Installing a fresh version of Miniforge" ) 2> /dev/null 12 | 13 | MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" 14 | MINIFORGE_FILE="Mambaforge-MacOSX-$(uname -m).sh" 15 | curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}" 16 | rm -rf ${MINIFORGE_HOME} 17 | bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} 18 | 19 | ( endgroup "Installing a fresh version of Miniforge" ) 2> /dev/null 20 | 21 | ( startgroup "Configuring conda" ) 2> /dev/null 22 | 23 | source ${MINIFORGE_HOME}/etc/profile.d/conda.sh 24 | conda activate base 25 | export CONDA_SOLVER="libmamba" 26 | export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 27 | 28 | mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \ 29 | pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" 30 | mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ 31 | pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" 32 | 33 | 34 | 35 | echo -e "\n\nSetting up the condarc and mangling the compiler." 36 | setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml 37 | 38 | if [[ "${CI:-}" != "" ]]; then 39 | mangle_compiler ./ ./recipe .ci_support/${CONFIG}.yaml 40 | fi 41 | 42 | if [[ "${CI:-}" != "" ]]; then 43 | echo -e "\n\nMangling homebrew in the CI to avoid conflicts." 44 | /usr/bin/sudo mangle_homebrew 45 | /usr/bin/sudo -k 46 | else 47 | echo -e "\n\nNot mangling homebrew as we are not running in CI" 48 | fi 49 | 50 | if [[ "${sha:-}" == "" ]]; then 51 | sha=$(git rev-parse HEAD) 52 | fi 53 | 54 | echo -e "\n\nRunning the build setup script." 55 | source run_conda_forge_build_setup 56 | 57 | 58 | 59 | ( endgroup "Configuring conda" ) 2> /dev/null 60 | 61 | echo -e "\n\nMaking the build clobber file" 62 | make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml 63 | 64 | if [[ -f LICENSE.txt ]]; then 65 | cp LICENSE.txt "recipe/recipe-scripts-license.txt" 66 | fi 67 | 68 | if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then 69 | if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then 70 | EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" 71 | fi 72 | conda debug ./recipe -m ./.ci_support/${CONFIG}.yaml \ 73 | ${EXTRA_CB_OPTIONS:-} \ 74 | --clobber-file ./.ci_support/clobber_${CONFIG}.yaml 75 | 76 | # Drop into an interactive shell 77 | /bin/bash 78 | else 79 | 80 | conda-build ./recipe -m ./.ci_support/${CONFIG}.yaml \ 81 | --suppress-variables ${EXTRA_CB_OPTIONS:-} \ 82 | --clobber-file ./.ci_support/clobber_${CONFIG}.yaml \ 83 | --extra-meta flow_run_id="$flow_run_id" remote_url="$remote_url" sha="$sha" 84 | 85 | ( startgroup "Inspecting artifacts" ) 2> /dev/null 86 | 87 | # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 88 | command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" 89 | 90 | ( endgroup "Inspecting artifacts" ) 2> /dev/null 91 | ( startgroup "Validating outputs" ) 2> /dev/null 92 | 93 | validate_recipe_outputs "${FEEDSTOCK_NAME}" 94 | 95 | ( endgroup "Validating outputs" ) 2> /dev/null 96 | 97 | ( startgroup "Uploading packages" ) 2> /dev/null 98 | 99 | if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then 100 | upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml 101 | fi 102 | 103 | ( endgroup "Uploading packages" ) 2> /dev/null 104 | fi -------------------------------------------------------------------------------- /.scripts/run_win_build.bat: -------------------------------------------------------------------------------- 1 | :: PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here 2 | :: will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent 3 | :: changes to this script, consider a proposal to conda-smithy so that other feedstocks can also 4 | :: benefit from the improvement. 5 | 6 | :: Note: we assume a Miniforge installation is available 7 | 8 | :: INPUTS (required environment variables) 9 | :: CONFIG: name of the .ci_support/*.yaml file for this job 10 | :: CI: azure, github_actions, or unset 11 | :: UPLOAD_PACKAGES: true or false 12 | :: UPLOAD_ON_BRANCH: true or false 13 | 14 | setlocal enableextensions enabledelayedexpansion 15 | 16 | call :start_group "Configuring conda" 17 | 18 | :: Activate the base conda environment 19 | call activate base 20 | :: Configure the solver 21 | set "CONDA_SOLVER=libmamba" 22 | if !errorlevel! neq 0 exit /b !errorlevel! 23 | set "CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1" 24 | 25 | :: Provision the necessary dependencies to build the recipe later 26 | echo Installing dependencies 27 | mamba.exe install "python=3.10" pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" -c conda-forge --strict-channel-priority --yes 28 | if !errorlevel! neq 0 exit /b !errorlevel! 29 | 30 | :: Set basic configuration 31 | echo Setting up configuration 32 | setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml 33 | if !errorlevel! neq 0 exit /b !errorlevel! 34 | echo Running build setup 35 | CALL run_conda_forge_build_setup 36 | 37 | 38 | if !errorlevel! neq 0 exit /b !errorlevel! 39 | 40 | if EXIST LICENSE.txt ( 41 | echo Copying feedstock license 42 | copy LICENSE.txt "recipe\\recipe-scripts-license.txt" 43 | ) 44 | 45 | if NOT [%flow_run_id%] == [] ( 46 | set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --extra-meta flow_run_id=%flow_run_id% remote_url=%remote_url% sha=%sha%" 47 | ) 48 | 49 | call :end_group 50 | 51 | :: Build the recipe 52 | echo Building recipe 53 | conda-build.exe "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% 54 | if !errorlevel! neq 0 exit /b !errorlevel! 55 | 56 | call :start_group "Inspecting artifacts" 57 | :: inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 58 | WHERE inspect_artifacts >nul 2>nul && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" 59 | call :end_group 60 | 61 | :: Prepare some environment variables for the upload step 62 | if /i "%CI%" == "github_actions" ( 63 | set "FEEDSTOCK_NAME=%GITHUB_REPOSITORY:*/=%" 64 | set "GIT_BRANCH=%GITHUB_REF:refs/heads/=%" 65 | if /i "%GITHUB_EVENT_NAME%" == "pull_request" ( 66 | set "IS_PR_BUILD=True" 67 | ) else ( 68 | set "IS_PR_BUILD=False" 69 | ) 70 | set "TEMP=%RUNNER_TEMP%" 71 | ) 72 | if /i "%CI%" == "azure" ( 73 | set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" 74 | set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" 75 | if /i "%BUILD_REASON%" == "PullRequest" ( 76 | set "IS_PR_BUILD=True" 77 | ) else ( 78 | set "IS_PR_BUILD=False" 79 | ) 80 | set "TEMP=%UPLOAD_TEMP%" 81 | ) 82 | 83 | :: Validate 84 | call :start_group "Validating outputs" 85 | validate_recipe_outputs "%FEEDSTOCK_NAME%" 86 | if !errorlevel! neq 0 exit /b !errorlevel! 87 | call :end_group 88 | 89 | if /i "%UPLOAD_PACKAGES%" == "true" ( 90 | if /i "%IS_PR_BUILD%" == "false" ( 91 | call :start_group "Uploading packages" 92 | if not exist "%TEMP%\" md "%TEMP%" 93 | set "TMP=%TEMP%" 94 | upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml 95 | if !errorlevel! neq 0 exit /b !errorlevel! 96 | call :end_group 97 | ) 98 | ) 99 | 100 | exit 101 | 102 | :: Logging subroutines 103 | 104 | :start_group 105 | if /i "%CI%" == "github_actions" ( 106 | echo ::group::%~1 107 | exit /b 108 | ) 109 | if /i "%CI%" == "azure" ( 110 | echo ##[group]%~1 111 | exit /b 112 | ) 113 | echo %~1 114 | exit /b 115 | 116 | :end_group 117 | if /i "%CI%" == "github_actions" ( 118 | echo ::endgroup:: 119 | exit /b 120 | ) 121 | if /i "%CI%" == "azure" ( 122 | echo ##[endgroup] 123 | exit /b 124 | ) 125 | exit /b -------------------------------------------------------------------------------- /.scripts/run_docker_build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here 4 | # will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent 5 | # changes to this script, consider a proposal to conda-smithy so that other feedstocks can also 6 | # benefit from the improvement. 7 | 8 | source .scripts/logging_utils.sh 9 | 10 | ( startgroup "Configure Docker" ) 2> /dev/null 11 | 12 | set -xeo pipefail 13 | 14 | THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" 15 | PROVIDER_DIR="$(basename $THISDIR)" 16 | 17 | FEEDSTOCK_ROOT="$( cd "$( dirname "$0" )/.." >/dev/null && pwd )" 18 | RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" 19 | 20 | if [ -z ${FEEDSTOCK_NAME} ]; then 21 | export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) 22 | fi 23 | 24 | if [[ "${sha:-}" == "" ]]; then 25 | pushd "${FEEDSTOCK_ROOT}" 26 | sha=$(git rev-parse HEAD) 27 | popd 28 | fi 29 | 30 | docker info 31 | 32 | # In order for the conda-build process in the container to write to the mounted 33 | # volumes, we need to run with the same id as the host machine, which is 34 | # normally the owner of the mounted volumes, or at least has write permission 35 | export HOST_USER_ID=$(id -u) 36 | # Check if docker-machine is being used (normally on OSX) and get the uid from 37 | # the VM 38 | if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then 39 | export HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u) 40 | fi 41 | 42 | ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts" 43 | 44 | if [ -z "$CONFIG" ]; then 45 | set +x 46 | FILES=`ls .ci_support/linux_*` 47 | CONFIGS="" 48 | for file in $FILES; do 49 | CONFIGS="${CONFIGS}'${file:12:-5}' or "; 50 | done 51 | echo "Need to set CONFIG env variable. Value can be one of ${CONFIGS:0:-4}" 52 | exit 1 53 | fi 54 | 55 | if [ -z "${DOCKER_IMAGE}" ]; then 56 | SHYAML_INSTALLED="$(shyaml -h || echo NO)" 57 | if [ "${SHYAML_INSTALLED}" == "NO" ]; then 58 | echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Trying to parse with coreutils" 59 | DOCKER_IMAGE=$(cat .ci_support/${CONFIG}.yaml | grep '^docker_image:$' -A 1 | tail -n 1 | cut -b 3-) 60 | if [ "${DOCKER_IMAGE}" = "" ]; then 61 | echo "No docker_image entry found in ${CONFIG}. Falling back to quay.io/condaforge/linux-anvil-comp7" 62 | DOCKER_IMAGE="quay.io/condaforge/linux-anvil-comp7" 63 | fi 64 | else 65 | DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 quay.io/condaforge/linux-anvil-comp7 )" 66 | fi 67 | fi 68 | 69 | mkdir -p "$ARTIFACTS" 70 | DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}" 71 | rm -f "$DONE_CANARY" 72 | 73 | # Allow people to specify extra default arguments to `docker run` (e.g. `--rm`) 74 | DOCKER_RUN_ARGS="${CONDA_FORGE_DOCKER_RUN_ARGS}" 75 | if [ -z "${CI}" ]; then 76 | DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" 77 | fi 78 | 79 | ( endgroup "Configure Docker" ) 2> /dev/null 80 | 81 | ( startgroup "Start Docker" ) 2> /dev/null 82 | 83 | export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" 84 | export IS_PR_BUILD="${IS_PR_BUILD:-False}" 85 | docker pull "${DOCKER_IMAGE}" 86 | docker run ${DOCKER_RUN_ARGS} \ 87 | -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ 88 | -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ 89 | -e CONFIG \ 90 | -e HOST_USER_ID \ 91 | -e UPLOAD_PACKAGES \ 92 | -e IS_PR_BUILD \ 93 | -e GIT_BRANCH \ 94 | -e UPLOAD_ON_BRANCH \ 95 | -e CI \ 96 | -e FEEDSTOCK_NAME \ 97 | -e CPU_COUNT \ 98 | -e BUILD_WITH_CONDA_DEBUG \ 99 | -e BUILD_OUTPUT_ID \ 100 | -e flow_run_id \ 101 | -e remote_url \ 102 | -e sha \ 103 | -e BINSTAR_TOKEN \ 104 | -e FEEDSTOCK_TOKEN \ 105 | -e STAGING_BINSTAR_TOKEN \ 106 | "${DOCKER_IMAGE}" \ 107 | bash \ 108 | "/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh" 109 | 110 | # verify that the end of the script was reached 111 | test -f "$DONE_CANARY" 112 | 113 | # This closes the last group opened in `build_steps.sh` 114 | ( endgroup "Final checks" ) 2> /dev/null -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | About medpy-feedstock 2 | ===================== 3 | 4 | Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/medpy-feedstock/blob/main/LICENSE.txt) 5 | 6 | Home: https://github.com/loli/medpy 7 | 8 | Package license: GPL-2.0-or-later 9 | 10 | Summary: Medical image processing in Python 11 | 12 | Development: http://loli.github.io/medpy/installation/developmentmode.html 13 | 14 | Documentation: http://loli.github.io/medpy/ 15 | 16 | Current build status 17 | ==================== 18 | 19 | 20 | 21 | 22 | 23 | 24 | 136 | 137 |
Azure 25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 40 | 41 | 42 | 47 | 48 | 49 | 54 | 55 | 56 | 61 | 62 | 63 | 68 | 69 | 70 | 75 | 76 | 77 | 82 | 83 | 84 | 89 | 90 | 91 | 96 | 97 | 98 | 103 | 104 | 105 | 110 | 111 | 112 | 117 | 118 | 119 | 124 | 125 | 126 | 131 | 132 | 133 |
VariantStatus
linux_64_python3.10.____cpython 36 | 37 | variant 38 | 39 |
linux_64_python3.11.____cpython 43 | 44 | variant 45 | 46 |
linux_64_python3.12.____cpython 50 | 51 | variant 52 | 53 |
linux_64_python3.8.____cpython 57 | 58 | variant 59 | 60 |
linux_64_python3.9.____cpython 64 | 65 | variant 66 | 67 |
osx_64_python3.10.____cpython 71 | 72 | variant 73 | 74 |
osx_64_python3.11.____cpython 78 | 79 | variant 80 | 81 |
osx_64_python3.12.____cpython 85 | 86 | variant 87 | 88 |
osx_64_python3.8.____cpython 92 | 93 | variant 94 | 95 |
osx_64_python3.9.____cpython 99 | 100 | variant 101 | 102 |
win_64_python3.10.____cpython 106 | 107 | variant 108 | 109 |
win_64_python3.11.____cpython 113 | 114 | variant 115 | 116 |
win_64_python3.12.____cpython 120 | 121 | variant 122 | 123 |
win_64_python3.9.____cpython 127 | 128 | variant 129 | 130 |
134 |
135 |
138 | 139 | Current release info 140 | ==================== 141 | 142 | | Name | Downloads | Version | Platforms | 143 | | --- | --- | --- | --- | 144 | | [![Conda Recipe](https://img.shields.io/badge/recipe-medpy-green.svg)](https://anaconda.org/conda-forge/medpy) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/medpy.svg)](https://anaconda.org/conda-forge/medpy) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/medpy.svg)](https://anaconda.org/conda-forge/medpy) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/medpy.svg)](https://anaconda.org/conda-forge/medpy) | 145 | 146 | Installing medpy 147 | ================ 148 | 149 | Installing `medpy` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with: 150 | 151 | ``` 152 | conda config --add channels conda-forge 153 | conda config --set channel_priority strict 154 | ``` 155 | 156 | Once the `conda-forge` channel has been enabled, `medpy` can be installed with `conda`: 157 | 158 | ``` 159 | conda install medpy 160 | ``` 161 | 162 | or with `mamba`: 163 | 164 | ``` 165 | mamba install medpy 166 | ``` 167 | 168 | It is possible to list all of the versions of `medpy` available on your platform with `conda`: 169 | 170 | ``` 171 | conda search medpy --channel conda-forge 172 | ``` 173 | 174 | or with `mamba`: 175 | 176 | ``` 177 | mamba search medpy --channel conda-forge 178 | ``` 179 | 180 | Alternatively, `mamba repoquery` may provide more information: 181 | 182 | ``` 183 | # Search all versions available on your platform: 184 | mamba repoquery search medpy --channel conda-forge 185 | 186 | # List packages depending on `medpy`: 187 | mamba repoquery whoneeds medpy --channel conda-forge 188 | 189 | # List dependencies of `medpy`: 190 | mamba repoquery depends medpy --channel conda-forge 191 | ``` 192 | 193 | 194 | About conda-forge 195 | ================= 196 | 197 | [![Powered by 198 | NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https://numfocus.org) 199 | 200 | conda-forge is a community-led conda channel of installable packages. 201 | In order to provide high-quality builds, the process has been automated into the 202 | conda-forge GitHub organization. The conda-forge organization contains one repository 203 | for each of the installable packages. Such a repository is known as a *feedstock*. 204 | 205 | A feedstock is made up of a conda recipe (the instructions on what and how to build 206 | the package) and the necessary configurations for automatic building using freely 207 | available continuous integration services. Thanks to the awesome service provided by 208 | [Azure](https://azure.microsoft.com/en-us/services/devops/), [GitHub](https://github.com/), 209 | [CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/), 210 | [Drone](https://cloud.drone.io/welcome), and [TravisCI](https://travis-ci.com/) 211 | it is possible to build and upload installable packages to the 212 | [conda-forge](https://anaconda.org/conda-forge) [anaconda.org](https://anaconda.org/) 213 | channel for Linux, Windows and OSX respectively. 214 | 215 | To manage the continuous integration and simplify feedstock maintenance 216 | [conda-smithy](https://github.com/conda-forge/conda-smithy) has been developed. 217 | Using the ``conda-forge.yml`` within this repository, it is possible to re-render all of 218 | this feedstock's supporting files (e.g. the CI configuration files) with ``conda smithy rerender``. 219 | 220 | For more information please check the [conda-forge documentation](https://conda-forge.org/docs/). 221 | 222 | Terminology 223 | =========== 224 | 225 | **feedstock** - the conda recipe (raw material), supporting scripts and CI configuration. 226 | 227 | **conda-smithy** - the tool which helps orchestrate the feedstock. 228 | Its primary use is in the construction of the CI ``.yml`` files 229 | and simplify the management of *many* feedstocks. 230 | 231 | **conda-forge** - the place where the feedstock and smithy live and work to 232 | produce the finished article (built conda distributions) 233 | 234 | 235 | Updating medpy-feedstock 236 | ======================== 237 | 238 | If you would like to improve the medpy recipe or build a new 239 | package version, please fork this repository and submit a PR. Upon submission, 240 | your changes will be run on the appropriate platforms to give the reviewer an 241 | opportunity to confirm that the changes result in a successful build. Once 242 | merged, the recipe will be re-built and uploaded automatically to the 243 | `conda-forge` channel, whereupon the built conda packages will be available for 244 | everybody to install and use from the `conda-forge` channel. 245 | Note that all branches in the conda-forge/medpy-feedstock are 246 | immediately built and any created packages are uploaded, so PRs should be based 247 | on branches in forks and branches in the main repository should only be used to 248 | build distinct package versions. 249 | 250 | In order to produce a uniquely identifiable distribution: 251 | * If the version of a package **is not** being increased, please add or increase 252 | the [``build/number``](https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#build-number-and-string). 253 | * If the version of a package **is** being increased, please remember to return 254 | the [``build/number``](https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#build-number-and-string) 255 | back to 0. 256 | 257 | Feedstock Maintainers 258 | ===================== 259 | 260 | * [@loli](https://github.com/loli/) 261 | * [@sarthakpati](https://github.com/sarthakpati/) 262 | 263 | --------------------------------------------------------------------------------