diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 88fd9c1..8a0bcae 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -16,45 +16,27 @@ jobs: CONDA_BLD_PATH: D:\\bld\\ steps: - - script: | - choco install vcpython27 -fdv -y --debug - condition: contains(variables['CONFIG'], 'vs2008') - displayName: Install vcpython27.msi (if needed) - - # Cygwin's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.) - # - script: rmdir C:\cygwin /s /q - # continueOnError: true - - - powershell: | - Set-PSDebug -Trace 1 - - $batchcontent = @" - ECHO ON - SET vcpython=C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0 - - DIR "%vcpython%" - - CALL "%vcpython%\vcvarsall.bat" %* - "@ - - $batchDir = "C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0\VC" - $batchPath = "$batchDir" + "\vcvarsall.bat" - New-Item -Path $batchPath -ItemType "file" -Force - - Set-Content -Value $batchcontent -Path $batchPath + - task: PythonScript@0 + displayName: 'Download Miniforge' + inputs: + scriptSource: inline + script: | + import urllib.request + url = 'https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Windows-x86_64.exe' + path = r"$(Build.ArtifactStagingDirectory)/Miniforge.exe" + urllib.request.urlretrieve(url, path) - Get-ChildItem -Path $batchDir + - script: | + start /wait "" %BUILD_ARTIFACTSTAGINGDIRECTORY%\Miniforge.exe /InstallationType=JustMe /RegisterPython=0 /S /D=C:\Miniforge + displayName: Install Miniforge - Get-ChildItem -Path ($batchDir + '\..') + - powershell: Write-Host "##vso[task.prependpath]C:\Miniforge\Scripts" + displayName: Add conda to PATH - condition: contains(variables['CONFIG'], 'vs2008') - displayName: Patch vs2008 (if needed) - - task: CondaEnvironment@1 - inputs: - packageSpecs: 'python=3.9 conda-build conda pip boa conda-forge-ci-setup=3' # Optional - installOptions: "-c conda-forge" - updateConda: true - displayName: Install conda-build and activate environment + - script: | + call activate base + mamba.exe install 'python=3.9' conda-build conda pip boa 'conda-forge-ci-setup=3' -c conda-forge --strict-channel-priority --yes + displayName: Install conda-build - script: set PYTHONUNBUFFERED=1 displayName: Set PYTHONUNBUFFERED @@ -71,25 +53,16 @@ jobs: call activate base run_conda_forge_build_setup displayName: conda-forge build setup - - - # Special cased version setting some more things! - - script: | - call activate base - conda.exe build "recipe" -m .ci_support\%CONFIG%.yaml - displayName: Build recipe (vs2008) - env: - VS90COMNTOOLS: "C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\bin" - PYTHONUNBUFFERED: 1 - condition: contains(variables['CONFIG'], 'vs2008') - script: | call activate base + if EXIST LICENSE.txt ( + copy LICENSE.txt "recipe\\recipe-scripts-license.txt" + ) conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables displayName: Build recipe env: PYTHONUNBUFFERED: 1 - condition: not(contains(variables['CONFIG'], 'vs2008')) - script: | set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" call activate base diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 4644417..24fcc12 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -17,8 +17,8 @@ docker_image: numpy: - '1.21' - '1.19' -- '1.18' -- '1.18' +- '1.19' +- '1.19' - '1.19' pin_run_as_build: python: diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml index 6fc76e7..69de33f 100644 --- a/.ci_support/linux_aarch64_.yaml +++ b/.ci_support/linux_aarch64_.yaml @@ -21,8 +21,8 @@ docker_image: numpy: - '1.21' - '1.19' -- '1.18' -- '1.18' +- '1.19' +- '1.19' - '1.19' pin_run_as_build: python: diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml index 0e833c5..be6d1d4 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_.yaml @@ -17,8 +17,8 @@ docker_image: numpy: - '1.21' - '1.19' -- '1.18' -- '1.18' +- '1.19' +- '1.19' - '1.19' pin_run_as_build: python: diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 0456bc8..f16f21e 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -3,7 +3,7 @@ MACOSX_DEPLOYMENT_TARGET: c_compiler: - clang c_compiler_version: -- '12' +- '13' channel_sources: - conda-forge channel_targets: @@ -11,14 +11,14 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '12' +- '13' macos_machine: - x86_64-apple-darwin13.4.0 numpy: - '1.21' - '1.19' -- '1.18' -- '1.18' +- '1.19' +- '1.19' - '1.19' pin_run_as_build: python: diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml index 4ad887b..25dfe0d 100644 --- a/.ci_support/win_64_.yaml +++ b/.ci_support/win_64_.yaml @@ -8,8 +8,8 @@ cxx_compiler: - vs2019 numpy: - '1.21' -- '1.18' -- '1.18' +- '1.19' +- '1.19' - '1.19' pin_run_as_build: python: diff --git a/.circleci/config.yml b/.circleci/config.yml index 6ad461b..3e61aa2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,8 @@ version: 2 jobs: build: working_directory: ~/test - machine: true + machine: + image: ubuntu-2004:current steps: - run: # The Circle-CI build should not be active, but if this is not true for some reason, do a fast finish. diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index d71d6ae..595f8b5 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -24,7 +24,10 @@ export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" cat >~/.condarc < /dev/null +if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then + cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" +fi + if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 19843e0..07de621 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -57,6 +57,10 @@ echo -e "\n\nMaking the build clobber file" make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml +if [[ -f LICENSE.txt ]]; then + cp LICENSE.txt "recipe/recipe-scripts-license.txt" +fi + if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" diff --git a/LICENSE.txt b/LICENSE.txt index 6ec1401..2ec51d7 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,13 +1,27 @@ -BSD 3-clause license +BSD-3-Clause license Copyright (c) 2015-2022, conda-forge contributors All rights reserved. -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/README.md b/README.md index 5f8e979..95dba11 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Home: https://github.com/artivis/manif Package license: MIT -Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/manif-feedstock/blob/master/LICENSE.txt) +Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/manif-feedstock/blob/main/LICENSE.txt) Summary: A small C++11 header-only library (with Python bindings) for Lie theory. @@ -20,8 +20,8 @@ Current build status
- - + + @@ -29,36 +29,36 @@ Current build status @@ -87,18 +87,43 @@ conda config --add channels conda-forge conda config --set channel_priority strict ``` -Once the `conda-forge` channel has been enabled, `manif, manifpy` can be installed with: +Once the `conda-forge` channel has been enabled, `manif, manifpy` can be installed with `conda`: ``` conda install manif manifpy ``` -It is possible to list all of the versions of `manif` available on your platform with: +or with `mamba`: + +``` +mamba install manif manifpy +``` + +It is possible to list all of the versions of `manif` available on your platform with `conda`: ``` conda search manif --channel conda-forge ``` +or with `mamba`: + +``` +mamba search manif --channel conda-forge +``` + +Alternatively, `mamba repoquery` may provide more information: + +``` +# Search all versions available on your platform: +mamba repoquery search manif --channel conda-forge + +# List packages depending on `manif`: +mamba repoquery whoneeds manif --channel conda-forge + +# List dependencies of `manif`: +mamba repoquery depends manif --channel conda-forge +``` + About conda-forge ================= @@ -114,10 +139,12 @@ for each of the installable packages. Such a repository is known as a *feedstock A feedstock is made up of a conda recipe (the instructions on what and how to build the package) and the necessary configurations for automatic building using freely available continuous integration services. Thanks to the awesome service provided by -[CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/) -and [TravisCI](https://travis-ci.com/) it is possible to build and upload installable -packages to the [conda-forge](https://anaconda.org/conda-forge) -[Anaconda-Cloud](https://anaconda.org/) channel for Linux, Windows and OSX respectively. +[Azure](https://azure.microsoft.com/en-us/services/devops/), [GitHub](https://github.com/), +[CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/), +[Drone](https://cloud.drone.io/welcome), and [TravisCI](https://travis-ci.com/) +it is possible to build and upload installable packages to the +[conda-forge](https://anaconda.org/conda-forge) [Anaconda-Cloud](https://anaconda.org/) +channel for Linux, Windows and OSX respectively. To manage the continuous integration and simplify feedstock maintenance [conda-smithy](https://github.com/conda-forge/conda-smithy) has been developed. diff --git a/build-locally.py b/build-locally.py index eec38a0..3f4b7a7 100755 --- a/build-locally.py +++ b/build-locally.py @@ -86,12 +86,19 @@ def main(args=None): verify_config(ns) setup_environment(ns) - if ns.config.startswith("linux") or ( - ns.config.startswith("osx") and platform.system() == "Linux" - ): - run_docker_build(ns) - elif ns.config.startswith("osx"): - run_osx_build(ns) + try: + if ns.config.startswith("linux") or ( + ns.config.startswith("osx") and platform.system() == "Linux" + ): + run_docker_build(ns) + elif ns.config.startswith("osx"): + run_osx_build(ns) + finally: + recipe_license_file = os.path.join( + "recipe", "recipe-scripts-license.txt" + ) + if os.path.exists(recipe_license_file): + os.remove(recipe_license_file) if __name__ == "__main__": diff --git a/conda-forge.yml b/conda-forge.yml index 22042dd..365f2e0 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -3,9 +3,12 @@ azure: pool: vmImage: windows-2019 conda_forge_output_validation: true +build_platform: + linux_aarch64: linux_aarch64 + linux_ppc64le: linux_ppc64le provider: - linux_aarch64: default - linux_ppc64le: default + linux_aarch64: azure + linux_ppc64le: azure github: branch_name: main tooling_branch_name: main diff --git a/recipe/248.patch b/recipe/248.patch new file mode 100644 index 0000000..0b8f1d9 --- /dev/null +++ b/recipe/248.patch @@ -0,0 +1,21 @@ +From 6e43be2e11295dca1ec0f00c8bfa52778414a00b Mon Sep 17 00:00:00 2001 +From: Silvio Traversaro +Date: Tue, 28 Jun 2022 16:49:49 +0200 +Subject: [PATCH] Add missing include in impl/macro.h header + +--- + include/manif/impl/macro.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/manif/impl/macro.h b/include/manif/impl/macro.h +index 87f2913b..5d5fa8ff 100644 +--- a/include/manif/impl/macro.h ++++ b/include/manif/impl/macro.h +@@ -2,6 +2,7 @@ + #define _MANIF_MANIF_FWD_H_ + + #include // for std::runtime_error ++#include // for std::forward + + #ifdef NDEBUG + # ifndef MANIF_NO_DEBUG diff --git a/recipe/bld_cxx.bat b/recipe/bld_cxx.bat index 9709466..c80e2ba 100644 --- a/recipe/bld_cxx.bat +++ b/recipe/bld_cxx.bat @@ -2,7 +2,7 @@ mkdir build cd build cmake ^ - -G "NMake Makefiles" ^ + -G "Ninja" ^ -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ -DCMAKE_BUILD_TYPE=Release ^ -DBUILD_TESTING=OFF ^ diff --git a/recipe/bld_py.bat b/recipe/bld_py.bat index f6a9cbb..8e84718 100644 --- a/recipe/bld_py.bat +++ b/recipe/bld_py.bat @@ -10,7 +10,7 @@ cd build%CONDA_PY% :: Python bindings are installed outside CMAKE_INSTALL_PREFIX via the :: DETECT_ACTIVE_PYTHON_SITEPACKAGES option cmake ^ - -G "NMake Makefiles" ^ + -G "Ninja" ^ -DCMAKE_INSTALL_PREFIX=.\install ^ -DCMAKE_BUILD_TYPE=Release ^ -DBUILD_TESTING=OFF ^ diff --git a/recipe/build_cxx.sh b/recipe/build_cxx.sh index f9971bb..b0fc316 100644 --- a/recipe/build_cxx.sh +++ b/recipe/build_cxx.sh @@ -1,18 +1,27 @@ #!/bin/sh +if [[ ${target_platform} == "linux-ppc64le" || ${target_platform} == "linux-aarch64" ]]; then + export BUILD_EXAMPLES=OFF +else + export BUILD_EXAMPLES=ON +fi + mkdir build cd build -cmake .. \ +cmake -GNinja .. \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_TESTING=OFF \ - -DBUILD_EXAMPLES=ON \ + -DBUILD_EXAMPLES=${BUILD_EXAMPLES} \ -DUSE_SYSTEM_WIDE_TL_OPTIONAL=ON cmake --build . --config Release cmake --build . --config Release --target install -# Test suppressed as a workaround for https://github.com/conda-forge/staged-recipes/pull/14142#issuecomment-789047770 -# and https://github.com/conda-forge/manif-feedstock/pull/1#issuecomment-861226265 -ctest --output-on-failure -C Release -E "gtest_se2_tangent|gtest_se2_tangent_map|gtest_se2" + +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" != "1" || "${CROSSCOMPILING_EMULATOR}" != "" ]]; then + # Test suppressed as a workaround for https://github.com/conda-forge/staged-recipes/pull/14142#issuecomment-789047770 + # and https://github.com/conda-forge/manif-feedstock/pull/1#issuecomment-861226265 + ctest --output-on-failure -C Release -E "gtest_se2_tangent|gtest_se2_tangent_map|gtest_se2" +fi diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 9590d11..dc86b70 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -11,9 +11,10 @@ source: patches: - 236.patch - 233.patch # [win] + - 248.patch build: - number: 7 + number: 8 outputs: - name: manif @@ -23,7 +24,7 @@ outputs: build: - {{ compiler('c') }} - {{ compiler('cxx') }} - - make # [not win] + - ninja - cmake host: - eigen @@ -52,7 +53,9 @@ outputs: - python # [build_platform != target_platform] - cross-python_{{ target_platform }} # [build_platform != target_platform] - numpy # [build_platform != target_platform] - - clang # [win] + - clang 13 # [win] + - lld 13 # [win] + - llvm-tools 13 # [win] host: - eigen - tl-optional @@ -63,7 +66,7 @@ outputs: - pybind11-abi run: - python - - {{ pin_compatible('numpy') }} + - {{ pin_compatible('numpy', max_pin='x.x') }} test: imports: - manifpy
linux_64 - - variant + + variant
linux_aarch64 - - variant + + variant
linux_ppc64le - - variant + + variant
osx_64 - - variant + + variant
win_64 - - variant + + variant