From 44684d4757152d2ddb50751514e3cf00ed775f7e Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Thu, 19 Jan 2023 20:22:46 +1000 Subject: [PATCH] Fresh builds (#295) * Update conda_forge_pinnings.yaml * Update pinnings * Bump build numbers * Build requested packages * Fixup * No need for opencv pinning anymore * Old ogre for noetic * Sync with humble * Fix * Fix * Sync * full_rebuild=true * Update run_constraints * Fixup rviz patch * Update vinca_linux_aarch64.yaml * Update vinca_osx_arm64.yaml * Update vinca_win.yaml * pcl 1.12.1 * qt 5.15 * Fixup qt-main for linux * Add -DNOGDI to Windows build or RViz (#296) To avoid https://github.com/RoboStack/ros-noetic/pull/295#issuecomment-1281525978, see https://github.com/ros-industrial/abb_robot_driver/issues/17#issuecomment-1126020610 . * Bump jackal packages, use now released noetic packages instead of melodic ones * Add libcurl mapping * Update patches * Actually rebuild all packages * Additional mappings * Fix qt-gui-cpp issues * Fixup * Fixup again * Last remaining qt-gui-cpp fixes * Fix rviz on Linux, rtabmap does not currently work due to mismatched migrations re boost and vtk * Fixes for rviz * Progress toward rviz * rviz debug * rviz finally working locally * Fixup patch on win * doxygen wants dot (graphviz) * linux-64 complete now ;) * fixup robot-locatization win patch * Create ros-noetic-eigenpy.patch * Update ros-noetic-eigenpy.patch * Update ros-noetic-eigenpy.patch * Update ros-noetic-eigenpy.patch * Simplify find python stuff * only eigenpy at the moment on aarch for faster debug * Simplify find python stuff * Add move-base to osx-arm64 * Update conda_forge_pinnings.yaml * Update conda_build_config.yaml * Boost 1.78 * mirror ros-humble changes * Try and de-vendor eigenpy * Unconditionally use sip5 .. * Sync with humble * Prepare building on robostack-staging channel Co-authored-by: Silvio Traversaro --- .ci_support/conda_forge_pinnings.yaml | 470 ++- .github/testpr_environment.yml | 2 +- .github/workflows/main.yml | 52 +- .github/workflows/testpr.yml | 15 +- .gitignore | 3 +- .scripts/build_linux.sh | 4 +- .scripts/build_osx.sh | 5 +- .scripts/build_osx_arm64.sh | 5 +- .scripts/build_win.bat | 22 +- README.md | 15 +- .../ros-distro-mutex/recipe.yaml | 12 +- .../ros-noetic-eigenpy/recipe.yaml | 20 + .../ros-noetic-jackal-base/recipe.yaml | 6 +- .../ros-noetic-jackal-control/recipe.yaml | 6 +- .../ros-noetic-jackal-description/recipe.yaml | 6 +- .../ros-noetic-jackal-desktop/recipe.yaml | 4 +- .../ros-noetic-jackal-gazebo/recipe.yaml | 4 +- .../ros-noetic-jackal-msgs/recipe.yaml | 6 +- .../ros-noetic-jackal-navigation/recipe.yaml | 6 +- .../ros-noetic-jackal-simulator/recipe.yaml | 4 +- .../ros-noetic-jackal-viz/recipe.yaml | 4 +- conda.yaml | 115 +- conda_build_config.yaml | 39 +- env/robostackenv.yaml | 1 + patch/dependencies.yaml | 81 +- patch/ros-noetic-eigenpy.patch | 2837 +++++++++++++++++ patch/ros-noetic-libfranka.patch | 92 +- patch/ros-noetic-moveit-ros-move-group.patch | 13 - ...ros-noetic-moveit-ros-perception.osx.patch | 13 - ...oetic-moveit-ros-planning-interface.patch} | 30 +- ...os-noetic-moveit-setup-assistant.win.patch | 19 +- patch/ros-noetic-python-qt-binding.patch | 44 +- patch/ros-noetic-qt-gui-cpp.patch | 40 +- patch/ros-noetic-robot-localization.win.patch | 10 +- patch/ros-noetic-rtabmap.patch | 41 +- patch/ros-noetic-rviz.osx.patch | 20 +- patch/ros-noetic-rviz.patch | 56 +- patch/ros-noetic-twist-mux.patch | 53 - robostack.yaml | 115 +- vinca_linux_64.yaml | 142 +- vinca_linux_aarch64.yaml | 37 +- vinca_osx.yaml | 162 +- vinca_osx_arm64.yaml | 96 +- vinca_win.yaml | 35 +- 44 files changed, 3742 insertions(+), 1020 deletions(-) create mode 100644 additional_recipes/ros-noetic-eigenpy/recipe.yaml create mode 100644 patch/ros-noetic-eigenpy.patch delete mode 100644 patch/ros-noetic-moveit-ros-move-group.patch rename patch/{ros-noetic-moveit-ros-planning-interface.win.patch => ros-noetic-moveit-ros-planning-interface.patch} (74%) delete mode 100644 patch/ros-noetic-twist-mux.patch diff --git a/.ci_support/conda_forge_pinnings.yaml b/.ci_support/conda_forge_pinnings.yaml index 2d298e234..4a0ab28b4 100644 --- a/.ci_support/conda_forge_pinnings.yaml +++ b/.ci_support/conda_forge_pinnings.yaml @@ -7,40 +7,39 @@ cross_compiler_target_platform: # [win] c_compiler: - gcc # [linux] - clang # [osx] - - vs2017 # [win] + - vs2019 # [win] c_compiler_version: # [unix] - - 11 # [osx] - - 9 # [linux] + - 11 # [linux] + - 14 # [osx] - 7 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] - 9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] - - 9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] - - 9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] + - 10 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] + - 10 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] cxx_compiler: - gxx # [linux] - clangxx # [osx] - - vs2017 # [win] + - vs2019 # [win] cxx_compiler_version: # [unix] - - 11 # [osx] - - 9 # [linux] + - 11 # [linux] + - 14 # [osx] - 7 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] - 9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] - - 9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] - - 9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] + - 10 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] + - 10 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] llvm_openmp: # [osx] - - 11 # [osx] + - 14 # [osx] fortran_compiler: # [unix or win64] - gfortran # [linux64 or (osx and x86_64)] - gfortran # [aarch64 or ppc64le or armv7l or s390x] - flang # [win64] fortran_compiler_version: # [unix or win64] - - 11 # [osx and arm64] - - 9 # [osx and x86_64] - - 9 # [linux] + - 11 # [linux] + - 11 # [osx] - 5 # [win64] - 7 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] - 9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] - - 9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] - - 9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] + - 10 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] + - 10 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] m2w64_c_compiler: # [win] - m2w64-toolchain # [win] m2w64_cxx_compiler: # [win] @@ -50,14 +49,18 @@ m2w64_fortran_compiler: # [win] CMAKE_GENERATOR: # [win] - NMake Makefiles # [win] -cuda_compiler: # [linux64 or win] - - nvcc # [linux64 or win] +cuda_compiler: # [linux or win] + - nvcc # [linux or win] cuda_compiler_version: - None - 10.2 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - 11.0 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - 11.1 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - 11.2 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] +cuda_compiler_version_min: + - None # [osx] + - 10.2 # [linux64 or win] + - 11.2 # [linux and (ppc64le or aarch64)] cudnn: - undefined - 7 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] @@ -92,6 +95,8 @@ target_goos: - windows # [win] target_goarch: - amd64 # [x86_64] + - arm64 # [arm64 or aarch64] + - ppc64le # [ppc64le] target_goexe: - # [unix] - .exe # [win] @@ -125,13 +130,15 @@ channel_targets: - conda-forge main cdt_name: # [linux] - - cos7 # [linux64] + - cos6 # [linux64 and os.environ.get("DEFAULT_LINUX_VERSION", "cos6") == "cos6"] + - cos7 # [linux64 and os.environ.get("DEFAULT_LINUX_VERSION", "cos6") == "cos7"] - cos7 # [linux and aarch64] - cos7 # [linux and ppc64le] - cos7 # [linux and armv7l] - cos7 # [linux and s390x] - - cos7 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - cos6 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("DEFAULT_LINUX_VERSION", "cos6") == "cos6"] + - cos7 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("DEFAULT_LINUX_VERSION", "cos6") == "cos7"] - cos7 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - cos7 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - cos7 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] @@ -164,6 +171,7 @@ zip_keys: - numpy - python_impl + # aarch64 specifics because conda-build sets many things to centos 6 # this can probably be removed when conda-build gets updated defaults # for aarch64 @@ -176,221 +184,109 @@ BUILD: aarch64-conda_cos7-linux-gnu # [aarch64] cdt_arch: armv7l # [armv7l] BUILD: armv7-conda_cos7-linux-gnueabihf # [armv7l] -# TODO: remove these when run_exports are added to the packages. pin_run_as_build: - arpack: - max_pin: x.x.x + # boost is special, see https://github.com/conda-forge/boost-cpp-feedstock/pull/82 boost: max_pin: x.x.x boost-cpp: max_pin: x.x.x - bzip2: - max_pin: x - cairo: - max_pin: x.x - curl: - max_pin: x - dbus: - max_pin: x - fftw: - max_pin: x + # TODO: add run_exports to the following feedstocks flann: max_pin: x.x.x - fontconfig: - max_pin: x - freetype: - max_pin: x - gdal: - max_pin: x.x - geotiff: - max_pin: x.x.x - glew: - max_pin: x.x - glpk: - max_pin: x.x - gmp: - max_pin: x graphviz: max_pin: x - harfbuzz: - max_pin: x - hdf4: - max_pin: x.x - isl: - max_pin: x.x - jasper: - max_pin: x - jpeg: - max_pin: x - libjpeg_turbo: - max_pin: x - json-c: - max_pin: x.x - jsoncpp: - max_pin: x.x.x - kealib: - max_pin: x.x - krb5: - max_pin: x.x - libblitz: - max_pin: x.x - libcurl: - max_pin: x - libevent: - max_pin: x.x.x - libffi: - max_pin: x.x - libgdal: - max_pin: x.x - libiconv: - max_pin: x.x - libkml: - max_pin: x.x - libpng: - max_pin: x.x - librsvg: - max_pin: x libsvm: - max_pin: x.x - libtiff: - max_pin: x - libxml2: - max_pin: x.x - libuuid: - max_pin: x - lz4-c: - max_pin: x.x.x - lzo: - max_pin: x - metis: - max_pin: x.x - mpfr: max_pin: x netcdf-cxx4: max_pin: x.x - netcdf-fortran: - max_pin: x.x - nettle: - max_pin: x.x - nlopt: - max_pin: x.x.x - nss: - max_pin: x - nspr: - max_pin: x occt: max_pin: x.x - openturns: - max_pin: x.x - openjpeg: - max_pin: x.x - pango: - max_pin: x.x poppler: max_pin: x.x - qt: - max_pin: x.x - qtkeychain: - max_pin: x.x - readline: - max_pin: x r-base: max_pin: x.x min_pin: x.x - sox: - max_pin: x.x.x - sqlite: - max_pin: x - tk: - max_pin: x.x - tiledb: - max_pin: x.x vlfeat: max_pin: x.x.x - vtk: - max_pin: x.x.x - xz: - max_pin: x.x - zeromq: - max_pin: x.x # [not win] - max_pin: x.x.x # [win] - zlib: - max_pin: x.x # Pinning packages # blas libblas: - - 3.8 *netlib # [not (osx and arm64)] - - 3.9 *netlib # [osx and arm64] + - 3.9 *netlib libcblas: - - 3.8 *netlib # [not (osx and arm64)] - - 3.9 *netlib # [osx and arm64] + - 3.9 *netlib liblapack: - - 3.8 *netlib # [not (osx and arm64)] - - 3.9 *netlib # [osx and arm64] + - 3.9 *netlib liblapacke: - - 3.8 *netlib # [not (osx and arm64)] - - 3.9 *netlib # [osx and arm64] + - 3.9 *netlib blas_impl: - openblas - mkl # [x86 or x86_64] - blis # [x86 or x86_64] +# keep in sync with libabseil{,_static} abseil_cpp: - - '20210324.2' + - '20220623.0' alsa_lib: - - 1.2.3 + - 1.2.8 antic: - 0.2 +aom: + - 3.5 arb: - - '2.21' + - '2.23' arpack: - 3.7 arrow_cpp: - - 6.0.1 - - 5.0.0 - - 4.0.1 + - 9.0.0 + - 8.0.1 + - 7.0.1 + - 6.0.2 assimp: - - 5.2 + - 5.2.4 +attr: + - 2.5 aws_c_auth: - - 0.6.10 + - 0.6.21 aws_c_cal: - - 0.5.12 + - 0.5.20 aws_c_common: - - 0.6.19 + - 0.8.5 aws_c_event_stream: - - 0.2.7 + - 0.2.15 aws_c_http: - - 0.6.10 + - 0.6.27 aws_c_io: - - 0.10.17 + - 0.13.11 aws_c_mqtt: - - 0.7.10 + - 0.7.13 aws_c_s3: - - 0.1.31 + - 0.1.51 aws_c_sdkutils: - - 0.1.1 + - 0.1.7 aws_checksums: - - 0.1.12 + - 0.1.13 aws_crt_cpp: - - 0.17.14 + - 0.18.16 aws_sdk_cpp: - - 1.9.160 + - 1.9.375 boost: - - 1.74.0 + - 1.78.0 boost_cpp: - - 1.74.0 + - 1.78.0 bzip2: - 1 +c_ares: + - 1 cairo: - - 1.16 + - 1 capnproto: - - 0.9.1 + - 0.10.2 ccr: - 1.3 cfitsio: - - 3.470 + - 4.1.0 coin_or_cbc: - 2.10 coincbc: @@ -403,6 +299,8 @@ coin_or_osi: - 0.108 coin_or_utils: - 2.11 +console_bridge: + - 1.0 cutensor: - 1 curl: @@ -411,20 +309,22 @@ davix: - '0.8' dbus: - 1 +eclib: + - '20221012' exiv2: - 0.27 expat: - 2 ffmpeg: - - '4.3' + - '4.4' fftw: - 3 flann: - 1.9.1 fmt: - - '8' + - '9' fontconfig: - - 2.13 + - 2 freetype: - 2 gct: @@ -434,23 +334,25 @@ gf2x: gdk_pixbuf: - 2 gnuradio_core: - - 3.9.5 + - 3.10.4 +gnutls: + - 3.7 gsl: - 2.7 gsoap: - - 2.8.117 + - 2.8.123 gstreamer: - - 1.18 + - '1.20' gst_plugins_base: - - 1.18 + - '1.20' gdal: - - '3.4' + - '3.5' geos: - - 3.10.2 + - 3.11.1 geotiff: - - '1.7' + - 1.7.1 gfal2: - - '2.20' + - '2.21' gflags: - 2.2 giflib: @@ -460,49 +362,64 @@ glew: glib: - '2' glog: - - '0.5' + - '0.6' glpk: - - 4.65 + - '5.0' gmp: - 6 google_cloud_cpp: - - '1.35' + - '2.3.0' google_cloud_cpp_common: - 0.25.0 googleapis_cpp: - '0.10' graphviz: - - 2.47 + - '6' +# keep in sync with libgrpc grpc_cpp: - - '1.42' + - '1.49' harfbuzz: - - '3' + - '5' hdf4: - - 4.2 + - 4.2.15 hdf5: - 1.12.1 icu: - - 69 + - '70' +imath: + - '3.1' ipopt: - - 3.14 + - 3.14.10 isl: - - '0.22' + - '0.25' jasper: - '2' jpeg: - 9 +lcms: + - 2 +lerc: + - '4' libjpeg_turbo: - 2 +libev: + - 4.33 json_c: - - 0.15 + - '0.16' jsoncpp: - 1.9.5 kealib: - - 1.4 + - '1.5' krb5: - '1.19' +libabseil: + - '20220623.0' +libabseil_static: + - '20220623.0' libarchive: - 3.5 +libavif: + - 0.11.1 libblitz: - 1.0.2 libcint: @@ -513,6 +430,8 @@ libcrc32c: - 1.1 libdap4: - 3.20.6 +libdeflate: + - '1.14' libeantic: - 1 libevent: @@ -520,19 +439,25 @@ libevent: libexactreal: - 2 libffi: - - '3.4' + - '3.3' libflatsurf: - 3 libflint: - - '2.8' + - '2.9' libgdal: - - '3.4' + - '3.5' libgit2: - - '1.3' + - '1.5' +libgrpc: + - '1.49' libhugetlbfs: - 2 +libhwy: + - '1.0' libiconv: - - 1.16 + - 1 +libidn2: + - 2 libintervalxt: - 3 libkml: @@ -540,45 +465,56 @@ libkml: libiio: - 0 libmatio: - - 1.5 + - 1.5.21 libmicrohttpd: - 0.9 libnetcdf: - 4.8.1 libopencv: - - 4.5.5 + - 4.6.0 libpcap: - '1.10' libpng: - 1.6 libprotobuf: - - '3.19' + - '3.21' librdkafka: - - '1.7' + - '1.9' librsvg: - 2 libsecret: - 0.18 +libsndfile: + - 1.1 libspatialindex: - 1.9.3 +libssh: + - 0.10 libssh2: - 1 libsvm: - - 3.21 + - '325' +# keep libsqlite in sync with sqlite +libsqlite: + - 3 libthrift: - - 0.15.0 + - 0.16.0 libtiff: - 4 libunwind: - '1.6' libv8: - 8.9.83 +libvips: + - 8 libwebp: - 1 libwebp_base: - 1 libxml2: - - 2.9 + - 2.10 +libxsmm: + - 1 libuuid: - 2 libzip: @@ -586,25 +522,27 @@ libzip: log4cxx: - 0.11.0 lz4_c: - - 1.9.3 + - '1.9.3' lzo: - 2 metis: - 5.1 mimalloc: - - 1.6.3 + - 2.0.7 mkl: - - '2021' + - 2022 mkl_devel: - - '2021' + - 2022 +mpg123: + - '1.31' mpich: - - 3 + - 4 mpfr: - 4 mumps_mpi: - - 5.2 + - 5.2.1 mumps_seq: - - 5.2 + - 5.2.1 nccl: - 2 ncurses: @@ -614,9 +552,9 @@ netcdf_cxx4: netcdf_fortran: - 4.5 nettle: - - '3.7' + - '3.8' nodejs: - - '17' + - '18' - '16' - '14' # [not (osx and arm64)] nss: @@ -630,90 +568,109 @@ ntl: # we build for the oldest version possible of numpy for forward compatibility numpy: # part of a zip_keys: python, python_impl, numpy - - 1.18 # [not (osx and arm64)] - - 1.18 # [not (osx and arm64)] - - 1.19 # [osx and arm64] - - 1.19 + - 1.20 + - 1.20 + - 1.21 occt: - - '7.5' + - 7.6 openblas: - 0.3.* openexr: - - 2.5 + - '3.1' +openh264: + - '2.3.1' openjpeg: - - '2.4' + - '2' openmpi: - 4 openssl: - 1.1.1 openturns: - - '1.18' + - '1.19' orc: - - 1.7.2 + - 1.8.0 pango: - - '1.48' + - 1.50 pari: - 2.13.* *_pthread perl: - 5.32.1 petsc: - - 3.15 + - '3.17' petsc4py: - - 3.15 + - '3.17' slepc: - - 3.15 + - '3.17' slepc4py: - - 3.15 + - '3.17' +svt_av1: + - 1.3.0 +p11_kit: + - '0.24' pcre: - '8' pcre2: - - '10.37' + - '10.40' pixman: - 0 poco: - - 1.11.1 + - 1.12.4 poppler: - - '21.11' + - '22.04' proj: - - 8.2.0 + - 9.1.0 +pulseaudio: + - 14.0 pybind11_abi: - 4 python: # part of a zip_keys: python, python_impl, numpy - - 3.7.* *_cpython # [not (osx and arm64)] - 3.8.* *_cpython - 3.9.* *_cpython + - 3.10.* *_cpython python_impl: # part of a zip_keys: python, python_impl, numpy - - cpython # [not (osx and arm64)] - cpython - cpython + - cpython +pytorch: + - '1.12' qt: - 5.12 qtkeychain: - - '0.12' + - '0.13' re2: - - 2021.11.01 + - 2022.06.01 readline: - "8" rocksdb: - "6.10" root_base: - - 6.24.6 + - 6.26.8 ruby: - 2.5 - 2.6 r_base: - - 4.0 - 4.1 + - 4.2 # [not win] scotch: - 6.0.9 ptscotch: - 6.0.9 s2n: - - 1.3.4 + - 1.3.28 +sdl2: + - '2' +sdl2_image: + - '2' +sdl2_mixer: + - '2' +sdl2_net: + - '2' +sdl2_ttf: + - '2' singular: - - 4.2.0.p3 + - 4.2.1.p3 snappy: - 1 soapysdr: @@ -721,45 +678,60 @@ soapysdr: sox: - 14.4.2 spdlog: - - 1.9 + - '1.11' +# keep sqlite in sync with libsqlite sqlite: - 3 +starlink_ast: + - '9.2.7' suitesparse: - 5 superlu_dist: - 7.1.1 tbb: - - 2021 + - '2021' tbb_devel: - - 2021 + - '2021' thrift_cpp: - - 0.15.0 + - 0.16.0 tinyxml2: - 9 tk: - 8.6 # [not ppc64le] tiledb: - - '2.6' + - '2.11' +ucx: + - 1.12.1 uhd: - - 4.1.0 + - 4.3.0 +urdfdom: + - 3.1 vc: # [win] - 14 # [win] vlfeat: - - 0.9.20 + - 0.9.21 volk: - '2.5' vtk: - 9.1.0 +wcslib: + - '7.7' +wxwidgets: + - '3.2' x264: - - '1!161.*' + - '1!164.*' +x265: + - '3.5' xerces_c: - 3.2 xrootd: - '5' xz: - - 5.2 + - 5 zeromq: - 4.3.4 +zfp: + - 1.0 zlib: - 1.2 zlib_ng: diff --git a/.github/testpr_environment.yml b/.github/testpr_environment.yml index c56b32b83..972573ccf 100644 --- a/.github/testpr_environment.yml +++ b/.github/testpr_environment.yml @@ -1,7 +1,7 @@ name: testpr_env channels: - robostack - - robostack-experimental + - robostack-staging - conda-forge dependencies: - python 3.9.* diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1ad4fb00f..43f5f8859 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,10 +8,10 @@ jobs: fetch-depth: 0 # otherwise, you will failed to push refs to dest repo - uses: actions/setup-python@v2 with: - python-version: '3.8' # Version range or exact version of a Python version to use, using SemVer's version range syntax + python-version: '3.9' # Version range or exact version of a Python version to use, using SemVer's version range syntax - name: Install vinca run: | - pip install git+https://github.com/RoboStack/vinca.git@master + pip install git+https://github.com/RoboStack/vinca.git - name: Generate recipes for Linux run: | @@ -20,10 +20,11 @@ jobs: vinca --multiple --platform linux-64 - name: Generate azure pipelines for Linux run: | - vinca-azure --platform linux-64 --trigger-branch buildbranch_linux -d ./recipes --additional-recipes + vinca-gha --platform linux-64 --trigger-branch buildbranch_linux -d ./recipes --additional-recipes - name: Commit files run: | if [[ -f "linux.yml" ]]; then + mv linux.yml .github/workflows/ git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add . -f @@ -32,7 +33,7 @@ jobs: git push "${remote_repo}" HEAD:buildbranch_linux --follow-tags --force fi env: - INPUT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + INPUT_GITHUB_TOKEN: ${{ secrets.GHA_PAT }} # Generate recipes for osx - name: Reset repo @@ -45,20 +46,20 @@ jobs: vinca --multiple --platform osx-64 - name: Generate azure pipelines for macOS run: | - vinca-azure --platform osx-64 --trigger-branch buildbranch_osx -d ./recipes --additional-recipes + vinca-gha --platform osx-64 --trigger-branch buildbranch_osx -d ./recipes --additional-recipes - name: Commit files run: | if [[ -f "osx.yml" ]]; then + mv osx.yml .github/workflows/ git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add . -f - git commit -m "Add build files `date '+%Y-%m-%d-%H%M'`" -a remote_repo="https://${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" git push "${remote_repo}" HEAD:buildbranch_osx --follow-tags --force fi env: - INPUT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + INPUT_GITHUB_TOKEN: ${{ secrets.GHA_PAT }} # Generate recipes for osx-arm64 - name: Reset repo @@ -71,10 +72,11 @@ jobs: vinca --multiple --platform osx-arm64 - name: Generate azure pipelines for macOS (arm64) run: | - vinca-azure --platform osx-arm64 --trigger-branch buildbranch_osx_arm64 -d ./recipes --additional-recipes + vinca-gha --platform osx-arm64 --trigger-branch buildbranch_osx_arm64 -d ./recipes --additional-recipes - name: Commit files run: | if [[ -f "osx_arm64.yml" ]]; then + mv osx_arm64.yml .github/workflows/ git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add . -f @@ -83,7 +85,7 @@ jobs: git push "${remote_repo}" HEAD:buildbranch_osx_arm64 --follow-tags --force fi env: - INPUT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + INPUT_GITHUB_TOKEN: ${{ secrets.GHA_PAT }} # Generate recipes for Windows - name: Reset repo @@ -96,10 +98,11 @@ jobs: vinca --multiple --platform win-64 - name: Generate azure pipelines for Windows run: | - vinca-azure --platform win-64 --trigger-branch buildbranch_win -d ./recipes --additional-recipes + vinca-gha --platform win-64 --trigger-branch buildbranch_win -d ./recipes --additional-recipes - name: Commit files for Windows run: | if [[ -f "win.yml" ]]; then + mv win.yml .github/workflows/ git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add . -f @@ -108,7 +111,7 @@ jobs: git push "${remote_repo}" HEAD:buildbranch_win --follow-tags --force fi env: - INPUT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + INPUT_GITHUB_TOKEN: ${{ secrets.GHA_PAT }} # Generate recipes for Linux ARM64 - name: Reset repo @@ -120,31 +123,6 @@ jobs: cp vinca_linux_aarch64.yaml vinca.yaml vinca --multiple --platform linux-aarch64 - name: Generate azure pipelines for Linux ARM64 - run: | - vinca-azure --platform linux-aarch64 --trigger-branch buildbranch_linux_aarch64 -d ./recipes --additional-recipes - - name: Commit files - run: | - if [[ -f "linux_aarch64.yml" ]]; then - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add . -f - git commit -m "Add build files `date '+%Y-%m-%d-%H%M'`" -a - remote_repo="https://${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" - git push "${remote_repo}" HEAD:buildbranch_linux_aarch64 --follow-tags --force - fi - env: - INPUT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # Generate recipes for Linux ARM64 - - name: Reset repo - run: | - git reset --hard origin/master - - name: Generate recipes for Linux ARM64 - run: | - git clean -fdx - cp vinca_linux_aarch64.yaml vinca.yaml - vinca --multiple --platform linux-aarch64 - - name: Generate Github pipelines for Linux ARM64 run: | vinca-gha --platform linux-aarch64 --trigger-branch buildbranch_linux_aarch64 -d ./recipes --additional-recipes - name: Commit files @@ -161,8 +139,8 @@ jobs: env: INPUT_GITHUB_TOKEN: ${{ secrets.GHA_PAT }} - on: push: branches: - master + - main diff --git a/.github/workflows/testpr.yml b/.github/workflows/testpr.yml index e3faab334..fd5f8204e 100644 --- a/.github/workflows/testpr.yml +++ b/.github/workflows/testpr.yml @@ -50,17 +50,15 @@ jobs: - shell: bash -l {0} run: | + conda config --show channels | grep defaults && conda config --remove channels defaults conda info conda config --show - mamba install -y pip rospkg libmambapy rich networkx "catkin_pkg>=0.4.16" "ruamel.yaml>=0.16.6" "rosdistro>=0.8.0" "empy>=3.3.4" - mamba install -y boa + mamba install -y pip rospkg networkx "catkin_pkg>=0.4.16" "ruamel.yaml>=0.16.6" "rosdistro>=0.8.0" "empy>=3.3.4" boa - name: install vinca and boa master shell: bash -l {0} run: | - # for now we need boa master - # pip install git+https://github.com/mamba-org/boa@master # use no-deps for now, otherwise problems with ruamel. - pip install git+https://github.com/RoboStack/vinca.git@master --no-deps + pip install git+https://github.com/RoboStack/vinca.git --no-deps # For some reason, the Strawberry perl's pkg-config is found # instead of the conda's one, so let's delete the /c/Strawberry directory - name: Debug pkg-config problem @@ -134,24 +132,29 @@ jobs: shell: bash -l {0} if: steps.filecheck.outputs.LINUX_YAML_CHANGED == 1 && matrix.os == 'ubuntu-latest' && matrix.platform == 'linux-64' run: | + boa build additional_recipes/ros-distro-mutex/ -m ./.ci_support/conda_forge_pinnings.yaml -m ./conda_build_config.yaml boa build . -m ./.ci_support/conda_forge_pinnings.yaml -m ./conda_build_config.yaml - name: Build recipes for Linux-ARM64 shell: bash -l {0} if: steps.filecheck.outputs.LINUX_AARCH_YAML_CHANGED == 1 && matrix.os == 'ubuntu-latest' && matrix.platform == 'linux-aarch64' run: | + boa build additional_recipes/ros-distro-mutex/ -m ./.ci_support/conda_forge_pinnings.yaml -m ./conda_build_config.yaml --target-platform=linux-aarch64 boa build . -m ./.ci_support/conda_forge_pinnings.yaml -m ./conda_build_config.yaml --target-platform=linux-aarch64 - name: Build recipes for macOS shell: bash -l {0} if: steps.filecheck.outputs.OSX_YAML_CHANGED == 1 && matrix.os == 'macos-latest' && matrix.platform == 'osx-64' run: | + boa build additional_recipes/ros-distro-mutex/ -m ./.ci_support/conda_forge_pinnings.yaml -m ./conda_build_config.yaml boa build . -m ./.ci_support/conda_forge_pinnings.yaml -m ./conda_build_config.yaml - name: Build recipes for macOS-ARM64 shell: bash -l {0} - if: steps.filecheck.outputs.OSX_YAML_CHANGED == 1 && matrix.os == 'macos-latest' && matrix.platform == 'osx-arm64' + if: steps.filecheck.outputs.OSX_ARM_YAML_CHANGED == 1 && matrix.os == 'macos-latest' && matrix.platform == 'osx-arm64' run: | + boa build additional_recipes/ros-distro-mutex/ -m ./.ci_support/conda_forge_pinnings.yaml -m ./conda_build_config.yaml --target-platform=osx-arm64 boa build . -m ./.ci_support/conda_forge_pinnings.yaml -m ./conda_build_config.yaml --target-platform=osx-arm64 - name: Build recipes for Windows shell: bash -l {0} if: steps.filecheck.outputs.WIN_YAML_CHANGED == 1 && matrix.os == 'windows-2019' && matrix.platform == 'win-64' run: | + boa build additional_recipes/ros-distro-mutex/ -m ./.ci_support/conda_forge_pinnings.yaml -m ./conda_build_config.yaml boa build . -m ./.ci_support/conda_forge_pinnings.yaml -m ./conda_build_config.yaml diff --git a/.gitignore b/.gitignore index 127f1bd33..c41a12879 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ vinca.yaml recipes/ *.bat *.sh -*.json \ No newline at end of file +*.json +.DS_Store diff --git a/.scripts/build_linux.sh b/.scripts/build_linux.sh index 84946f8af..a13dd3190 100755 --- a/.scripts/build_linux.sh +++ b/.scripts/build_linux.sh @@ -26,15 +26,17 @@ export "CONDA_BLD_PATH=/opt/conda/build_artifacts" mkdir -p $CONDA_BLD_PATH conda index $CONDA_BLD_PATH + conda config --set remote_max_retries 5 conda config --add channels conda-forge conda config --add channels robostack +conda config --add channels robostack-staging conda config --add channels $CONDA_BLD_PATH conda config --remove channels defaults # conda config --set channel_priority strict mamba update conda --yes --quiet -c conda-forge -mamba install --yes --quiet pip conda-build=3.21.8 anaconda-client mamba boa=0.9 +mamba install --yes --quiet pip conda-build anaconda-client mamba boa # setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" # export PATH="$HOME/miniconda/bin:$PATH" diff --git a/.scripts/build_osx.sh b/.scripts/build_osx.sh index 55e512e9a..35be5a328 100755 --- a/.scripts/build_osx.sh +++ b/.scripts/build_osx.sh @@ -18,7 +18,7 @@ conda activate base conda config --set remote_max_retries 5 echo -e "\n\nInstalling conda-forge-ci-setup=3 and conda-build." -mamba install -n base --quiet --yes conda-forge-ci-setup=3 conda-build pip boa=0.9 quetz-client -c conda-forge +mamba install -n base --quiet --yes conda-forge-ci-setup=3 conda-build pip boa quetz-client -c conda-forge set -e @@ -43,8 +43,9 @@ conda config --set auto_update_conda false conda config --set add_pip_as_python_dependency false conda config --add channels conda-forge -conda config --add channels robostack-experimental conda config --add channels robostack +conda config --add channels robostack-staging +conda config --add channels $CONDA_BLD_PATH # conda config --set channel_priority strict # echo -e "\n\nMaking the build clobber file and running the build." diff --git a/.scripts/build_osx_arm64.sh b/.scripts/build_osx_arm64.sh index 0cca68f0e..b3f06bb36 100755 --- a/.scripts/build_osx_arm64.sh +++ b/.scripts/build_osx_arm64.sh @@ -18,7 +18,7 @@ conda activate base conda config --set remote_max_retries 5 echo -e "\n\nInstalling conda-forge-ci-setup=3 and conda-build." -mamba install -n base --quiet --yes conda-forge-ci-setup=3 conda-build pip boa=0.9 quetz-client -c conda-forge +mamba install -n base --quiet --yes conda-forge-ci-setup=3 conda-build pip boa quetz-client -c conda-forge set -e @@ -43,8 +43,9 @@ conda config --set auto_update_conda false conda config --set add_pip_as_python_dependency false conda config --add channels conda-forge -conda config --add channels robostack-experimental conda config --add channels robostack +conda config --add channels robostack-staging +conda config --add channels $CONDA_BLD_PATH # conda config --set channel_priority strict # echo -e "\n\nMaking the build clobber file and running the build." diff --git a/.scripts/build_win.bat b/.scripts/build_win.bat index 3e4da76bb..a77020982 100644 --- a/.scripts/build_win.bat +++ b/.scripts/build_win.bat @@ -1,4 +1,6 @@ -call activate base +setlocal EnableExtensions EnableDelayedExpansion +call %CONDA%\condabin\conda_hook.bat +call %CONDA%\condabin\conda.bat activate base set "PATH=%PATH:C:\ProgramData\Chocolatey\bin;=%" set "PATH=%PATH:C:\Program Files (x86)\sbt\bin;=%" @@ -16,28 +18,30 @@ set "PATH=%PATH:c:\tools\php;=%" :: Make paths like C:\\hostedtoolcache\\windows\\Ruby\\2.5.7\\x64\\bin garbage set "PATH=%PATH:ostedtoolcache=%" -call C:\Miniforge\Scripts\activate.bat base - echo "PATH is %PATH%" echo "CONDA_BLD_PATH is %CONDA_BLD_PATH%" rmdir /Q/S C:\Strawberry\ +rmdir /Q/S "C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\" set "FEEDSTOCK_ROOT=%cd%" mkdir %CONDA_BLD_PATH% -call conda.exe index "%CONDA_BLD_PATH%" +call conda index %CONDA_BLD_PATH% rem call conda config --remove channels defaults -call conda.exe config --add channels conda-forge -call conda.exe config --add channels robostack -call conda.exe config --add channels %CONDA_BLD_PATH% +call conda config --add channels conda-forge +call conda config --add channels robostack +call conda config --add channels robostack-staging +call conda config --add channels %CONDA_BLD_PATH% :: call conda config --set channel_priority strict +:: Enable long path names on Windows +reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f + :: conda remove --force m2-git -:: C:\Miniconda\python.exe -m pip install git+https://github.com/mamba-org/boa.git@master -call mamba.exe install boa=0.9 +call mamba install boa if errorlevel 1 exit 1 for %%X in (%CURRENT_RECIPES%) do ( diff --git a/README.md b/README.md index da4c090ee..ca7c7ee46 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,12 @@ [![GitHub Repo stars](https://img.shields.io/github/stars/robostack/ros-noetic?style=flat-square)](https://github.com/RoboStack/ros-noetic/) [![QUT Centre for Robotics](https://img.shields.io/badge/collection-QUT%20Robotics-%23043d71?style=flat-square)](https://qcr.ai) -[![Platforms](https://img.shields.io/badge/platforms-linux%20%7C%20win%20%7C%20macos%20%7C%20linux%E2%80%93aarch64%20%7C%20macos%E2%80%93arm64-green.svg?style=flat-square)](https://github.com/RoboStack/ros-noetic) -[![Azure DevOps builds (branch)](https://img.shields.io/azure-devops/build/robostack/f91d909b-3931-44f7-9823-19fcd42e7d04/8/buildbranch_linux?label=build%20linux&style=flat-square)](https://dev.azure.com/robostack/ros_pipelines/_build?definitionId=8&_a=summary) -[![Azure DevOps builds (branch)](https://img.shields.io/azure-devops/build/robostack/f91d909b-3931-44f7-9823-19fcd42e7d04/10/buildbranch_win?label=build%20win&style=flat-square)](https://dev.azure.com/robostack/ros_pipelines/_build?definitionId=10&_a=summary) -[![Azure DevOps builds (branch)](https://img.shields.io/azure-devops/build/robostack/f91d909b-3931-44f7-9823-19fcd42e7d04/9/buildbranch_osx?label=build%20macos&style=flat-square)](https://dev.azure.com/robostack/ros_pipelines/_build?definitionId=9&_a=summary) -[![Azure DevOps builds (branch)](https://img.shields.io/azure-devops/build/robostack/f91d909b-3931-44f7-9823-19fcd42e7d04/11/buildbranch_linux_aarch64?label=build%20aarch64&style=flat-square)](https://dev.azure.com/robostack/ros_pipelines/_build?definitionId=11&_a=summary) -[![Azure DevOps builds (branch)](https://img.shields.io/azure-devops/build/robostack/f91d909b-3931-44f7-9823-19fcd42e7d04/29/buildbranch_osx_arm64?label=build%20macos-arm64&style=flat-square)](https://dev.azure.com/robostack/ros_pipelines/_build?definitionId=29&_a=summary) +[![Platforms](https://img.shields.io/badge/platforms-linux%20%7C%20win%20%7C%20macos%20%7C%20macos_arm64%20%7C%20linux_aarch64-green.svg?style=flat-square)](https://github.com/RoboStack/ros-noetic) +[![Azure DevOps builds (branch)](https://img.shields.io/github/workflow/status/RoboStack/ros-noetic/build_linux/buildbranch_linux?label=build%20linux&style=flat-square)](https://github.com/RoboStack/ros-noetic/actions/workflows/linux.yml) +[![Azure DevOps builds (branch)](https://img.shields.io/github/workflow/status/RoboStack/ros-noetic/build_win/buildbranch_win?label=build%20win&style=flat-square)](https://github.com/RoboStack/ros-noetic/actions/workflows/win.yml) +[![Azure DevOps builds (branch)](https://img.shields.io/github/workflow/status/RoboStack/ros-noetic/build_osx/buildbranch_osx?label=build%20osx&style=flat-square)](https://github.com/RoboStack/ros-noetic/actions/workflows/osx.yml) +[![Azure DevOps builds (branch)](https://img.shields.io/github/workflow/status/RoboStack/ros-noetic/build_osx/buildbranch_osx_arm64?label=build%20osx-arm64&style=flat-square)](https://github.com/RoboStack/ros-noetic/actions/workflows/osx_arm64.yml) +[![Azure DevOps builds (branch)](https://img.shields.io/github/workflow/status/RoboStack/ros-noetic/build_linux/buildbranch_linux_aarch64?label=build%20aarch64&style=flat-square)](https://github.com/RoboStack/ros-noetic/actions/workflows/linux_aarch64.yml) [![GitHub issues](https://img.shields.io/github/issues-raw/robostack/ros-noetic?style=flat-square)](https://github.com/RoboStack/ros-noetic/issues) [![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/robostack/ros-noetic?style=flat-square)](https://github.com/RoboStack/ros-noetic/issues?q=is%3Aissue+is%3Aclosed) @@ -43,7 +43,8 @@ To get started with conda (or mamba) as package managers, you need to have a bas # if you don't have mamba yet, install it first in the base environment (not needed when using mambaforge): conda install mamba -c conda-forge -mamba create -n robostackenv ros-noetic-desktop python=3.9 -c robostack -c robostack-experimental -c conda-forge --no-channel-priority --override-channels +# now create a new environment +mamba create -n robostackenv ros-noetic-desktop python=3.9 -c robostack -c conda-forge --no-channel-priority --override-channels conda activate robostackenv # optionally, install some compiler packages if you want to e.g. build packages in a catkin_ws: diff --git a/additional_recipes/ros-distro-mutex/recipe.yaml b/additional_recipes/ros-distro-mutex/recipe.yaml index 43aee53cb..5743266e3 100644 --- a/additional_recipes/ros-distro-mutex/recipe.yaml +++ b/additional_recipes/ros-distro-mutex/recipe.yaml @@ -1,13 +1,12 @@ package: name: ros-distro-mutex - version: 0.3.0 + version: 0.4.0 build: - number: 2 + number: 3 string: noetic run_exports: - # NOTE MANUALLY EDIT THIS!!!! - - ros-distro-mutex 0.3 noetic + - "{{ pin_subpackage('ros-distro-mutex', max_pin='x.x') }}" requirements: # NOTE: @@ -30,11 +29,8 @@ requirements: # if the upstream package does not have run_exports # please change it in the conda_build_config.yaml! run_constrained: - - boost-cpp 1.74 - - log4cxx 0.11 + - boost-cpp 1.78 - pcl 1.12 - - libopencv 4.5.5 - - poco 1.11 - gazebo 11 - ogre 1.10.12 - libpqxx 6 diff --git a/additional_recipes/ros-noetic-eigenpy/recipe.yaml b/additional_recipes/ros-noetic-eigenpy/recipe.yaml new file mode 100644 index 000000000..f4aa37c68 --- /dev/null +++ b/additional_recipes/ros-noetic-eigenpy/recipe.yaml @@ -0,0 +1,20 @@ +package: + name: ros-noetic-eigenpy + version: "2.8.1" + +build: + number: 20 + +requirements: + run: + - eigenpy 2.8.1 + + +about: + home: https://github.com/conda-forge/eigenpy-feedstock + license: BSD-2-Clause + summary: | + Bindings between Numpy and Eigen using Boost.Python +extra: + recipe-maintainers: + - ros-forge \ No newline at end of file diff --git a/additional_recipes/ros-noetic-jackal-base/recipe.yaml b/additional_recipes/ros-noetic-jackal-base/recipe.yaml index e388a3d03..b2055b0d6 100644 --- a/additional_recipes/ros-noetic-jackal-base/recipe.yaml +++ b/additional_recipes/ros-noetic-jackal-base/recipe.yaml @@ -1,6 +1,6 @@ package: name: ros-noetic-jackal-base - version: 0.6.1 + version: 0.7.4 about: home: http://wiki.ros.org/Robots/Jackal license: @@ -12,7 +12,7 @@ extra: recipe-maintainers: - robostack build: - number: 2 + number: 3 script: sel(win): bld_catkin.bat sel(unix): build_catkin.sh @@ -20,7 +20,7 @@ build: source: git_url: https://github.com/clearpath-gbp/jackal_robot-release.git - git_rev: release/melodic/jackal_base/0.6.1-1 + git_rev: release/noetic/jackal_base/0.7.4-1 folder: ros-noetic-jackal-base/src/work requirements: build: diff --git a/additional_recipes/ros-noetic-jackal-control/recipe.yaml b/additional_recipes/ros-noetic-jackal-control/recipe.yaml index a1c894c8c..4cb29c4c1 100644 --- a/additional_recipes/ros-noetic-jackal-control/recipe.yaml +++ b/additional_recipes/ros-noetic-jackal-control/recipe.yaml @@ -1,6 +1,6 @@ package: name: ros-noetic-jackal-control - version: 0.7.3 + version: 0.8.5 about: home: http://wiki.ros.org/jackal_control license: @@ -12,7 +12,7 @@ extra: recipe-maintainers: - robostack build: - number: 2 + number: 3 script: sel(win): bld_catkin.bat sel(unix): build_catkin.sh @@ -21,7 +21,7 @@ build: source: git_url: https://github.com/clearpath-gbp/jackal-release.git - git_rev: release/melodic/jackal_control/0.7.3-1 + git_rev: release/noetic/jackal_control/0.8.5-1 folder: ros-noetic-jackal-control/src/work requirements: build: diff --git a/additional_recipes/ros-noetic-jackal-description/recipe.yaml b/additional_recipes/ros-noetic-jackal-description/recipe.yaml index 0635a6e28..57585e7da 100644 --- a/additional_recipes/ros-noetic-jackal-description/recipe.yaml +++ b/additional_recipes/ros-noetic-jackal-description/recipe.yaml @@ -1,6 +1,6 @@ package: name: ros-noetic-jackal-description - version: 0.7.3 + version: 0.8.5 about: home: http://wiki.ros.org/jackal_description license: @@ -12,7 +12,7 @@ extra: recipe-maintainers: - robostack build: - number: 2 + number: 3 script: sel(win): bld_catkin.bat sel(unix): build_catkin.sh @@ -20,7 +20,7 @@ build: source: git_url: https://github.com/clearpath-gbp/jackal-release.git - git_rev: release/melodic/jackal_description/0.7.3-1 + git_rev: release/noetic/jackal_description/0.8.5-1 folder: ros-noetic-jackal-description/src/work requirements: build: diff --git a/additional_recipes/ros-noetic-jackal-desktop/recipe.yaml b/additional_recipes/ros-noetic-jackal-desktop/recipe.yaml index e2ac13a4b..9070b080b 100644 --- a/additional_recipes/ros-noetic-jackal-desktop/recipe.yaml +++ b/additional_recipes/ros-noetic-jackal-desktop/recipe.yaml @@ -12,7 +12,7 @@ extra: recipe-maintainers: - robostack build: - number: 2 + number: 3 script: sel(win): bld_catkin.bat sel(unix): build_catkin.sh @@ -20,7 +20,7 @@ build: source: git_url: https://github.com/clearpath-gbp/jackal_desktop-release.git - git_rev: release/melodic/jackal_desktop/0.4.0-1 + git_rev: release/noetic/jackal_desktop/0.4.0-1 folder: ros-noetic-jackal-desktop/src/work requirements: build: diff --git a/additional_recipes/ros-noetic-jackal-gazebo/recipe.yaml b/additional_recipes/ros-noetic-jackal-gazebo/recipe.yaml index a21a5510b..7087cf564 100644 --- a/additional_recipes/ros-noetic-jackal-gazebo/recipe.yaml +++ b/additional_recipes/ros-noetic-jackal-gazebo/recipe.yaml @@ -12,14 +12,14 @@ extra: recipe-maintainers: - robostack build: - number: 2 + number: 3 script: sel(win): bld_catkin.bat sel(unix): build_catkin.sh source: git_url: https://github.com/clearpath-gbp/jackal_simulator-release.git - git_rev: release/melodic/jackal_gazebo/0.4.0-1 + git_rev: release/noetic/jackal_gazebo/0.4.0-1 folder: ros-noetic-jackal-gazebo/src/work requirements: build: diff --git a/additional_recipes/ros-noetic-jackal-msgs/recipe.yaml b/additional_recipes/ros-noetic-jackal-msgs/recipe.yaml index 839a5834c..18cda6ab7 100644 --- a/additional_recipes/ros-noetic-jackal-msgs/recipe.yaml +++ b/additional_recipes/ros-noetic-jackal-msgs/recipe.yaml @@ -1,6 +1,6 @@ package: name: ros-noetic-jackal-msgs - version: 0.7.3 + version: 0.8.5 about: home: http://wiki.ros.org/jackal_msgs license: @@ -12,7 +12,7 @@ extra: recipe-maintainers: - robostack build: - number: 2 + number: 3 script: sel(win): bld_catkin.bat sel(unix): build_catkin.sh @@ -20,7 +20,7 @@ build: source: git_url: https://github.com/clearpath-gbp/jackal-release.git - git_rev: release/melodic/jackal_msgs/0.7.3-1 + git_rev: release/noetic/jackal_msgs/0.8.5-1 folder: ros-noetic-jackal-msgs/src/work requirements: build: diff --git a/additional_recipes/ros-noetic-jackal-navigation/recipe.yaml b/additional_recipes/ros-noetic-jackal-navigation/recipe.yaml index a3ec815c7..a304173bd 100644 --- a/additional_recipes/ros-noetic-jackal-navigation/recipe.yaml +++ b/additional_recipes/ros-noetic-jackal-navigation/recipe.yaml @@ -1,6 +1,6 @@ package: name: ros-noetic-jackal-navigation - version: 0.7.3 + version: 0.8.5 about: home: http://wiki.ros.org/jackal_navigation license: @@ -12,7 +12,7 @@ extra: recipe-maintainers: - robostack build: - number: 2 + number: 3 script: sel(win): bld_catkin.bat sel(unix): build_catkin.sh @@ -20,7 +20,7 @@ build: source: git_url: https://github.com/clearpath-gbp/jackal-release.git - git_rev: release/melodic/jackal_navigation/0.7.3-1 + git_rev: release/noetic/jackal_navigation/0.8.5-1 folder: ros-noetic-jackal-navigation/src/work requirements: build: diff --git a/additional_recipes/ros-noetic-jackal-simulator/recipe.yaml b/additional_recipes/ros-noetic-jackal-simulator/recipe.yaml index 9e5fc60c5..8bc69b2e1 100644 --- a/additional_recipes/ros-noetic-jackal-simulator/recipe.yaml +++ b/additional_recipes/ros-noetic-jackal-simulator/recipe.yaml @@ -12,14 +12,14 @@ extra: recipe-maintainers: - robostack build: - number: 2 + number: 3 script: sel(win): bld_catkin.bat sel(unix): build_catkin.sh source: git_url: https://github.com/clearpath-gbp/jackal_simulator-release.git - git_rev: release/melodic/jackal_simulator/0.4.0-1 + git_rev: release/noetic/jackal_simulator/0.4.0-1 folder: ros-noetic-jackal-simulator/src/work requirements: build: diff --git a/additional_recipes/ros-noetic-jackal-viz/recipe.yaml b/additional_recipes/ros-noetic-jackal-viz/recipe.yaml index 8cf0e48c4..6310443ac 100644 --- a/additional_recipes/ros-noetic-jackal-viz/recipe.yaml +++ b/additional_recipes/ros-noetic-jackal-viz/recipe.yaml @@ -12,7 +12,7 @@ extra: recipe-maintainers: - robostack build: - number: 2 + number: 3 script: sel(win): bld_catkin.bat sel(unix): build_catkin.sh @@ -20,7 +20,7 @@ build: source: git_url: https://github.com/clearpath-gbp/jackal_desktop-release.git - git_rev: release/melodic/jackal_viz/0.4.0-1 + git_rev: release/noetic/jackal_viz/0.4.0-1 folder: ros-noetic-jackal-viz/src/work requirements: build: diff --git a/conda.yaml b/conda.yaml index 32aa7f81a..d15761a68 100644 --- a/conda.yaml +++ b/conda.yaml @@ -32,8 +32,12 @@ bullet: conda: [bullet] bzip2: conda: [bzip2] +cartographer: + conda: [cartographer] ca-certificates: conda: [ca-certificates] +clang-tidy: + conda: [clang-tools] cmake: conda: [cmake] coinor-libcbc-dev: @@ -62,7 +66,7 @@ curl: cython: conda: [cython] doxygen: - conda: [doxygen] + conda: [doxygen, graphviz] eigen: conda: [eigen] emacs: @@ -139,16 +143,22 @@ gtk3: ] ignition-common4: conda: [libignition-common4] +ignition-cmake2: + conda: [libignition-cmake2] ignition-gazebo3: conda: [libignition-gazebo5] ignition-gazebo5: conda: [libignition-gazebo5] +ignition-gazebo6: + conda: [libignition-gazebo6] ignition-gui5: conda: [libignition-gui5] ignition-math6: conda: [libignition-math6] ignition-msgs5: conda: [libignition-msgs5] +ignition-msgs8: + conda: [libignition-msgs8] ignition-msgs7: conda: [libignition-msgs7] ignition-rendering5: @@ -157,6 +167,8 @@ ignition-transport8: conda: [libignition-transport8] ignition-transport10: conda: [libignition-transport10] +ignition-transport11: + conda: [libignition-transport11] java: conda: [openjdk] jupyter-notebook: @@ -169,6 +181,8 @@ lcov: conda: [lcov] leveldb: conda: [leveldb] +libabsl-dev: + conda: [abseil-cpp] libblas-dev: conda: [libblas, libcblas] libboost-chrono-dev: @@ -224,6 +238,10 @@ libconsole-bridge-dev: conda: [console_bridge] libcunit-dev: conda: [cunit] +libcurl: + conda: [libcurl] +libcurl-dev: + conda: [libcurl] libdc1394-dev: conda: [libdc1394] libfcl-dev: @@ -282,6 +300,8 @@ libhdf5-dev: conda: [hdf5] libi2c-dev: conda: [libi2c] +liblttng-ust-dev: + conda: [lttng-ust] libjpeg: conda: [libjpeg-turbo] libjsoncpp: @@ -322,6 +342,8 @@ libopenblas-dev: conda: [libblas] libopencv-dev: conda: [py-opencv, libopencv, REQUIRE_OPENGL] +libopencv-imgproc-dev: + conda: [py-opencv, libopencv, REQUIRE_OPENGL] libopenni-dev: conda: [] liborocos-kdl: @@ -349,35 +371,21 @@ libqglviewer-dev-qt5: libqhull: conda: [qhull] libqt5-core: - conda: - linux: [qt 5.12] - osx: [qt-main] - win64: [qt 5] + conda: [qt-main, REQUIRE_OPENGL] libqt5-gui: - conda: - linux: [qt 5.12, REQUIRE_OPENGL] - osx: [qt-main, REQUIRE_OPENGL] - win64: [qt 5] + conda: [qt-main, REQUIRE_OPENGL] libqt5-opengl: - conda: - linux: [qt 5.12, REQUIRE_OPENGL] - osx: [qt-main, REQUIRE_OPENGL] - win64: [qt 5] + conda: [qt-main, REQUIRE_OPENGL] libqt5-opengl-dev: - conda: - linux: [qt 5.12, REQUIRE_OPENGL] - osx: [qt-main, REQUIRE_OPENGL] - win64: [qt 5] + conda: [qt-main, REQUIRE_OPENGL] +libqt5-svg-dev: + conda: [qt-main, REQUIRE_OPENGL] +libqt5-websockets-dev: + conda: [qt-main, REQUIRE_OPENGL] libqt5-widgets: - conda: - linux: [qt 5.12, REQUIRE_OPENGL] - osx: [qt-main, REQUIRE_OPENGL] - win64: [qt 5] + conda: [qt-main, REQUIRE_OPENGL] libqt5x11extras5-dev: - conda: - linux: [qt 5.12, REQUIRE_OPENGL] - osx: [qt-main, REQUIRE_OPENGL] - win64: [qt 5] + conda: [qt-main, REQUIRE_OPENGL] libreadline: conda: [readline] libreadline-dev: @@ -396,6 +404,8 @@ libtool: conda: [libtool] libturbojpeg: conda: [libjpeg-turbo] +libtins-dev: + conda: [libtins] libudev-dev: conda: [libusb] liburdfdom-dev: @@ -475,6 +485,8 @@ netpbm: linux: [netpbm] osx: [netpbm] win64: [] +nlohmann-json-dev: + conda: [nlohmann_json] nlopt: conda: [nlopt] ocl-icd-opencl-dev: @@ -502,6 +514,8 @@ protobuf-dev: conda: [libprotobuf, protobuf] pugixml-dev: conda: [pugixml] +pybind11-dev: + conda: [pybind11] pycodestyle: conda: [pycodestyle] pydocstyle: @@ -583,10 +597,7 @@ python-pygraphviz: python-pyusb-pip: conda: [pyusb] python-qt5-bindings: - conda: - linux: [pyqt 5.12] - osx: [pyqt 5, pyqt-builder] - win64: [pyqt 5] + conda: [pyqt, pyqt-builder] python-rosdep: conda: [rosdep] python-rosdep-modules: @@ -657,6 +668,12 @@ python3-empy: conda: [empy] python3-flake8: conda: [flake8] +python3-flask: + conda: [flask] +python3-flask-cors: + conda: [flask-cors] +python3-fiona: + conda: [fiona] python3-future: conda: [future] python3-github: @@ -679,6 +696,8 @@ python3-importlib-metadata: conda: [importlib-metadata] python3-importlib-resources: conda: [importlib_resources] +python3-jinja2: + conda: [jinja2] python3-kitchen: conda: [kitchen] python3-lark-parser: @@ -744,24 +763,17 @@ python3-pytest-cov: python3-pytest-mock: conda: [pytest-mock] python3-qt5-bindings: - conda: - linux: [pyqt 5.12] - osx: [pyqt 5, pyqt-builder] - win64: [pyqt 5] + conda: [pyqt, pyqt-builder] python3-qt5-bindings-gl: - conda: - linux: [pyqt 5.12] - osx: [pyqt 5, pyqt-builder] - win64: [pyqt 5] + conda: [pyqt, pyqt-builder] python3-qt5-bindings-webkit: - conda: - linux: [pyqt 5.12] - osx: [pyqt, pyqt-builder] - win64: [pyqt 5] + conda: [pyqtwebengine] python3-requests: conda: [requests] python3-requests-oauthlib: conda: [requests-oauthlib] +python3-rtree: + conda: [rtree] python3-rosdep: conda: [rosdep] python3-rosdep-modules: @@ -802,6 +814,8 @@ python3-tornado: conda: [tornado] python3-twisted: conda: [twisted] +python3-typeguard: + conda: [typeguard] python3-usb: conda: [pyusb] python3-venv: @@ -813,20 +827,11 @@ python3-yaml: python3-zmq: conda: [pyzmq] qt5-image-formats-plugins: - conda: - linux: [qt 5.12] - osx: [qt-main] - win64: [qt 5] + conda: [qt-main, REQUIRE_OPENGL] qt5-qmake: - conda: - linux: [qt 5.12] - osx: [qt-main] - win64: [qt 5] + conda: [qt-main, REQUIRE_OPENGL] qtbase5-dev: - conda: - linux: [qt 5.12, REQUIRE_OPENGL] - osx: [qt-main, REQUIRE_OPENGL] - win64: [qt 5] + conda: [qt-main, REQUIRE_OPENGL] roboticstoolbox-python: conda: [roboticstoolbox-python] rsync: @@ -842,6 +847,8 @@ screen: conda: [screen] sdformat: conda: [libsdformat] +sdformat12: + conda: [libsdformat12] sdl: conda: [sdl] sdl-image: @@ -860,6 +867,8 @@ subversion: conda: [subversion] suitesparse: conda: [suitesparse] +sqlite3: + conda: [sqlite 3.*] swig: conda: [swig] sysstat: diff --git a/conda_build_config.yaml b/conda_build_config.yaml index a60571378..0edef1a65 100644 --- a/conda_build_config.yaml +++ b/conda_build_config.yaml @@ -1,27 +1,32 @@ -console_bridge: - - 1.0 +assimp: + - 5.2.5 +hdf5: + - 1.12.2 gazebo: - '11' +libpqxx: + - 6 numpy: - # part of a zip_keys: python, python_impl, numpy - - 1.19 + - 1.20 +pcl: + - 1.12.1 ogre: - 1.10.12 -pcl: - - 1.12.0 -libpqxx: - - 6 +qt: + - 5.15 +qt-main: + - 5.15 + +cdt_name: # [linux] + - cos7 # [linux] + +# Workaround for https://github.com/RoboStack/ros-galactic/pull/86#issuecomment-1079811424 +setuptools: # [win] + - 61.0.0 # [win] python: - # part of a zip_keys: python, python_impl, numpy - # - 3.6.* *_cpython # [not (osx and arm64)] - # - 3.7.* *_cpython # [not (osx and arm64)] - # - 3.8.* *_cpython - 3.9.* *_cpython python_impl: - # part of a zip_keys: python, python_impl, numpy - # - cpython # [not (osx and arm64)] - # - cpython # [not (osx and arm64)] - cpython # Project overrides @@ -36,7 +41,8 @@ MACOSX_DEPLOYMENT_TARGET: # [osx] CONDA_BUILD_SYSROOT: - /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk # [osx and arm64] -# fix build metadata, needed for mapviz + +# fix build metadata, needed for mapviz and moveit-core replacements: all_replacements: - tag: 'pkg-config build metadata' @@ -55,4 +61,3 @@ replacements: - '*.cmake' regex_re: '([^;\s"]+/MacOSX\d*\.?\d*\.sdk)' replacement_re: '$ENV{CONDA_BUILD_SYSROOT}' - diff --git a/env/robostackenv.yaml b/env/robostackenv.yaml index ace18baf8..773252765 100644 --- a/env/robostackenv.yaml +++ b/env/robostackenv.yaml @@ -1,6 +1,7 @@ name: robostackenv channels: - robostack +- robostack-staging - conda-forge dependencies: - python=3.9 diff --git a/patch/dependencies.yaml b/patch/dependencies.yaml index cd0e86256..99d47f922 100644 --- a/patch/dependencies.yaml +++ b/patch/dependencies.yaml @@ -1,3 +1,6 @@ +ompl: + add_host: ["ompl"] + add_run: ["ompl"] moveit_visual_tools: add_host: ["REQUIRE_OPENGL"] pcl_conversions: @@ -7,23 +10,23 @@ pcl_ros: grid_map_demos: add_host: ["REQUIRE_OPENGL"] moveit_setup_assistant: - add_host: ["pkg-config"] + add_host: ["ompl"] gazebo_dev: - add_host: [tbb, tbb-devel, "pkg-config"] + add_host: [tbb, tbb-devel] gazebo_ros: - add_host: [tbb, tbb-devel, "pkg-config"] + add_host: [tbb, tbb-devel] gazebo_plugins: - add_host: [tbb, tbb-devel, "pkg-config"] + add_host: [tbb, tbb-devel] gazebo_ros_control: - add_host: [tbb, tbb-devel, "pkg-config"] + add_host: [tbb, tbb-devel] gazebo_pkgs: - add_host: [tbb, tbb-devel, "pkg-config"] + add_host: [tbb, tbb-devel] ros_ign_gazebo: add_host: ["REQUIRE_OPENGL", {"sel(linux)": "libuuid"}] apriltag: add_host: ["REQUIRE_OPENGL"] lvr2: - add_host: ["libgdal", "pkg-config", "cgal-cpp"] + add_host: ["libgdal", "cgal-cpp"] rtabmap: add_host: ["REQUIRE_OPENGL"] rtabmap_ros: @@ -34,8 +37,6 @@ swri_image_util: add_host: ["REQUIRE_OPENGL"] posedetection_msgs: add_host: ["REQUIRE_OPENGL"] -sainsmart_relay_usb: - add_host: ["pkg-config"] libcmt: add_host: ["REQUIRE_OPENGL"] checkerboard_detector: @@ -57,30 +58,20 @@ jsk_recognition_utils: add_run: ["glew"] robot_self_filter: add_host: ["REQUIRE_OPENGL"] -eigenpy: - add_host: ["pkg-config"] -slam_toolbox: - add_host: ["pkg-config"] ur_client_library: add_host: ["ros-noetic-catkin"] mqtt_bridge: add_run: ["inject", "msgpack-python", "paho-mqtt", "pymongo"] mrpt2: - add_host: ["tinyxml2", "boost-cpp", "jsoncpp", "gtest", "boost", "libdc1394", "xorg-libxcomposite", "ros-noetic-octomap", "libftdi", "pkg-config"] + add_host: ["tinyxml2", "boost-cpp", "jsoncpp", "gtest", "boost", "libdc1394", "xorg-libxcomposite", "ros-noetic-octomap", "libftdi"] add_run: ["tinyxml2", "boost-cpp", "jsoncpp", "gtest", "boost", "libdc1394", "xorg-libxcomposite", "ros-noetic-octomap", "libftdi"] add_build: [{"sel(linux)": "{{ cdt('libxcomposite-devel') }}"}] -theora_image_transport: - add_host: ["pkg-config"] image_view: - add_host: ["REQUIRE_OPENGL", "pkg-config"] + add_host: ["REQUIRE_OPENGL"] rosserial_python: add_run: ["pyserial"] mesh_client: add_host: ["REQUIRE_OPENGL", "cgal-cpp"] -mesh_msgs_conversions: - add_host: ["pkg-config"] -mbf_msgs: - add_host: ["numpy"] map_organizer: add_host: ["REQUIRE_OPENGL"] libuvc_camera: @@ -88,17 +79,15 @@ libuvc_camera: toposens_markers: add_host: [REQUIRE_OPENGL, libglib, glib, libxcb, pthread-stubs, xorg-libxau, xorg-libxi, xorg-libxrandr, xorg-libxcursor, xorg-libxtst, xorg-libxcomposite, xorg-libxdamage, xorg-libxinerama, xorg-xineramaproto] audio_capture: - add_host: ["pkg-config", "libglib", "glib"] + add_host: ["libglib", "glib"] audio_play: - add_host: ["pkg-config", "libglib", "glib"] + add_host: ["libglib", "glib"] cob_object_detection_visualizer: add_host: ["REQUIRE_OPENGL"] grid_map_pcl: add_host: ["REQUIRE_OPENGL"] -hdf5_map_io: - add_host: ["pkg-config"] laser_scan_matcher: - add_host: ["REQUIRE_OPENGL", "pkg-config"] + add_host: ["REQUIRE_OPENGL"] moveit_calibration_plugins: add_host: ["libopencv"] multisense_ros: @@ -109,42 +98,8 @@ rc_roi_manager_gui: add_host: ["REQUIRE_OPENGL"] simple_grasping: add_host: ["REQUIRE_OPENGL"] -pr2_mechanism_diagnostics: - add_host: ["pkg-config"] -joint_trajectory_generator: - add_host: ["pkg-config"] -pr2_controller_manager: - add_host: ["pkg-config"] -cob_mimic: - add_host: ["pkg-config"] -cob_obstacle_distance: - add_host: ["pkg-config"] -cob_sound: - add_host: ["pkg-config"] -dataspeed_pds_lcm: - add_host: ["pkg-config"] -exotica_core: - add_host: ["pkg-config"] -robot_localization: - add_host: ["pkg-config"] face_detector: add_host: ["yaml-cpp"] -fadecandy_driver: - add_host: ["pkg-config"] -gpsd_client: - add_host: ["pkg-config"] -people_tracking_filter: - add_host: ["pkg-config"] -points_preprocessor: - add_host: ["pkg-config"] -robot_pose_ekf: - add_host: ["pkg-config"] -rospilot: - add_host: ["pkg-config"] -nav_grid_server: - add_host: ["pkg-config"] -map_server: - add_host: ["pkg-config"] safety_limiter: add_host: ["REQUIRE_OPENGL"] ifopt: @@ -156,11 +111,5 @@ rosbridge_library: resource_retriever: add_host: ["libcurl"] add_run: ["libcurl"] -hector_gazebo_plugins: - add_host: ["pkg-config"] -turtlebot3_gazebo: - add_host: ["pkg-config"] -velodyne_gazebo_plugins: - add_host: ["pkg-config"] plotjuggler: add_host: [{"sel(linux)": "elfutils"}] diff --git a/patch/ros-noetic-eigenpy.patch b/patch/ros-noetic-eigenpy.patch new file mode 100644 index 000000000..e6d1a756f --- /dev/null +++ b/patch/ros-noetic-eigenpy.patch @@ -0,0 +1,2837 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fda47db..06dbbe3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,6 +12,8 @@ set(PROJECT_USE_KEYWORD_LINK_LIBRARIES TRUE) + set(PROJECT_CUSTOM_HEADER_EXTENSION "hpp") + set(PROJECT_COMPATIBILITY_VERSION AnyNewerVersion) + ++find_package(Python COMPONENTS Interpreter Development NumPy REQUIRED) ++ + # Check if the submodule cmake have been initialized + set(JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR}/cmake") + if(NOT EXISTS "${CMAKE_SOURCE_DIR}/cmake/base.cmake") +@@ -34,9 +36,6 @@ endif() + IF(NOT DEFINED CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE "Release") + ENDIF() +-IF(NOT DEFINED PYTHON_EXECUTABLE) +- SET(PYTHON_EXECUTABLE "/usr/bin/python3") # specify python3 so that Debian Buster passes +-ENDIF() + IF(NOT DEFINED CMAKE_INSTALL_LIBDIR) + SET(CMAKE_INSTALL_LIBDIR "lib/") + ENDIF() +diff --git a/cmake/cython/python/FindPython.cmake b/cmake/cython/python/FindPython.cmake +deleted file mode 100644 +index 1c134e2..0000000 +--- a/cmake/cython/python/FindPython.cmake ++++ /dev/null +@@ -1,224 +0,0 @@ +-# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +-# file Copyright.txt or https://cmake.org/licensing for details. +- +-#[=======================================================================[.rst: +-FindPython +----------- +- +-Find Python interpreter, compiler and development environment (include +-directories and libraries). +- +-Three components are supported: +- +-* ``Interpreter``: search for Python interpreter. +-* ``Compiler``: search for Python compiler. Only offered by IronPython. +-* ``Development``: search for development artifacts (include directories and +- libraries). +-* ``NumPy``: search for NumPy include directories. +- +-If no ``COMPONENTS`` is specified, ``Interpreter`` is assumed. +- +-To ensure consistent versions between components ``Interpreter``, ``Compiler``, +-``Development`` and ``NumPy``, specify all components at the same time:: +- +- find_package (Python COMPONENTS Interpreter Development) +- +-This module looks preferably for version 3 of Python. If not found, version 2 +-is searched. +-To manage concurrent versions 3 and 2 of Python, use :module:`FindPython3` and +-:module:`FindPython2` modules rather than this one. +- +-.. note:: +- +- If components ``Interpreter`` and ``Development`` are both specified, this +- module search only for interpreter with same platform architecture as the one +- defined by ``CMake`` configuration. This contraint does not apply if only +- ``Interpreter`` component is specified. +- +-Imported Targets +-^^^^^^^^^^^^^^^^ +- +-This module defines the following :ref:`Imported Targets ` +-(when :prop_gbl:`CMAKE_ROLE` is ``PROJECT``): +- +-``Python::Interpreter`` +- Python interpreter. Target defined if component ``Interpreter`` is found. +-``Python::Compiler`` +- Python compiler. Target defined if component ``Compiler`` is found. +-``Python::Python`` +- Python library. Target defined if component ``Development`` is found. +-``Python::NumPy`` +- NumPy Python library. Target defined if component ``NumPy`` is found. +- +-Result Variables +-^^^^^^^^^^^^^^^^ +- +-This module will set the following variables in your project +-(see :ref:`Standard Variable Names `): +- +-``Python_FOUND`` +- System has the Python requested components. +-``Python_Interpreter_FOUND`` +- System has the Python interpreter. +-``Python_EXECUTABLE`` +- Path to the Python interpreter. +-``Python_INTERPRETER_ID`` +- A short string unique to the interpreter. Possible values include: +- * Python +- * ActivePython +- * Anaconda +- * Canopy +- * IronPython +-``Python_STDLIB`` +- Standard platform independent installation directory. +- +- Information returned by +- ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=True)``. +-``Python_STDARCH`` +- Standard platform dependent installation directory. +- +- Information returned by +- ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=True)``. +-``Python_SITELIB`` +- Third-party platform independent installation directory. +- +- Information returned by +- ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=False)``. +-``Python_SITEARCH`` +- Third-party platform dependent installation directory. +- +- Information returned by +- ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=False)``. +-``Python_Compiler_FOUND`` +- System has the Python compiler. +-``Python_COMPILER`` +- Path to the Python compiler. Only offered by IronPython. +-``Python_COMPILER_ID`` +- A short string unique to the compiler. Possible values include: +- * IronPython +-``Python_Development_FOUND`` +- System has the Python development artifacts. +-``Python_INCLUDE_DIRS`` +- The Python include directories. +-``Python_LIBRARIES`` +- The Python libraries. +-``Python_LIBRARY_DIRS`` +- The Python library directories. +-``Python_RUNTIME_LIBRARY_DIRS`` +- The Python runtime library directories. +-``Python_VERSION`` +- Python version. +-``Python_VERSION_MAJOR`` +- Python major version. +-``Python_VERSION_MINOR`` +- Python minor version. +-``Python_VERSION_PATCH`` +- Python patch version. +-``Python_NumPy_FOUND`` +- System has the NumPy. +-``Python_NumPy_INCLUDE_DIRS`` +- The NumPy include directries. +-``Python_NumPy_VERSION`` +- The NumPy version. +- +-Hints +-^^^^^ +- +-``Python_ROOT_DIR`` +- Define the root directory of a Python installation. +- +-``Python_USE_STATIC_LIBS`` +- * If not defined, search for shared libraries and static libraries in that +- order. +- * If set to TRUE, search **only** for static libraries. +- * If set to FALSE, search **only** for shared libraries. +- +-``Python_FIND_REGISTRY`` +- On Windows the ``Python_FIND_REGISTRY`` variable determine the order +- of preference between registry and environment variables. +- the ``Python_FIND_REGISTRY`` variable can be set to empty or one of the +- following: +- +- * ``FIRST``: Try to use registry before environment variables. +- This is the default. +- * ``LAST``: Try to use registry after environment variables. +- * ``NEVER``: Never try to use registry. +- +-``CMAKE_FIND_FRAMEWORK`` +- On OS X the :variable:`CMAKE_FIND_FRAMEWORK` variable determine the order of +- preference between Apple-style and unix-style package components. +- +- .. note:: +- +- Value ``ONLY`` is not supported so ``FIRST`` will be used instead. +- +-.. note:: +- +- If a Python virtual environment is configured, set variable +- ``Python_FIND_REGISTRY`` (Windows) or ``CMAKE_FIND_FRAMEWORK`` (macOS) with +- value ``LAST`` or ``NEVER`` to select it preferably. +- +-Commands +-^^^^^^^^ +- +-This module defines the command ``Python_add_library`` (when +-:prop_gbl:`CMAKE_ROLE` is ``PROJECT``), which has the same semantics as +-:command:`add_library`, but takes care of Python module naming rules +-(only applied if library is of type ``MODULE``), and adds a dependency to target +-``Python::Python``:: +- +- Python_add_library (my_module MODULE src1.cpp) +- +-If library type is not specified, ``MODULE`` is assumed. +-#]=======================================================================] +- +- +-set (_PYTHON_PREFIX Python) +- +-if (DEFINED Python_FIND_VERSION) +- set (_Python_REQUIRED_VERSION_MAJOR ${Python_FIND_VERSION_MAJOR}) +- +- include (${CMAKE_CURRENT_LIST_DIR}/FindPython/Support.cmake) +-else() +- # iterate over versions in quiet and NOT required modes to avoid multiple +- # "Found" messages and prematurally failure. +- set (_Python_QUIETLY ${Python_FIND_QUIETLY}) +- set (_Python_REQUIRED ${Python_FIND_REQUIRED}) +- set (Python_FIND_QUIETLY TRUE) +- set (Python_FIND_REQUIRED FALSE) +- +- set (_Python_REQUIRED_VERSIONS 3 2) +- set (_Python_REQUIRED_VERSION_LAST 2) +- +- foreach (_Python_REQUIRED_VERSION_MAJOR IN LISTS _Python_REQUIRED_VERSIONS) +- set (Python_FIND_VERSION ${_Python_REQUIRED_VERSION_MAJOR}) +- include (${CMAKE_CURRENT_LIST_DIR}/FindPython/Support.cmake) +- if (Python_FOUND OR +- _Python_REQUIRED_VERSION_MAJOR EQUAL _Python_REQUIRED_VERSION_LAST) +- break() +- endif() +- # clean-up some CACHE variables to ensure look-up restart from scratch +- foreach (_Python_ITEM IN LISTS _Python_CACHED_VARS) +- unset (${_Python_ITEM} CACHE) +- endforeach() +- endforeach() +- +- unset (Python_FIND_VERSION) +- +- set (Python_FIND_QUIETLY ${_Python_QUIETLY}) +- set (Python_FIND_REQUIRED ${_Python_REQUIRED}) +- if (Python_FIND_REQUIRED OR NOT Python_FIND_QUIETLY) +- # call again validation command to get "Found" or error message +- find_package_handle_standard_args (Python HANDLE_COMPONENTS +- REQUIRED_VARS ${_Python_REQUIRED_VARS} +- VERSION_VAR Python_VERSION) +- endif() +-endif() +- +-if (COMMAND __Python_add_library) +- macro (Python_add_library) +- __Python_add_library (Python ${ARGV}) +- endmacro() +-endif() +- +-unset (_PYTHON_PREFIX) +diff --git a/cmake/cython/python/FindPython/Support.cmake b/cmake/cython/python/FindPython/Support.cmake +deleted file mode 100644 +index 82f0493..0000000 +--- a/cmake/cython/python/FindPython/Support.cmake ++++ /dev/null +@@ -1,1324 +0,0 @@ +-# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +-# file Copyright.txt or https://cmake.org/licensing for details. +- +-# +-# This file is a "template" file used by various FindPython modules. +-# +- +-cmake_policy (VERSION 3.5) +- +-# +-# Initial configuration +-# +-if (NOT DEFINED _PYTHON_PREFIX) +- message (FATAL_ERROR "FindPython: INTERNAL ERROR") +-endif() +-if (NOT DEFINED _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR) +- message (FATAL_ERROR "FindPython: INTERNAL ERROR") +-endif() +-if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3) +- set(_${_PYTHON_PREFIX}_VERSIONS 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) +-elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2) +- set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) +-else() +- message (FATAL_ERROR "FindPython: INTERNAL ERROR") +-endif() +- +-get_property(_${_PYTHON_PREFIX}_CMAKE_ROLE GLOBAL PROPERTY CMAKE_ROLE) +- +- +-# +-# helper commands +-# +-macro (_PYTHON_DISPLAY_FAILURE _PYTHON_MSG) +- if (${_PYTHON_PREFIX}_FIND_REQUIRED) +- message (FATAL_ERROR "${_PYTHON_MSG}") +- else() +- if (NOT ${_PYTHON_PREFIX}_FIND_QUIETLY) +- message(STATUS "${_PYTHON_MSG}") +- endif () +- endif() +- +- set (${_PYTHON_PREFIX}_FOUND FALSE) +- string (TOUPPER "${_PYTHON_PREFIX}" _${_PYTHON_PREFIX}_UPPER_PREFIX) +- set (${_PYTHON_UPPER_PREFIX}_FOUND FALSE) +- return() +-endmacro() +- +- +-macro (_PYTHON_FIND_FRAMEWORKS) +- set (${_PYTHON_PREFIX}_FRAMEWORKS) +- if (APPLE) +- set (_pff_frameworks ${CMAKE_FRAMEWORK_PATH} +- $ENV{CMAKE_FRAMEWORK_PATH} +- ~/Library/Frameworks +- /usr/local/Frameworks +- ${CMAKE_SYSTEM_FRAMEWORK_PATH}) +- list (REMOVE_DUPLICATES _pff_frameworks) +- foreach (_pff_framework IN LISTS _pff_frameworks) +- if (EXISTS ${_pff_framework}/Python.framework) +- list (APPEND ${_PYTHON_PREFIX}_FRAMEWORKS ${_pff_framework}/Python.framework) +- endif() +- endforeach() +- unset (_pff_frameworks) +- unset (_pff_framework) +- endif() +-endmacro() +- +-function (_PYTHON_GET_FRAMEWORKS _PYTHON_PGF_FRAMEWORK_PATHS _PYTHON_VERSION) +- set (_PYTHON_FRAMEWORK_PATHS) +- foreach (_PYTHON_FRAMEWORK IN LISTS ${_PYTHON_PREFIX}_FRAMEWORKS) +- list (APPEND _PYTHON_FRAMEWORK_PATHS +- "${_PYTHON_FRAMEWORK}/Versions/${_PYTHON_VERSION}") +- endforeach() +- set (${_PYTHON_PGF_FRAMEWORK_PATHS} ${_PYTHON_FRAMEWORK_PATHS} PARENT_SCOPE) +-endfunction() +- +- +-function (_PYTHON_VALIDATE_INTERPRETER) +- if (NOT ${_PYTHON_PREFIX}_EXECUTABLE) +- return() +- endif() +- +- if (ARGC EQUAL 1) +- set (expected_version ${ARGV0}) +- else() +- unset (expected_version) +- endif() +- +- get_filename_component (python_name "${${_PYTHON_PREFIX}_EXECUTABLE}" NAME) +- +- if (expected_version AND NOT python_name STREQUAL "python${expected_version}${CMAKE_EXECUTABLE_SUFFIX}") +- # executable found must have a specific version +- execute_process (COMMAND "${${_PYTHON_PREFIX}_EXECUTABLE}" -c +- "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:2]]))" +- RESULT_VARIABLE result +- OUTPUT_VARIABLE version +- ERROR_QUIET +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- if (result OR NOT version EQUAL expected_version) +- # interpreter not usable or has wrong major version +- set (${_PYTHON_PREFIX}_EXECUTABLE ${_PYTHON_PREFIX}_EXECUTABLE-NOTFOUND CACHE INTERNAL "" FORCE) +- return() +- endif() +- else() +- if (NOT python_name STREQUAL "python${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR}${CMAKE_EXECUTABLE_SUFFIX}") +- # executable found do not have version in name +- # ensure major version is OK +- execute_process (COMMAND "${${_PYTHON_PREFIX}_EXECUTABLE}" -c +- "import sys; sys.stdout.write(str(sys.version_info[0]))" +- RESULT_VARIABLE result +- OUTPUT_VARIABLE version +- ERROR_QUIET +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- if (result OR NOT version EQUAL _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR) +- # interpreter not usable or has wrong major version +- set (${_PYTHON_PREFIX}_EXECUTABLE ${_PYTHON_PREFIX}_EXECUTABLE-NOTFOUND CACHE INTERNAL "" FORCE) +- return() +- endif() +- endif() +- endif() +- +- if (CMAKE_SIZEOF_VOID_P AND "Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS +- AND NOT CMAKE_CROSSCOMPILING) +- # In this case, interpreter must have same architecture as environment +- execute_process (COMMAND "${${_PYTHON_PREFIX}_EXECUTABLE}" -c +- "import sys, struct; sys.stdout.write(str(struct.calcsize(\"P\")))" +- RESULT_VARIABLE result +- OUTPUT_VARIABLE size +- ERROR_QUIET +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- if (result OR NOT size EQUAL CMAKE_SIZEOF_VOID_P) +- # interpreter not usable or has wrong architecture +- set (${_PYTHON_PREFIX}_EXECUTABLE ${_PYTHON_PREFIX}_EXECUTABLE-NOTFOUND CACHE INTERNAL "" FORCE) +- return() +- endif() +- endif() +-endfunction() +- +- +-function (_PYTHON_VALIDATE_COMPILER expected_version) +- if (NOT ${_PYTHON_PREFIX}_COMPILER) +- return() +- endif() +- +- # retrieve python environment version from compiler +- set (working_dir "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PythonCompilerVersion.dir") +- file (WRITE "${working_dir}/version.py" "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:2]]))\n") +- execute_process (COMMAND "${${_PYTHON_PREFIX}_COMPILER}" /target:exe /embed "${working_dir}/version.py" +- WORKING_DIRECTORY "${working_dir}" +- OUTPUT_QUIET +- ERROR_QUIET +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- execute_process (COMMAND "${working_dir}/version" +- WORKING_DIRECTORY "${working_dir}" +- RESULT_VARIABLE result +- OUTPUT_VARIABLE version +- ERROR_QUIET) +- file (REMOVE_RECURSE "${_${_PYTHON_PREFIX}_VERSION_DIR}") +- +- if (result OR NOT version EQUAL expected_version) +- # Compiler not usable or has wrong major version +- set (${_PYTHON_PREFIX}_COMPILER ${_PYTHON_PREFIX}_COMPILER-NOTFOUND CACHE INTERNAL "" FORCE) +- endif() +-endfunction() +- +- +-function (_PYTHON_FIND_RUNTIME_LIBRARY _PYTHON_LIB) +- string (REPLACE "_RUNTIME" "" _PYTHON_LIB "${_PYTHON_LIB}") +- # look at runtime part on systems supporting it +- if (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR +- (CMAKE_SYSTEM_NAME MATCHES "MSYS|CYGWIN" +- AND ${_PYTHON_LIB} MATCHES "${CMAKE_IMPORT_LIBRARY_SUFFIX}$")) +- set (CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_LIBRARY_SUFFIX}) +- # MSYS has a special syntax for runtime libraries +- if (CMAKE_SYSTEM_NAME MATCHES "MSYS") +- list (APPEND CMAKE_FIND_LIBRARY_PREFIXES "msys-") +- endif() +- find_library (${ARGV}) +- endif() +-endfunction() +- +- +-function (_PYTHON_SET_LIBRARY_DIRS _PYTHON_SLD_RESULT) +- unset (_PYTHON_DIRS) +- set (_PYTHON_LIBS ${ARGV}) +- list (REMOVE_AT _PYTHON_LIBS 0) +- foreach (_PYTHON_LIB IN LISTS _PYTHON_LIBS) +- if (${_PYTHON_LIB}) +- get_filename_component (_PYTHON_DIR "${${_PYTHON_LIB}}" DIRECTORY) +- list (APPEND _PYTHON_DIRS "${_PYTHON_DIR}") +- endif() +- endforeach() +- if (_PYTHON_DIRS) +- list (REMOVE_DUPLICATES _PYTHON_DIRS) +- endif() +- set (${_PYTHON_SLD_RESULT} ${_PYTHON_DIRS} PARENT_SCOPE) +-endfunction() +- +- +-# If major version is specified, it must be the same as internal major version +-if (DEFINED ${_PYTHON_PREFIX}_FIND_VERSION_MAJOR +- AND NOT ${_PYTHON_PREFIX}_FIND_VERSION_MAJOR VERSION_EQUAL _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR) +- _python_display_failure ("Could NOT find ${_PYTHON_PREFIX}: Wrong major version specified is \"${${_PYTHON_PREFIX}_FIND_VERSION_MAJOR}\", but expected major version is \"${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR}\"") +-endif() +- +- +-# handle components +-if (NOT ${_PYTHON_PREFIX}_FIND_COMPONENTS) +- set (${_PYTHON_PREFIX}_FIND_COMPONENTS Interpreter) +- set (${_PYTHON_PREFIX}_FIND_REQUIRED_Interpreter TRUE) +-endif() +-if ("NumPy" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS) +- list (APPEND ${_PYTHON_PREFIX}_FIND_COMPONENTS "Interpreter" "Development") +- list (REMOVE_DUPLICATES ${_PYTHON_PREFIX}_FIND_COMPONENTS) +-endif() +-foreach (_${_PYTHON_PREFIX}_COMPONENT IN LISTS ${_PYTHON_PREFIX}_FIND_COMPONENTS) +- set (${_PYTHON_PREFIX}_${_${_PYTHON_PREFIX}_COMPONENT}_FOUND FALSE) +-endforeach() +-unset (_${_PYTHON_PREFIX}_FIND_VERSIONS) +- +-# Set versions to search +-## default: search any version +-set (_${_PYTHON_PREFIX}_FIND_VERSIONS ${_${_PYTHON_PREFIX}_VERSIONS}) +- +-if (${_PYTHON_PREFIX}_FIND_VERSION_COUNT GREATER 1) +- if (${_PYTHON_PREFIX}_FIND_VERSION_EXACT) +- set (_${_PYTHON_PREFIX}_FIND_VERSIONS ${${_PYTHON_PREFIX}_FIND_VERSION_MAJOR}.${${_PYTHON_PREFIX}_FIND_VERSION_MINOR}) +- else() +- unset (_${_PYTHON_PREFIX}_FIND_VERSIONS) +- # add all compatible versions +- foreach (_${_PYTHON_PREFIX}_VERSION IN LISTS _${_PYTHON_PREFIX}_VERSIONS) +- if (_${_PYTHON_PREFIX}_VERSION VERSION_GREATER_EQUAL ${_PYTHON_PREFIX}_FIND_VERSION) +- list (APPEND _${_PYTHON_PREFIX}_FIND_VERSIONS ${_${_PYTHON_PREFIX}_VERSION}) +- endif() +- endforeach() +- endif() +-endif() +- +-# Python and Anaconda distributions: define which architectures can be used +-if (CMAKE_SIZEOF_VOID_P) +- # In this case, search only for 64bit or 32bit +- math (EXPR _${_PYTHON_PREFIX}_ARCH "${CMAKE_SIZEOF_VOID_P} * 8") +- set (_${_PYTHON_PREFIX}_ARCH2 ${_${_PYTHON_PREFIX}_ARCH}) +-else() +- # architecture unknown, search for both 64bit and 32bit +- set (_${_PYTHON_PREFIX}_ARCH 64) +- set (_${_PYTHON_PREFIX}_ARCH2 32) +-endif() +- +-# IronPython support +-if (CMAKE_SIZEOF_VOID_P) +- # In this case, search only for 64bit or 32bit +- math (EXPR _${_PYTHON_PREFIX}_ARCH "${CMAKE_SIZEOF_VOID_P} * 8") +- set (_${_PYTHON_PREFIX}_IRON_PYTHON_NAMES ipy${_${_PYTHON_PREFIX}_ARCH} ipy) +-else() +- # architecture unknown, search for natural interpreter +- set (_${_PYTHON_PREFIX}_IRON_PYTHON_NAMES ipy) +-endif() +-set (_${_PYTHON_PREFIX}_IRON_PYTHON_PATH_SUFFIXES net45 net40) +- +-# Apple frameworks handling +-_python_find_frameworks () +- +-# Save CMAKE_FIND_APPBUNDLE +-if (DEFINED CMAKE_FIND_APPBUNDLE) +- set (_${_PYTHON_PREFIX}_CMAKE_FIND_APPBUNDLE ${CMAKE_FIND_APPBUNDLE}) +-else() +- unset (_${_PYTHON_PREFIX}_CMAKE_FIND_APPBUNDLE) +-endif() +-# To avoid app bundle lookup +-set (CMAKE_FIND_APPBUNDLE "NEVER") +- +-# Save CMAKE_FIND_FRAMEWORK +-if (DEFINED CMAKE_FIND_FRAMEWORK) +- set (_${_PYTHON_PREFIX}_CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK}) +- if (CMAKE_FIND_FRAMEWORK STREQUAL "ONLY") +- message (AUTHOR_WARNING "Find${_PYTHON_PREFIX}: CMAKE_FIND_FRAMEWORK: 'ONLY' value is not supported. 'FIRST' will be used instead.") +- set (_${_PYTHON_PREFIX}_FIND_FRAMEWORK "FIRST") +- else() +- set (_${_PYTHON_PREFIX}_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK}) +- endif() +-else() +- unset (_${_PYTHON_PREFIX}_CMAKE_FIND_FRAMEWORK) +- set (_${_PYTHON_PREFIX}_FIND_FRAMEWORK "FIRST") +-endif() +-# To avoid framework lookup +-set (CMAKE_FIND_FRAMEWORK "NEVER") +- +-# Windows Registry handling +-if (DEFINED ${_PYTHON_PREFIX}_FIND_REGISTRY) +- if (NOT ${_PYTHON_PREFIX}_FIND_REGISTRY MATCHES "^(FIRST|LAST|NEVER)$") +- message (AUTHOR_WARNING "Find${_PYTHON_PREFIX}: ${${_PYTHON_PREFIX}_FIND_REGISTRY}: invalid value for '${_PYTHON_PREFIX}_FIND_REGISTRY'. 'FIRST', 'LAST' or 'NEVER' expected.") +- set (_${_PYTHON_PREFIX}_FIND_REGISTRY "FIRST") +- else() +- set (_${_PYTHON_PREFIX}_FIND_REGISTRY ${${_PYTHON_PREFIX}_FIND_REGISTRY}) +- endif() +-else() +- set (_${_PYTHON_PREFIX}_FIND_REGISTRY "FIRST") +-endif() +- +- +-unset (_${_PYTHON_PREFIX}_REQUIRED_VARS) +-unset (_${_PYTHON_PREFIX}_CACHED_VARS) +- +- +-# first step, search for the interpreter +-if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS) +- list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_EXECUTABLE) +- if (${_PYTHON_PREFIX}_FIND_REQUIRED_Interpreter) +- list (APPEND _${_PYTHON_PREFIX}_REQUIRED_VARS ${_PYTHON_PREFIX}_EXECUTABLE) +- endif() +- +- set (_${_PYTHON_PREFIX}_HINTS "${${_PYTHON_PREFIX}_ROOT_DIR}" ENV ${_PYTHON_PREFIX}_ROOT_DIR) +- +- # look-up for various versions and locations +- foreach (_${_PYTHON_PREFIX}_VERSION IN LISTS _${_PYTHON_PREFIX}_FIND_VERSIONS) +- string (REPLACE "." "" _${_PYTHON_PREFIX}_VERSION_NO_DOTS ${_${_PYTHON_PREFIX}_VERSION}) +- +- _python_get_frameworks (_${_PYTHON_PREFIX}_FRAMEWORK_PATHS ${_${_PYTHON_PREFIX}_VERSION}) +- +- # Apple frameworks handling +- if (APPLE AND _${_PYTHON_PREFIX}_FIND_FRAMEWORK STREQUAL "FIRST") +- find_program (${_PYTHON_PREFIX}_EXECUTABLE +- NAMES python${_${_PYTHON_PREFIX}_VERSION} +- python${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR} +- NAMES_PER_DIR +- PATHS ${_${_PYTHON_PREFIX}_FRAMEWORK_PATHS} +- PATH_SUFFIXES bin +- NO_CMAKE_PATH +- NO_CMAKE_ENVIRONMENT_PATH +- NO_SYSTEM_ENVIRONMENT_PATH +- NO_CMAKE_SYSTEM_PATH) +- endif() +- +- # Windows registry +- if (WIN32 AND _${_PYTHON_PREFIX}_FIND_REGISTRY STREQUAL "FIRST") +- find_program (${_PYTHON_PREFIX}_EXECUTABLE +- NAMES python${_${_PYTHON_PREFIX}_VERSION} +- python${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR} +- python +- ${_${_PYTHON_PREFIX}_IRON_PYTHON_NAMES} +- NAMES_PER_DIR +- HINTS ${_${_PYTHON_PREFIX}_HINTS} +- PATHS [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}\\InstallPath] +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\IronPython\\${_${_PYTHON_PREFIX}_VERSION}\\InstallPath] +- PATH_SUFFIXES bin ${_${_PYTHON_PREFIX}_IRON_PYTHON_PATH_SUFFIXES} +- NO_SYSTEM_ENVIRONMENT_PATH +- NO_CMAKE_SYSTEM_PATH) +- endif() +- +- # try using HINTS +- find_program (${_PYTHON_PREFIX}_EXECUTABLE +- NAMES python${_${_PYTHON_PREFIX}_VERSION} +- python${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR} +- python +- ${_${_PYTHON_PREFIX}_IRON_PYTHON_NAMES} +- NAMES_PER_DIR +- HINTS ${_${_PYTHON_PREFIX}_HINTS} +- PATH_SUFFIXES bin ${_${_PYTHON_PREFIX}_IRON_PYTHON_PATH_SUFFIXES} +- NO_SYSTEM_ENVIRONMENT_PATH +- NO_CMAKE_SYSTEM_PATH) +- # try using standard paths. +- if (WIN32) +- find_program (${_PYTHON_PREFIX}_EXECUTABLE +- NAMES python${_${_PYTHON_PREFIX}_VERSION} +- python${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR} +- python +- ${_${_PYTHON_PREFIX}_IRON_PYTHON_NAMES} +- NAMES_PER_DIR) +- else() +- find_program (${_PYTHON_PREFIX}_EXECUTABLE +- NAMES python${_${_PYTHON_PREFIX}_VERSION} +- python${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR} +- NAMES_PER_DIR) +- endif() +- +- # Apple frameworks handling +- if (APPLE AND _${_PYTHON_PREFIX}_FIND_FRAMEWORK STREQUAL "LAST") +- find_program (${_PYTHON_PREFIX}_EXECUTABLE +- NAMES python${_${_PYTHON_PREFIX}_VERSION} +- python${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR} +- NAMES_PER_DIR +- PATHS ${_${_PYTHON_PREFIX}_FRAMEWORK_PATHS} +- PATH_SUFFIXES bin +- NO_DEFAULT_PATH) +- endif() +- +- # Windows registry +- if (WIN32 AND _${_PYTHON_PREFIX}_FIND_REGISTRY STREQUAL "LAST") +- find_program (${_PYTHON_PREFIX}_EXECUTABLE +- NAMES python${_${_PYTHON_PREFIX}_VERSION} +- python${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR} +- python +- ${_${_PYTHON_PREFIX}_IRON_PYTHON_NAMES} +- NAMES_PER_DIR +- PATHS [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}\\InstallPath] +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\IronPython\\${_${_PYTHON_PREFIX}_VERSION}\\InstallPath] +- PATH_SUFFIXES bin ${_${_PYTHON_PREFIX}_IRON_PYTHON_PATH_SUFFIXES} +- NO_DEFAULT_PATH) +- endif() +- +- _python_validate_interpreter (${_${_PYTHON_PREFIX}_VERSION}) +- if (${_PYTHON_PREFIX}_EXECUTABLE) +- break() +- endif() +- endforeach() +- +- if (NOT ${_PYTHON_PREFIX}_EXECUTABLE) +- # No specific version found. Retry with generic names +- # try using HINTS +- find_program (${_PYTHON_PREFIX}_EXECUTABLE +- NAMES python${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR} +- python +- ${_${_PYTHON_PREFIX}_IRON_PYTHON_NAMES} +- NAMES_PER_DIR +- HINTS ${_${_PYTHON_PREFIX}_HINTS} +- PATH_SUFFIXES bin ${_${_PYTHON_PREFIX}_IRON_PYTHON_PATH_SUFFIXES} +- NO_SYSTEM_ENVIRONMENT_PATH +- NO_CMAKE_SYSTEM_PATH) +- # try using standard paths. +- # NAMES_PER_DIR is not defined on purpose to have a chance to find +- # expected version. +- # For example, typical systems have 'python' for version 2.* and 'python3' +- # for version 3.*. So looking for names per dir will find, potentially, +- # systematically 'python' (i.e. version 2) even if version 3 is searched. +- find_program (${_PYTHON_PREFIX}_EXECUTABLE +- NAMES python${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR} +- python +- ${_${_PYTHON_PREFIX}_IRON_PYTHON_NAMES}) +- +- _python_validate_interpreter () +- endif() +- +- # retrieve exact version of executable found +- if (${_PYTHON_PREFIX}_EXECUTABLE) +- execute_process (COMMAND "${${_PYTHON_PREFIX}_EXECUTABLE}" -c +- "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:3]]))" +- RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT +- OUTPUT_VARIABLE ${_PYTHON_PREFIX}_VERSION +- ERROR_QUIET +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- if (NOT _${_PYTHON_PREFIX}_RESULT) +- string (REGEX MATCHALL "[0-9]+" _${_PYTHON_PREFIX}_VERSIONS "${${_PYTHON_PREFIX}_VERSION}") +- list (GET _${_PYTHON_PREFIX}_VERSIONS 0 ${_PYTHON_PREFIX}_VERSION_MAJOR) +- list (GET _${_PYTHON_PREFIX}_VERSIONS 1 ${_PYTHON_PREFIX}_VERSION_MINOR) +- list (GET _${_PYTHON_PREFIX}_VERSIONS 2 ${_PYTHON_PREFIX}_VERSION_PATCH) +- else() +- # Interpreter is not usable +- set (${_PYTHON_PREFIX}_EXECUTABLE ${_PYTHON_PREFIX}_EXECUTABLE-NOTFOUND CACHE INTERNAL "" FORCE) +- unset (${_PYTHON_PREFIX}_VERSION) +- endif() +- endif() +- +- if (${_PYTHON_PREFIX}_EXECUTABLE +- AND ${_PYTHON_PREFIX}_VERSION_MAJOR VERSION_EQUAL _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR) +- set (${_PYTHON_PREFIX}_Interpreter_FOUND TRUE) +- # Use interpreter version for future searches to ensure consistency +- set (_${_PYTHON_PREFIX}_FIND_VERSIONS ${${_PYTHON_PREFIX}_VERSION_MAJOR}.${${_PYTHON_PREFIX}_VERSION_MINOR}) +- endif() +- +- if (${_PYTHON_PREFIX}_Interpreter_FOUND) +- if (NOT CMAKE_SIZEOF_VOID_P) +- # determine interpreter architecture +- execute_process (COMMAND "${${_PYTHON_PREFIX}_EXECUTABLE}" -c "import sys; print(sys.maxsize > 2**32)" +- RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT +- OUTPUT_VARIABLE ${_PYTHON_PREFIX}_IS64BIT +- ERROR_VARIABLE ${_PYTHON_PREFIX}_IS64BIT) +- if (NOT _${_PYTHON_PREFIX}_RESULT) +- if (${_PYTHON_PREFIX}_IS64BIT) +- set (_${_PYTHON_PREFIX}_ARCH 64) +- set (_${_PYTHON_PREFIX}_ARCH2 64) +- else() +- set (_${_PYTHON_PREFIX}_ARCH 32) +- set (_${_PYTHON_PREFIX}_ARCH2 32) +- endif() +- endif() +- endif() +- +- # retrieve interpreter identity +- execute_process (COMMAND "${${_PYTHON_PREFIX}_EXECUTABLE}" -V +- RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT +- OUTPUT_VARIABLE ${_PYTHON_PREFIX}_INTERPRETER_ID +- ERROR_VARIABLE ${_PYTHON_PREFIX}_INTERPRETER_ID) +- if (NOT _${_PYTHON_PREFIX}_RESULT) +- if (${_PYTHON_PREFIX}_INTERPRETER_ID MATCHES "Anaconda") +- set (${_PYTHON_PREFIX}_INTERPRETER_ID "Anaconda") +- elseif (${_PYTHON_PREFIX}_INTERPRETER_ID MATCHES "Enthought") +- set (${_PYTHON_PREFIX}_INTERPRETER_ID "Canopy") +- else() +- string (REGEX REPLACE "^([^ ]+).*" "\\1" ${_PYTHON_PREFIX}_INTERPRETER_ID "${${_PYTHON_PREFIX}_INTERPRETER_ID}") +- if (${_PYTHON_PREFIX}_INTERPRETER_ID STREQUAL "Python") +- # try to get a more precise ID +- execute_process (COMMAND "${${_PYTHON_PREFIX}_EXECUTABLE}" -c "import sys; print(sys.copyright)" +- RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT +- OUTPUT_VARIABLE ${_PYTHON_PREFIX}_COPYRIGHT +- ERROR_QUIET) +- if (${_PYTHON_PREFIX}_COPYRIGHT MATCHES "ActiveState") +- set (${_PYTHON_PREFIX}_INTERPRETER_ID "ActivePython") +- endif() +- endif() +- endif() +- else() +- set (${_PYTHON_PREFIX}_INTERPRETER_ID Python) +- endif() +- else() +- unset (${_PYTHON_PREFIX}_INTERPRETER_ID) +- endif() +- +- # retrieve various package installation directories +- execute_process (COMMAND "${${_PYTHON_PREFIX}_EXECUTABLE}" -c "import sys; from distutils import sysconfig;sys.stdout.write(';'.join([sysconfig.get_python_lib(plat_specific=False,standard_lib=True),sysconfig.get_python_lib(plat_specific=True,standard_lib=True),sysconfig.get_python_lib(plat_specific=False,standard_lib=False),sysconfig.get_python_lib(plat_specific=True,standard_lib=False)]))" +- +- RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT +- OUTPUT_VARIABLE _${_PYTHON_PREFIX}_LIBPATHS +- ERROR_QUIET) +- if (NOT _${_PYTHON_PREFIX}_RESULT) +- list (GET _${_PYTHON_PREFIX}_LIBPATHS 0 ${_PYTHON_PREFIX}_STDLIB) +- list (GET _${_PYTHON_PREFIX}_LIBPATHS 1 ${_PYTHON_PREFIX}_STDARCH) +- list (GET _${_PYTHON_PREFIX}_LIBPATHS 2 ${_PYTHON_PREFIX}_SITELIB) +- list (GET _${_PYTHON_PREFIX}_LIBPATHS 3 ${_PYTHON_PREFIX}_SITEARCH) +- else() +- unset (${_PYTHON_PREFIX}_STDLIB) +- unset (${_PYTHON_PREFIX}_STDARCH) +- unset (${_PYTHON_PREFIX}_SITELIB) +- unset (${_PYTHON_PREFIX}_SITEARCH) +- endif() +- +- mark_as_advanced (${_PYTHON_PREFIX}_EXECUTABLE) +-endif() +- +- +-# second step, search for compiler (IronPython) +-if ("Compiler" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS) +- list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_COMPILER) +- if (${_PYTHON_PREFIX}_FIND_REQUIRED_Compiler) +- list (APPEND _${_PYTHON_PREFIX}_REQUIRED_VARS ${_PYTHON_PREFIX}_COMPILER) +- endif() +- +- # IronPython specific artifacts +- # If IronPython interpreter is found, use its path +- unset (_${_PYTHON_PREFIX}_IRON_ROOT) +- if (${_PYTHON_PREFIX}_Interpreter_FOUND AND ${_PYTHON_PREFIX}_INTERPRETER_ID STREQUAL "IronPython") +- get_filename_component (_${_PYTHON_PREFIX}_IRON_ROOT "${${_PYTHON_PREFIX}_EXECUTABLE}" DIRECTORY) +- endif() +- +- # try using root dir and registry +- foreach (_${_PYTHON_PREFIX}_VERSION IN LISTS _${_PYTHON_PREFIX}_FIND_VERSIONS) +- if (_${_PYTHON_PREFIX}_FIND_REGISTRY STREQUAL "FIRST") +- find_program (${_PYTHON_PREFIX}_COMPILER +- NAMES ipyc +- HINTS ${_${_PYTHON_PREFIX}_IRON_ROOT} ${_${_PYTHON_PREFIX}_HINTS} +- PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\IronPython\\${_${_PYTHON_PREFIX}_VERSION}\\InstallPath] +- PATH_SUFFIXES ${_${_PYTHON_PREFIX}_IRON_PYTHON_PATH_SUFFIXES} +- NO_SYSTEM_ENVIRONMENT_PATH +- NO_CMAKE_SYSTEM_PATH) +- endif() +- +- find_program (${_PYTHON_PREFIX}_COMPILER +- NAMES ipyc +- HINTS ${_${_PYTHON_PREFIX}_IRON_ROOT} ${_${_PYTHON_PREFIX}_HINTS} +- PATH_SUFFIXES ${_${_PYTHON_PREFIX}_IRON_PYTHON_PATH_SUFFIXES} +- NO_SYSTEM_ENVIRONMENT_PATH +- NO_CMAKE_SYSTEM_PATH) +- +- if (_${_PYTHON_PREFIX}_FIND_REGISTRY STREQUAL "LAST") +- find_program (${_PYTHON_PREFIX}_COMPILER +- NAMES ipyc +- PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\IronPython\\${_${_PYTHON_PREFIX}_VERSION}\\InstallPath] +- PATH_SUFFIXES ${_${_PYTHON_PREFIX}_IRON_PYTHON_PATH_SUFFIXES} +- NO_DEFAULT_PATH) +- endif() +- +- _python_validate_compiler (${_${_PYTHON_PREFIX}_VERSION}) +- if (${_PYTHON_PREFIX}_COMPILER) +- break() +- endif() +- endforeach() +- +- # no specific version found, re-try in standard paths +- find_program (${_PYTHON_PREFIX}_COMPILER +- NAMES ipyc +- HINTS ${_${_PYTHON_PREFIX}_IRON_ROOT} ${_${_PYTHON_PREFIX}_HINTS} +- PATH_SUFFIXES ${_${_PYTHON_PREFIX}_IRON_PYTHON_PATH_SUFFIXES}) +- +- if (${_PYTHON_PREFIX}_COMPILER) +- # retrieve python environment version from compiler +- set (_${_PYTHON_PREFIX}_VERSION_DIR "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PythonCompilerVersion.dir") +- file (WRITE "${_${_PYTHON_PREFIX}_VERSION_DIR}/version.py" "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:3]]))\n") +- execute_process (COMMAND "${${_PYTHON_PREFIX}_COMPILER}" /target:exe /embed "${_${_PYTHON_PREFIX}_VERSION_DIR}/version.py" +- WORKING_DIRECTORY "${_${_PYTHON_PREFIX}_VERSION_DIR}" +- OUTPUT_QUIET +- ERROR_QUIET) +- execute_process (COMMAND "${_${_PYTHON_PREFIX}_VERSION_DIR}/version" +- WORKING_DIRECTORY "${_${_PYTHON_PREFIX}_VERSION_DIR}" +- RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT +- OUTPUT_VARIABLE _${_PYTHON_PREFIX}_VERSION +- ERROR_QUIET) +- if (NOT _${_PYTHON_PREFIX}_RESULT) +- string (REGEX MATCHALL "[0-9]+" _${_PYTHON_PREFIX}_VERSIONS "${_${_PYTHON_PREFIX}_VERSION}") +- list (GET _${_PYTHON_PREFIX}_VERSIONS 0 _${_PYTHON_PREFIX}_VERSION_MAJOR) +- list (GET _${_PYTHON_PREFIX}_VERSIONS 1 _${_PYTHON_PREFIX}_VERSION_MINOR) +- list (GET _${_PYTHON_PREFIX}_VERSIONS 2 _${_PYTHON_PREFIX}_VERSION_PATCH) +- +- if (NOT ${_PYTHON_PREFIX}_Interpreter_FOUND) +- # set public version information +- set (${_PYTHON_PREFIX}_VERSION ${_${_PYTHON_PREFIX}_VERSION}) +- set (${_PYTHON_PREFIX}_VERSION_MAJOR ${_${_PYTHON_PREFIX}_VERSION_MAJOR}) +- set (${_PYTHON_PREFIX}_VERSION_MINOR ${_${_PYTHON_PREFIX}_VERSION_MINOR}) +- set (${_PYTHON_PREFIX}_VERSION_PATCH ${_${_PYTHON_PREFIX}_VERSION_PATCH}) +- endif() +- else() +- # compiler not usable +- set (${_PYTHON_PREFIX}_COMPILER ${_PYTHON_PREFIX}_COMPILER-NOTFOUND CACHE INTERNAL "" FORCE) +- endif() +- file (REMOVE_RECURSE "${_${_PYTHON_PREFIX}_VERSION_DIR}") +- endif() +- +- if (${_PYTHON_PREFIX}_COMPILER) +- if (${_PYTHON_PREFIX}_Interpreter_FOUND) +- # Compiler must be compatible with interpreter +- if (${_${_PYTHON_PREFIX}_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_VERSION_MINOR} VERSION_EQUAL ${${_PYTHON_PREFIX}_VERSION_MAJOR}.${${_PYTHON_PREFIX}_VERSION_MINOR}) +- set (${_PYTHON_PREFIX}_Compiler_FOUND TRUE) +- endif() +- elseif (${_PYTHON_PREFIX}_VERSION_MAJOR VERSION_EQUAL _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR) +- set (${_PYTHON_PREFIX}_Compiler_FOUND TRUE) +- # Use compiler version for future searches to ensure consistency +- set (_${_PYTHON_PREFIX}_FIND_VERSIONS ${${_PYTHON_PREFIX}_VERSION_MAJOR}.${${_PYTHON_PREFIX}_VERSION_MINOR}) +- endif() +- endif() +- +- if (${_PYTHON_PREFIX}_Compiler_FOUND) +- set (${_PYTHON_PREFIX}_COMPILER_ID IronPython) +- else() +- unset (${_PYTHON_PREFIX}_COMPILER_ID) +- endif() +- +- mark_as_advanced (${_PYTHON_PREFIX}_COMPILER) +-endif() +- +- +-# third step, search for the development artifacts +-## Development environment is not compatible with IronPython interpreter +-if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS +- AND NOT ${_PYTHON_PREFIX}_INTERPRETER_ID STREQUAL "IronPython") +- list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_LIBRARY +- ${_PYTHON_PREFIX}_LIBRARY_RELEASE +- ${_PYTHON_PREFIX}_RUNTIME_LIBRARY_RELEASE +- ${_PYTHON_PREFIX}_LIBRARY_DEBUG +- ${_PYTHON_PREFIX}_RUNTIME_LIBRARY_DEBUG +- ${_PYTHON_PREFIX}_INCLUDE_DIR) +- if (${_PYTHON_PREFIX}_FIND_REQUIRED_Development) +- list (APPEND _${_PYTHON_PREFIX}_REQUIRED_VARS ${_PYTHON_PREFIX}_LIBRARY +- ${_PYTHON_PREFIX}_INCLUDE_DIR) +- endif() +- +- # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES +- unset (_${_PYTHON_PREFIX}_CMAKE_FIND_LIBRARY_SUFFIXES) +- if (DEFINED ${_PYTHON_PREFIX}_USE_STATIC_LIBS AND NOT WIN32) +- set(_${_PYTHON_PREFIX}_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) +- if(${_PYTHON_PREFIX}_USE_STATIC_LIBS) +- set (CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX}) +- else() +- list (REMOVE_ITEM CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX}) +- endif() +- else() +- endif() +- +- # if python interpreter is found, use its location and version to ensure consistency +- # between interpreter and development environment +- unset (_${_PYTHON_PREFIX}_PREFIX) +- if (${_PYTHON_PREFIX}_Interpreter_FOUND) +- execute_process (COMMAND "${${_PYTHON_PREFIX}_EXECUTABLE}" -c +- "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.PREFIX)" +- RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT +- OUTPUT_VARIABLE _${_PYTHON_PREFIX}_PREFIX +- ERROR_QUIET +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- if (_${_PYTHON_PREFIX}_RESULT) +- unset (_${_PYTHON_PREFIX}_PREFIX) +- endif() +- endif() +- set (_${_PYTHON_PREFIX}_HINTS "${_${_PYTHON_PREFIX}_PREFIX}" "${${_PYTHON_PREFIX}_ROOT_DIR}" ENV ${_PYTHON_PREFIX}_ROOT_DIR) +- +- foreach (_${_PYTHON_PREFIX}_VERSION IN LISTS _${_PYTHON_PREFIX}_FIND_VERSIONS) +- string (REPLACE "." "" _${_PYTHON_PREFIX}_VERSION_NO_DOTS ${_${_PYTHON_PREFIX}_VERSION}) +- +- # try to use pythonX.Y-config tool +- set (_${_PYTHON_PREFIX}_CONFIG_NAMES) +- if (DEFINED CMAKE_LIBRARY_ARCHITECTURE) +- set (_${_PYTHON_PREFIX}_CONFIG_NAMES "${CMAKE_LIBRARY_ARCHITECTURE}-python${_${_PYTHON_PREFIX}_VERSION}-config") +- endif() +- list (APPEND _${_PYTHON_PREFIX}_CONFIG_NAMES "python${_${_PYTHON_PREFIX}_VERSION}-config") +- find_program (_${_PYTHON_PREFIX}_CONFIG +- NAMES ${_${_PYTHON_PREFIX}_CONFIG_NAMES} +- NAMES_PER_DIR +- HINTS ${_${_PYTHON_PREFIX}_HINTS} +- PATH_SUFFIXES bin) +- unset (_${_PYTHON_PREFIX}_CONFIG_NAMES) +- +- if (NOT _${_PYTHON_PREFIX}_CONFIG) +- continue() +- endif() +- if (DEFINED CMAKE_LIBRARY_ARCHITECTURE) +- # check that config tool match library architecture +- execute_process (COMMAND "${_${_PYTHON_PREFIX}_CONFIG}" --configdir +- RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT +- OUTPUT_VARIABLE _${_PYTHON_PREFIX}_CONFIGDIR +- ERROR_QUIET +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- if (_${_PYTHON_PREFIX}_RESULT) +- unset (_${_PYTHON_PREFIX}_CONFIG CACHE) +- continue() +- endif() +- string(FIND "${_${_PYTHON_PREFIX}_CONFIGDIR}" "${CMAKE_LIBRARY_ARCHITECTURE}" _${_PYTHON_PREFIX}_RESULT) +- if (_${_PYTHON_PREFIX}_RESULT EQUAL -1) +- unset (_${_PYTHON_PREFIX}_CONFIG CACHE) +- continue() +- endif() +- endif() +- +- # retrieve root install directory +- execute_process (COMMAND "${_${_PYTHON_PREFIX}_CONFIG}" --prefix +- RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT +- OUTPUT_VARIABLE _${_PYTHON_PREFIX}_PREFIX +- ERROR_QUIET +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- if (_${_PYTHON_PREFIX}_RESULT) +- # python-config is not usable +- unset (_${_PYTHON_PREFIX}_CONFIG CACHE) +- continue() +- endif() +- set (_${_PYTHON_PREFIX}_HINTS "${_${_PYTHON_PREFIX}_PREFIX}" "${${_PYTHON_PREFIX}_ROOT_DIR}" ENV ${_PYTHON_PREFIX}_ROOT_DIR) +- +- # retrieve library +- execute_process (COMMAND "${_${_PYTHON_PREFIX}_CONFIG}" --ldflags +- RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT +- OUTPUT_VARIABLE _${_PYTHON_PREFIX}_FLAGS +- ERROR_QUIET +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- if (NOT _${_PYTHON_PREFIX}_RESULT) +- # retrieve library directory +- string (REGEX MATCHALL "-L[^ ]+" _${_PYTHON_PREFIX}_LIB_DIRS "${_${_PYTHON_PREFIX}_FLAGS}") +- string (REPLACE "-L" "" _${_PYTHON_PREFIX}_LIB_DIRS "${_${_PYTHON_PREFIX}_LIB_DIRS}") +- list (REMOVE_DUPLICATES _${_PYTHON_PREFIX}_LIB_DIRS) +- # retrieve library name +- string (REGEX MATCHALL "-lpython[^ ]+" _${_PYTHON_PREFIX}_LIB_NAMES "${_${_PYTHON_PREFIX}_FLAGS}") +- string (REPLACE "-l" "" _${_PYTHON_PREFIX}_LIB_NAMES "${_${_PYTHON_PREFIX}_LIB_NAMES}") +- list (REMOVE_DUPLICATES _${_PYTHON_PREFIX}_LIB_NAMES) +- +- find_library (${_PYTHON_PREFIX}_LIBRARY_RELEASE +- NAMES ${_${_PYTHON_PREFIX}_LIB_NAMES} +- NAMES_PER_DIR +- HINTS ${_${_PYTHON_PREFIX}_HINTS} ${_${_PYTHON_PREFIX}_LIB_DIRS} +- PATH_SUFFIXES lib +- NO_SYSTEM_ENVIRONMENT_PATH +- NO_CMAKE_SYSTEM_PATH) +- # retrieve runtime library +- if (${_PYTHON_PREFIX}_LIBRARY_RELEASE) +- get_filename_component (_${_PYTHON_PREFIX}_PATH "${${_PYTHON_PREFIX}_LIBRARY_RELEASE}" DIRECTORY) +- get_filename_component (_${_PYTHON_PREFIX}_PATH2 "${_${_PYTHON_PREFIX}_PATH}" DIRECTORY) +- _python_find_runtime_library (${_PYTHON_PREFIX}_RUNTIME_LIBRARY_RELEASE +- NAMES ${_${_PYTHON_PREFIX}_LIB_NAMES} +- NAMES_PER_DIR +- HINTS "${_${_PYTHON_PREFIX}_PATH}" "${_${_PYTHON_PREFIX}_PATH2}" ${_${_PYTHON_PREFIX}_HINTS} +- PATH_SUFFIXES bin +- NO_SYSTEM_ENVIRONMENT_PATH +- NO_CMAKE_SYSTEM_PATH) +- endif() +- endif() +- +- # retrieve include directory +- execute_process (COMMAND "${_${_PYTHON_PREFIX}_CONFIG}" --includes +- RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT +- OUTPUT_VARIABLE _${_PYTHON_PREFIX}_FLAGS +- ERROR_QUIET +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- if (NOT _${_PYTHON_PREFIX}_RESULT) +- # retrieve include directory +- string (REGEX MATCHALL "-I[^ ]+" _${_PYTHON_PREFIX}_INCLUDE_DIRS "${_${_PYTHON_PREFIX}_FLAGS}") +- string (REPLACE "-I" "" _${_PYTHON_PREFIX}_INCLUDE_DIRS "${_${_PYTHON_PREFIX}_INCLUDE_DIRS}") +- list (REMOVE_DUPLICATES _${_PYTHON_PREFIX}_INCLUDE_DIRS) +- +- find_path (${_PYTHON_PREFIX}_INCLUDE_DIR +- NAMES Python.h +- HINTS ${_${_PYTHON_PREFIX}_INCLUDE_DIRS} +- NO_SYSTEM_ENVIRONMENT_PATH +- NO_CMAKE_SYSTEM_PATH) +- endif() +- +- if (${_PYTHON_PREFIX}_LIBRARY_RELEASE AND ${_PYTHON_PREFIX}_INCLUDE_DIR) +- break() +- endif() +- endforeach() +- +- # Rely on HINTS and standard paths if config tool failed to locate artifacts +- if (NOT (${_PYTHON_PREFIX}_LIBRARY_RELEASE OR ${_PYTHON_PREFIX}_LIBRARY_DEBUG) OR NOT ${_PYTHON_PREFIX}_INCLUDE_DIR) +- foreach (_${_PYTHON_PREFIX}_VERSION IN LISTS _${_PYTHON_PREFIX}_FIND_VERSIONS) +- string (REPLACE "." "" _${_PYTHON_PREFIX}_VERSION_NO_DOTS ${_${_PYTHON_PREFIX}_VERSION}) +- +- _python_get_frameworks (_${_PYTHON_PREFIX}_FRAMEWORK_PATHS ${_${_PYTHON_PREFIX}_VERSION}) +- +- set (_${_PYTHON_PREFIX}_REGISTRY_PATHS +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}\\InstallPath] +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_${_PYTHON_PREFIX}_VERSION}\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH}\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\ContinuumAnalytics\\Anaconda${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}-${_${_PYTHON_PREFIX}_ARCH2}\\InstallPath]) +- +- if (APPLE AND _${_PYTHON_PREFIX}_FIND_FRAMEWORK STREQUAL "FIRST") +- find_library (${_PYTHON_PREFIX}_LIBRARY_RELEASE +- NAMES python${_${_PYTHON_PREFIX}_VERSION_NO_DOTS} +- python${_${_PYTHON_PREFIX}_VERSION}mu +- python${_${_PYTHON_PREFIX}_VERSION}m +- python${_${_PYTHON_PREFIX}_VERSION}u +- python${_${_PYTHON_PREFIX}_VERSION} +- NAMES_PER_DIR +- PATHS ${_${_PYTHON_PREFIX}_FRAMEWORK_PATHS} +- PATH_SUFFIXES lib/${CMAKE_LIBRARY_ARCHITECTURE} lib libs +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config-${_${_PYTHON_PREFIX}_VERSION}mu +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config-${_${_PYTHON_PREFIX}_VERSION}m +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config-${_${_PYTHON_PREFIX}_VERSION}u +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config-${_${_PYTHON_PREFIX}_VERSION} +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config +- NO_CMAKE_PATH +- NO_CMAKE_ENVIRONMENT_PATH +- NO_SYSTEM_ENVIRONMENT_PATH +- NO_CMAKE_SYSTEM_PATH) +- endif() +- +- if (WIN32 AND _${_PYTHON_PREFIX}_FIND_REGISTRY STREQUAL "FIRST") +- find_library (${_PYTHON_PREFIX}_LIBRARY_RELEASE +- NAMES python${_${_PYTHON_PREFIX}_VERSION_NO_DOTS} +- python${_${_PYTHON_PREFIX}_VERSION}mu +- python${_${_PYTHON_PREFIX}_VERSION}m +- python${_${_PYTHON_PREFIX}_VERSION}u +- python${_${_PYTHON_PREFIX}_VERSION} +- NAMES_PER_DIR +- HINTS ${_${_PYTHON_PREFIX}_HINTS} +- PATHS ${_${_PYTHON_PREFIX}_REGISTRY_PATHS} +- PATH_SUFFIXES lib/${CMAKE_LIBRARY_ARCHITECTURE} lib libs +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config-${_${_PYTHON_PREFIX}_VERSION}mu +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config-${_${_PYTHON_PREFIX}_VERSION}m +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config-${_${_PYTHON_PREFIX}_VERSION}u +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config-${_${_PYTHON_PREFIX}_VERSION} +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config +- NO_SYSTEM_ENVIRONMENT_PATH +- NO_CMAKE_SYSTEM_PATH) +- endif() +- +- # search in HINTS locations +- find_library (${_PYTHON_PREFIX}_LIBRARY_RELEASE +- NAMES python${_${_PYTHON_PREFIX}_VERSION_NO_DOTS} +- python${_${_PYTHON_PREFIX}_VERSION}mu +- python${_${_PYTHON_PREFIX}_VERSION}m +- python${_${_PYTHON_PREFIX}_VERSION}u +- python${_${_PYTHON_PREFIX}_VERSION} +- NAMES_PER_DIR +- HINTS ${_${_PYTHON_PREFIX}_HINTS} +- PATH_SUFFIXES lib/${CMAKE_LIBRARY_ARCHITECTURE} lib libs +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config-${_${_PYTHON_PREFIX}_VERSION}mu +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config-${_${_PYTHON_PREFIX}_VERSION}m +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config-${_${_PYTHON_PREFIX}_VERSION}u +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config-${_${_PYTHON_PREFIX}_VERSION} +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config +- NO_SYSTEM_ENVIRONMENT_PATH +- NO_CMAKE_SYSTEM_PATH) +- +- if (APPLE AND _${_PYTHON_PREFIX}_FIND_FRAMEWORK STREQUAL "LAST") +- set (__${_PYTHON_PREFIX}_FRAMEWORK_PATHS ${_${_PYTHON_PREFIX}_FRAMEWORK_PATHS}) +- else() +- unset (__${_PYTHON_PREFIX}_FRAMEWORK_PATHS) +- endif() +- +- if (WIN32 AND _${_PYTHON_PREFIX}_FIND_REGISTRY STREQUAL "LAST") +- set (__${_PYTHON_PREFIX}_REGISTRY_PATHS ${_${_PYTHON_PREFIX}_REGISTRY_PATHS}) +- else() +- unset (__${_PYTHON_PREFIX}_REGISTRY_PATHS) +- endif() +- +- # search in all default paths +- find_library (${_PYTHON_PREFIX}_LIBRARY_RELEASE +- NAMES python${_${_PYTHON_PREFIX}_VERSION_NO_DOTS} +- python${_${_PYTHON_PREFIX}_VERSION}mu +- python${_${_PYTHON_PREFIX}_VERSION}m +- python${_${_PYTHON_PREFIX}_VERSION}u +- python${_${_PYTHON_PREFIX}_VERSION} +- NAMES_PER_DIR +- PATHS ${__${_PYTHON_PREFIX}_FRAMEWORK_PATHS} +- ${__${_PYTHON_PREFIX}_REGISTRY_PATHS} +- PATH_SUFFIXES lib/${CMAKE_LIBRARY_ARCHITECTURE} lib libs +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config-${_${_PYTHON_PREFIX}_VERSION}mu +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config-${_${_PYTHON_PREFIX}_VERSION}m +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config-${_${_PYTHON_PREFIX}_VERSION}u +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config-${_${_PYTHON_PREFIX}_VERSION} +- lib/python${_${_PYTHON_PREFIX}_VERSION}/config) +- # retrieve runtime library +- if (${_PYTHON_PREFIX}_LIBRARY_RELEASE) +- get_filename_component (_${_PYTHON_PREFIX}_PATH "${${_PYTHON_PREFIX}_LIBRARY_RELEASE}" DIRECTORY) +- get_filename_component (_${_PYTHON_PREFIX}_PATH2 "${_${_PYTHON_PREFIX}_PATH}" DIRECTORY) +- _python_find_runtime_library (${_PYTHON_PREFIX}_RUNTIME_LIBRARY_RELEASE +- NAMES python${_${_PYTHON_PREFIX}_VERSION_NO_DOTS} +- python${_${_PYTHON_PREFIX}_VERSION}mu +- python${_${_PYTHON_PREFIX}_VERSION}m +- python${_${_PYTHON_PREFIX}_VERSION}u +- python${_${_PYTHON_PREFIX}_VERSION} +- NAMES_PER_DIR +- HINTS "${_${_PYTHON_PREFIX}_PATH}" "${_${_PYTHON_PREFIX}_PATH2}" ${_${_PYTHON_PREFIX}_HINTS} +- PATH_SUFFIXES bin) +- endif() +- +- if (WIN32) +- # search for debug library +- if (${_PYTHON_PREFIX}_LIBRARY_RELEASE) +- # use library location as a hint +- get_filename_component (_${_PYTHON_PREFIX}_PATH "${${_PYTHON_PREFIX}_LIBRARY_RELEASE}" DIRECTORY) +- find_library (${_PYTHON_PREFIX}_LIBRARY_DEBUG +- NAMES python${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}_d +- NAMES_PER_DIR +- HINTS "${_${_PYTHON_PREFIX}_PATH}" ${_${_PYTHON_PREFIX}_HINTS} +- NO_DEFAULT_PATH) +- else() +- # search first in known locations +- if (_${_PYTHON_PREFIX}_FIND_REGISTRY STREQUAL "FIRST") +- find_library (${_PYTHON_PREFIX}_LIBRARY_DEBUG +- NAMES python${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}_d +- NAMES_PER_DIR +- HINTS ${_${_PYTHON_PREFIX}_HINTS} +- PATHS ${_${_PYTHON_PREFIX}_REGISTRY_PATHS} +- PATH_SUFFIXES lib libs +- NO_SYSTEM_ENVIRONMENT_PATH +- NO_CMAKE_SYSTEM_PATH) +- endif() +- # search in all default paths +- find_library (${_PYTHON_PREFIX}_LIBRARY_DEBUG +- NAMES python${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}_d +- NAMES_PER_DIR +- HINTS ${_${_PYTHON_PREFIX}_HINTS} +- PATHS ${__${_PYTHON_PREFIX}_REGISTRY_PATHS} +- PATH_SUFFIXES lib libs) +- endif() +- if (${_PYTHON_PREFIX}_LIBRARY_DEBUG) +- get_filename_component (_${_PYTHON_PREFIX}_PATH "${${_PYTHON_PREFIX}_LIBRARY_DEBUG}" DIRECTORY) +- get_filename_component (_${_PYTHON_PREFIX}_PATH2 "${_${_PYTHON_PREFIX}_PATH}" DIRECTORY) +- _python_find_runtime_library (${_PYTHON_PREFIX}_RUNTIME_LIBRARY_DEBUG +- NAMES python${_${_PYTHON_PREFIX}_VERSION_NO_DOTS}_d +- NAMES_PER_DIR +- HINTS "${_${_PYTHON_PREFIX}_PATH}" "${_${_PYTHON_PREFIX}_PATH2}" ${_${_PYTHON_PREFIX}_HINTS} +- PATH_SUFFIXES bin) +- endif() +- endif() +- +- # Don't search for include dir until library location is known +- if (${_PYTHON_PREFIX}_LIBRARY_RELEASE OR ${_PYTHON_PREFIX}_LIBRARY_DEBUG) +- unset (_${_PYTHON_PREFIX}_INCLUDE_HINTS) +- +- if (${_PYTHON_PREFIX}_EXECUTABLE) +- # pick up include directory from configuration +- execute_process (COMMAND "${${_PYTHON_PREFIX}_EXECUTABLE}" -c +- "import sys; import sysconfig; sys.stdout.write(sysconfig.get_path('include'))" +- RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT +- OUTPUT_VARIABLE _${_PYTHON_PREFIX}_PATH +- ERROR_QUIET +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- if (NOT _${_PYTHON_PREFIX}_RESULT) +- file (TO_CMAKE_PATH "${_${_PYTHON_PREFIX}_PATH}" _${_PYTHON_PREFIX}_PATH) +- list (APPEND _${_PYTHON_PREFIX}_INCLUDE_HINTS "${_${_PYTHON_PREFIX}_PATH}") +- endif() +- endif() +- +- foreach (_${_PYTHON_PREFIX}_LIB IN ITEMS ${_PYTHON_PREFIX}_LIBRARY_RELEASE ${_PYTHON_PREFIX}_LIBRARY_DEBUG) +- if (${_${_PYTHON_PREFIX}_LIB}) +- # Use the library's install prefix as a hint +- if (${_${_PYTHON_PREFIX}_LIB} MATCHES "^(.+/Frameworks/Python.framework/Versions/[0-9.]+)") +- list (APPEND _${_PYTHON_PREFIX}_INCLUDE_HINTS "${CMAKE_MATCH_1}") +- elseif (${_${_PYTHON_PREFIX}_LIB} MATCHES "^(.+)/lib(64|32)?/python[0-9.]+/config") +- list (APPEND _${_PYTHON_PREFIX}_INCLUDE_HINTS "${CMAKE_MATCH_1}") +- elseif (DEFINED CMAKE_LIBRARY_ARCHITECTURE AND ${_${_PYTHON_PREFIX}_LIB} MATCHES "^(.+)/lib/${CMAKE_LIBRARY_ARCHITECTURE}") +- list (APPEND _${_PYTHON_PREFIX}_INCLUDE_HINTS "${CMAKE_MATCH_1}") +- else() +- # assume library is in a directory under root +- get_filename_component (_${_PYTHON_PREFIX}_PREFIX "${${_${_PYTHON_PREFIX}_LIB}}" DIRECTORY) +- get_filename_component (_${_PYTHON_PREFIX}_PREFIX "${_${_PYTHON_PREFIX}_PREFIX}" DIRECTORY) +- list (APPEND _${_PYTHON_PREFIX}_INCLUDE_HINTS "${_${_PYTHON_PREFIX}_PREFIX}") +- endif() +- endif() +- endforeach() +- list (REMOVE_DUPLICATES _${_PYTHON_PREFIX}_INCLUDE_HINTS) +- +- if (APPLE AND _${_PYTHON_PREFIX}_FIND_FRAMEWORK STREQUAL "FIRST") +- find_path (${_PYTHON_PREFIX}_INCLUDE_DIR +- NAMES Python.h +- HINTS ${_${_PYTHON_PREFIX}_HINTS} +- PATHS ${_${_PYTHON_PREFIX}_FRAMEWORK_PATHS} +- PATH_SUFFIXES include/python${_${_PYTHON_PREFIX}_VERSION}mu +- include/python${_${_PYTHON_PREFIX}_VERSION}m +- include/python${_${_PYTHON_PREFIX}_VERSION}u +- include/python${_${_PYTHON_PREFIX}_VERSION} +- include +- NO_CMAKE_PATH +- NO_CMAKE_ENVIRONMENT_PATH +- NO_SYSTEM_ENVIRONMENT_PATH +- NO_CMAKE_SYSTEM_PATH) +- endif() +- +- if (WIN32 AND _${_PYTHON_PREFIX}_FIND_REGISTRY STREQUAL "FIRST") +- find_path (${_PYTHON_PREFIX}_INCLUDE_DIR +- NAMES Python.h +- HINTS ${_${_PYTHON_PREFIX}_INCLUDE_HINTS} ${_${_PYTHON_PREFIX}_HINTS} +- PATHS ${_${_PYTHON_PREFIX}_REGISTRY_PATHS} +- PATH_SUFFIXES include/python${_${_PYTHON_PREFIX}_VERSION}mu +- include/python${_${_PYTHON_PREFIX}_VERSION}m +- include/python${_${_PYTHON_PREFIX}_VERSION}u +- include/python${_${_PYTHON_PREFIX}_VERSION} +- include +- NO_SYSTEM_ENVIRONMENT_PATH +- NO_CMAKE_SYSTEM_PATH) +- endif() +- +- find_path (${_PYTHON_PREFIX}_INCLUDE_DIR +- NAMES Python.h +- HINTS ${_${_PYTHON_PREFIX}_INCLUDE_HINTS} ${_${_PYTHON_PREFIX}_HINTS} +- PATHS ${__${_PYTHON_PREFIX}_FRAMEWORK_PATHS} +- ${__${_PYTHON_PREFIX}_REGISTRY_PATHS} +- PATH_SUFFIXES include/python${_${_PYTHON_PREFIX}_VERSION}mu +- include/python${_${_PYTHON_PREFIX}_VERSION}m +- include/python${_${_PYTHON_PREFIX}_VERSION}u +- include/python${_${_PYTHON_PREFIX}_VERSION} +- include +- NO_SYSTEM_ENVIRONMENT_PATH +- NO_CMAKE_SYSTEM_PATH) +- endif() +- +- if ((${_PYTHON_PREFIX}_LIBRARY_RELEASE OR ${_PYTHON_PREFIX}_LIBRARY_DEBUG) AND ${_PYTHON_PREFIX}_INCLUDE_DIR) +- break() +- endif() +- endforeach() +- +- # search header file in standard locations +- find_path (${_PYTHON_PREFIX}_INCLUDE_DIR +- NAMES Python.h) +- endif() +- +- if (${_PYTHON_PREFIX}_INCLUDE_DIR) +- # retrieve version from header file +- file (STRINGS "${${_PYTHON_PREFIX}_INCLUDE_DIR}/patchlevel.h" _${_PYTHON_PREFIX}_VERSION +- REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"") +- string (REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1" +- _${_PYTHON_PREFIX}_VERSION "${_${_PYTHON_PREFIX}_VERSION}") +- string (REGEX MATCHALL "[0-9]+" _${_PYTHON_PREFIX}_VERSIONS "${_${_PYTHON_PREFIX}_VERSION}") +- list (GET _${_PYTHON_PREFIX}_VERSIONS 0 _${_PYTHON_PREFIX}_VERSION_MAJOR) +- list (GET _${_PYTHON_PREFIX}_VERSIONS 1 _${_PYTHON_PREFIX}_VERSION_MINOR) +- list (GET _${_PYTHON_PREFIX}_VERSIONS 2 _${_PYTHON_PREFIX}_VERSION_PATCH) +- +- if (NOT ${_PYTHON_PREFIX}_Interpreter_FOUND AND NOT ${_PYTHON_PREFIX}_Compiler_FOUND) +- # set public version information +- set (${_PYTHON_PREFIX}_VERSION ${_${_PYTHON_PREFIX}_VERSION}) +- set (${_PYTHON_PREFIX}_VERSION_MAJOR ${_${_PYTHON_PREFIX}_VERSION_MAJOR}) +- set (${_PYTHON_PREFIX}_VERSION_MINOR ${_${_PYTHON_PREFIX}_VERSION_MINOR}) +- set (${_PYTHON_PREFIX}_VERSION_PATCH ${_${_PYTHON_PREFIX}_VERSION_PATCH}) +- endif() +- endif() +- +- # define public variables +- include (SelectLibraryConfigurations) +- select_library_configurations (${_PYTHON_PREFIX}) +- if (${_PYTHON_PREFIX}_RUNTIME_LIBRARY_RELEASE) +- set (${_PYTHON_PREFIX}_RUNTIME_LIBRARY "${${_PYTHON_PREFIX}_RUNTIME_LIBRARY_RELEASE}") +- elseif (${_PYTHON_PREFIX}_RUNTIME_LIBRARY_DEBUG) +- set (${_PYTHON_PREFIX}_RUNTIME_LIBRARY "${${_PYTHON_PREFIX}_RUNTIME_LIBRARY_DEBUG}") +- else() +- set (${_PYTHON_PREFIX}_RUNTIME_LIBRARY "$${_PYTHON_PREFIX}_RUNTIME_LIBRARY-NOTFOUND") +- endif() +- +- _python_set_library_dirs (${_PYTHON_PREFIX}_LIBRARY_DIRS +- ${_PYTHON_PREFIX}_LIBRARY_RELEASE ${_PYTHON_PREFIX}_LIBRARY_DEBUG) +- if (UNIX) +- if (${_PYTHON_PREFIX}_LIBRARY_RELEASE MATCHES "${CMAKE_SHARED_LIBRARY_SUFFIX}$" +- OR ${_PYTHON_PREFIX}_LIBRARY_RELEASE MATCHES "${CMAKE_SHARED_LIBRARY_SUFFIX}$") +- set (${_PYTHON_PREFIX}_RUNTIME_LIBRARY_DIRS ${${_PYTHON_PREFIX}_LIBRARY_DIRS}) +- endif() +- else() +- _python_set_library_dirs (${_PYTHON_PREFIX}_RUNTIME_LIBRARY_DIRS +- ${_PYTHON_PREFIX}_RUNTIME_LIBRARY_RELEASE ${_PYTHON_PREFIX}_RUNTIME_LIBRARY_DEBUG) +- endif() +- +- set (${_PYTHON_PREFIX}_INCLUDE_DIRS "${${_PYTHON_PREFIX}_INCLUDE_DIR}") +- +- mark_as_advanced (${_PYTHON_PREFIX}_RUNTIME_LIBRARY_RELEASE +- ${_PYTHON_PREFIX}_RUNTIME_LIBRARY_DEBUG +- ${_PYTHON_PREFIX}_INCLUDE_DIR) +- +- if ((${_PYTHON_PREFIX}_LIBRARY_RELEASE OR ${_PYTHON_PREFIX}_LIBRARY_DEBUG) +- AND ${_PYTHON_PREFIX}_INCLUDE_DIR) +- if (${_PYTHON_PREFIX}_Interpreter_FOUND OR ${_PYTHON_PREFIX}_Compiler_FOUND) +- # development environment must be compatible with interpreter/compiler +- if (${_${_PYTHON_PREFIX}_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_VERSION_MINOR} VERSION_EQUAL ${${_PYTHON_PREFIX}_VERSION_MAJOR}.${${_PYTHON_PREFIX}_VERSION_MINOR}) +- set (${_PYTHON_PREFIX}_Development_FOUND TRUE) +- endif() +- elseif (${_PYTHON_PREFIX}_VERSION_MAJOR VERSION_EQUAL _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR) +- set (${_PYTHON_PREFIX}_Development_FOUND TRUE) +- endif() +- endif() +- +- # Restore the original find library ordering +- if (DEFINED _${_PYTHON_PREFIX}_CMAKE_FIND_LIBRARY_SUFFIXES) +- set (CMAKE_FIND_LIBRARY_SUFFIXES ${_${_PYTHON_PREFIX}_CMAKE_FIND_LIBRARY_SUFFIXES}) +- endif() +-endif() +- +-if ("NumPy" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS AND ${_PYTHON_PREFIX}_Interpreter_FOUND) +- list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR) +- if (${_PYTHON_PREFIX}_FIND_REQUIRED_NumPy) +- list (APPEND _${_PYTHON_PREFIX}_REQUIRED_VARS ${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR) +- endif() +- execute_process( +- COMMAND "${${_PYTHON_PREFIX}_EXECUTABLE}" -c +- "from __future__ import print_function\ntry: import numpy; print(numpy.get_include(), end='')\nexcept:pass\n" +- RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT +- OUTPUT_VARIABLE _${_PYTHON_PREFIX}_NumPy_PATH +- ERROR_QUIET +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- if (NOT _${_PYTHON_PREFIX}_RESULT) +- find_path(${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR +- NAMES "numpy/arrayobject.h" "numpy/numpyconfig.h" +- HINTS "${_${_PYTHON_PREFIX}_NumPy_PATH}" +- NO_DEFAULT_PATH) +- endif() +- if(${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR) +- set(${_PYTHON_PREFIX}_NumPy_INCLUDE_DIRS "${${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR}") +- set(${_PYTHON_PREFIX}_NumPy_FOUND TRUE) +- endif() +- if(${_PYTHON_PREFIX}_NumPy_FOUND) +- execute_process( +- COMMAND "${${_PYTHON_PREFIX}_EXECUTABLE}" -c +- "from __future__ import print_function\ntry: import numpy; print(numpy.__version__, end='')\nexcept:pass\n" +- RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT +- OUTPUT_VARIABLE _${_PYTHON_PREFIX}_NumPy_VERSION) +- if (NOT _${_PYTHON_PREFIX}_RESULT) +- set(${_PYTHON_PREFIX}_NumPy_VERSION "${_${_PYTHON_PREFIX}_NumPy_VERSION}") +- endif() +- endif() +- # final step: set NumPy founded only if Development component is founded as well +- if (NOT ${_PYTHON_PREFIX}_Development_FOUND) +- set(${_PYTHON_PREFIX}_NumPy_FOUND FALSE) +- endif() +-endif() +- +-# final validation +-if (${_PYTHON_PREFIX}_VERSION_MAJOR AND +- NOT ${_PYTHON_PREFIX}_VERSION_MAJOR VERSION_EQUAL _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR) +- _python_display_failure ("Could NOT find ${_PYTHON_PREFIX}: Found unsuitable major version \"${${_PYTHON_PREFIX}_VERSION_MAJOR}\", but required major version is exact version \"${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR}\"") +-endif() +- +-include (FindPackageHandleStandardArgs) +-find_package_handle_standard_args (${_PYTHON_PREFIX} +- REQUIRED_VARS ${_${_PYTHON_PREFIX}_REQUIRED_VARS} +- VERSION_VAR ${_PYTHON_PREFIX}_VERSION +- HANDLE_COMPONENTS) +- +-# Create imported targets and helper functions +-if(_${_PYTHON_PREFIX}_CMAKE_ROLE STREQUAL "PROJECT") +- if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS +- AND ${_PYTHON_PREFIX}_Interpreter_FOUND +- AND NOT TARGET ${_PYTHON_PREFIX}::Interpreter) +- add_executable (${_PYTHON_PREFIX}::Interpreter IMPORTED) +- set_property (TARGET ${_PYTHON_PREFIX}::Interpreter +- PROPERTY IMPORTED_LOCATION "${${_PYTHON_PREFIX}_EXECUTABLE}") +- endif() +- +- if ("Compiler" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS +- AND ${_PYTHON_PREFIX}_Compiler_FOUND +- AND NOT TARGET ${_PYTHON_PREFIX}::Compiler) +- add_executable (${_PYTHON_PREFIX}::Compiler IMPORTED) +- set_property (TARGET ${_PYTHON_PREFIX}::Compiler +- PROPERTY IMPORTED_LOCATION "${${_PYTHON_PREFIX}_COMPILER}") +- endif() +- +- if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS +- AND ${_PYTHON_PREFIX}_Development_FOUND AND NOT TARGET ${_PYTHON_PREFIX}::Python) +- +- if (${_PYTHON_PREFIX}_LIBRARY_RELEASE MATCHES "${CMAKE_SHARED_LIBRARY_SUFFIX}$" +- OR ${_PYTHON_PREFIX}_LIBRARY_DEBUG MATCHES "${CMAKE_SHARED_LIBRARY_SUFFIX}$" +- OR ${_PYTHON_PREFIX}_RUNTIME_LIBRARY_RELEASE OR ${_PYTHON_PREFIX}_RUNTIME_LIBRARY_DEBUG) +- set (_${_PYTHON_PREFIX}_LIBRARY_TYPE SHARED) +- else() +- set (_${_PYTHON_PREFIX}_LIBRARY_TYPE STATIC) +- endif() +- +- add_library (${_PYTHON_PREFIX}::Python ${_${_PYTHON_PREFIX}_LIBRARY_TYPE} IMPORTED) +- +- set_property (TARGET ${_PYTHON_PREFIX}::Python +- PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${${_PYTHON_PREFIX}_INCLUDE_DIR}") +- +- if ((${_PYTHON_PREFIX}_LIBRARY_RELEASE AND ${_PYTHON_PREFIX}_RUNTIME_LIBRARY_RELEASE) +- OR (${_PYTHON_PREFIX}_LIBRARY_DEBUG AND ${_PYTHON_PREFIX}_RUNTIME_LIBRARY_DEBUG)) +- # System manage shared libraries in two parts: import and runtime +- if (${_PYTHON_PREFIX}_LIBRARY_RELEASE AND ${_PYTHON_PREFIX}_LIBRARY_DEBUG) +- set_property (TARGET ${_PYTHON_PREFIX}::Python PROPERTY IMPORTED_CONFIGURATIONS RELEASE DEBUG) +- set_target_properties (${_PYTHON_PREFIX}::Python +- PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" +- IMPORTED_IMPLIB_RELEASE "${${_PYTHON_PREFIX}_LIBRARY_RELEASE}" +- IMPORTED_LOCATION_RELEASE "${${_PYTHON_PREFIX}_RUNTIME_LIBRARY_RELEASE}") +- set_target_properties (${_PYTHON_PREFIX}::Python +- PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C" +- IMPORTED_IMPLIB_DEBUG "${${_PYTHON_PREFIX}_LIBRARY_DEBUG}" +- IMPORTED_LOCATION_DEBUG "${${_PYTHON_PREFIX}_RUNTIME_LIBRARY_DEBUG}") +- else() +- set_target_properties (${_PYTHON_PREFIX}::Python +- PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C" +- IMPORTED_IMPLIB "${${_PYTHON_PREFIX}_LIBRARY}" +- IMPORTED_LOCATION "${${_PYTHON_PREFIX}_RUNTIME_LIBRARY}") +- endif() +- else() +- if (${_PYTHON_PREFIX}_LIBRARY_RELEASE AND ${_PYTHON_PREFIX}_LIBRARY_DEBUG) +- set_property (TARGET ${_PYTHON_PREFIX}::Python PROPERTY IMPORTED_CONFIGURATIONS RELEASE DEBUG) +- set_target_properties (${_PYTHON_PREFIX}::Python +- PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" +- IMPORTED_LOCATION_RELEASE "${${_PYTHON_PREFIX}_LIBRARY_RELEASE}") +- set_target_properties (${_PYTHON_PREFIX}::Python +- PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C" +- IMPORTED_LOCATION_DEBUG "${${_PYTHON_PREFIX}_LIBRARY_DEBUG}") +- else() +- set_target_properties (${_PYTHON_PREFIX}::Python +- PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C" +- IMPORTED_LOCATION "${${_PYTHON_PREFIX}_LIBRARY}") +- endif() +- endif() +- +- if (_${_PYTHON_PREFIX}_CONFIG AND _${_PYTHON_PREFIX}_LIBRARY_TYPE STREQUAL "STATIC") +- # extend link information with dependent libraries +- execute_process (COMMAND "${_${_PYTHON_PREFIX}_CONFIG}" --ldflags +- RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT +- OUTPUT_VARIABLE _${_PYTHON_PREFIX}_FLAGS +- ERROR_QUIET +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- if (NOT _${_PYTHON_PREFIX}_RESULT) +- string (REGEX MATCHALL "-[Ll][^ ]+" _${_PYTHON_PREFIX}_LINK_LIBRARIES "${_${_PYTHON_PREFIX}_FLAGS}") +- # remove elements relative to python library itself +- list (FILTER _${_PYTHON_PREFIX}_LINK_LIBRARIES EXCLUDE REGEX "-lpython") +- foreach (_${_PYTHON_PREFIX}_DIR IN LISTS ${_PYTHON_PREFIX}_LIBRARY_DIRS) +- list (FILTER _${_PYTHON_PREFIX}_LINK_LIBRARIES EXCLUDE REGEX "-L${${_PYTHON_PREFIX}_DIR}") +- endforeach() +- set_property (TARGET ${_PYTHON_PREFIX}::Python +- PROPERTY INTERFACE_LINK_LIBRARIES ${_${_PYTHON_PREFIX}_LINK_LIBRARIES}) +- endif() +- endif() +- +- # +- # PYTHON_ADD_LIBRARY ( [STATIC|SHARED|MODULE] src1 src2 ... srcN) +- # It is used to build modules for python. +- # +- function (__${_PYTHON_PREFIX}_ADD_LIBRARY prefix name) +- cmake_parse_arguments (PARSE_ARGV 2 PYTHON_ADD_LIBRARY +- "STATIC;SHARED;MODULE" "" "") +- +- unset (type) +- if (NOT (PYTHON_ADD_LIBRARY_STATIC +- OR PYTHON_ADD_LIBRARY_SHARED +- OR PYTHON_ADD_LIBRARY_MODULE)) +- set (type MODULE) +- endif() +- add_library (${name} ${type} ${ARGN}) +- target_link_libraries (${name} PRIVATE ${prefix}::Python) +- +- # customize library name to follow module name rules +- get_property (type TARGET ${name} PROPERTY TYPE) +- if (type STREQUAL "MODULE_LIBRARY") +- set_property (TARGET ${name} PROPERTY PREFIX "") +- if(CMAKE_SYSTEM_NAME STREQUAL "Windows") +- set_property (TARGET ${name} PROPERTY SUFFIX ".pyd") +- endif() +- endif() +- endfunction() +- endif() +- +- if ("NumPy" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS AND ${_PYTHON_PREFIX}_NumPy_FOUND +- AND NOT TARGET ${_PYTHON_PREFIX}::NumPy AND TARGET ${_PYTHON_PREFIX}::Python) +- add_library (${_PYTHON_PREFIX}::NumPy INTERFACE IMPORTED) +- set_property (TARGET ${_PYTHON_PREFIX}::NumPy +- PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR}") +- target_link_libraries (${_PYTHON_PREFIX}::NumPy INTERFACE ${_PYTHON_PREFIX}::Python) +- endif() +-endif() +- +-# final clean-up +- +-# Restore CMAKE_FIND_APPBUNDLE +-if (DEFINED _${_PYTHON_PREFIX}_CMAKE_FIND_APPBUNDLE) +- set (CMAKE_FIND_APPBUNDLE ${_${_PYTHON_PREFIX}_CMAKE_FIND_APPBUNDLE}) +- unset (_${_PYTHON_PREFIX}_CMAKE_FIND_APPBUNDLE) +-else() +- unset (CMAKE_FIND_APPBUNDLE) +-endif() +-# Restore CMAKE_FIND_FRAMEWORK +-if (DEFINED _${_PYTHON_PREFIX}_CMAKE_FIND_FRAMEWORK) +- set (CMAKE_FIND_FRAMEWORK ${_${_PYTHON_PREFIX}_CMAKE_FIND_FRAMEWORK}) +- unset (_${_PYTHON_PREFIX}_CMAKE_FIND_FRAMEWORK) +-else() +- unset (CMAKE_FIND_FRAMEWORK) +-endif() +- +-unset (_${_PYTHON_PREFIX}_CONFIG CACHE) +diff --git a/cmake/cython/python/FindPython2.cmake b/cmake/cython/python/FindPython2.cmake +deleted file mode 100644 +index b9c0b6b..0000000 +--- a/cmake/cython/python/FindPython2.cmake ++++ /dev/null +@@ -1,189 +0,0 @@ +-# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +-# file Copyright.txt or https://cmake.org/licensing for details. +- +-#[=======================================================================[.rst: +-FindPython2 +------------ +- +-Find Python 2 interpreter, compiler and development environment (include +-directories and libraries). +- +-Three components are supported: +- +-* ``Interpreter``: search for Python 2 interpreter +-* ``Compiler``: search for Python 2 compiler. Only offered by IronPython. +-* ``Development``: search for development artifacts (include directories and +- libraries) +-* ``NumPy``: search for NumPy include directories. +- +-If no ``COMPONENTS`` is specified, ``Interpreter`` is assumed. +- +-To ensure consistent versions between components ``Interpreter``, ``Compiler``, +-``Development`` and ``NumPy``, specify all components at the same time:: +- +- find_package (Python2 COMPONENTS Interpreter Development) +- +-This module looks only for version 2 of Python. This module can be used +-concurrently with :module:`FindPython3` module to use both Python versions. +- +-The :module:`FindPython` module can be used if Python version does not matter +-for you. +- +-.. note:: +- +- If components ``Interpreter`` and ``Development`` are both specified, this +- module search only for interpreter with same platform architecture as the one +- defined by ``CMake`` configuration. This contraint does not apply if only +- ``Interpreter`` component is specified. +- +-Imported Targets +-^^^^^^^^^^^^^^^^ +- +-This module defines the following :ref:`Imported Targets ` +-(when :prop_gbl:`CMAKE_ROLE` is ``PROJECT``): +- +-``Python2::Interpreter`` +- Python 2 interpreter. Target defined if component ``Interpreter`` is found. +-``Python2::Compiler`` +- Python 2 compiler. Target defined if component ``Compiler`` is found. +-``Python2::Python`` +- Python 2 library. Target defined if component ``Development`` is found. +-``Python2::NumPy`` +- NumPy library for Python 2. Target defined if component ``NumPy`` is found. +- +-Result Variables +-^^^^^^^^^^^^^^^^ +- +-This module will set the following variables in your project +-(see :ref:`Standard Variable Names `): +- +-``Python2_FOUND`` +- System has the Python 2 requested components. +-``Python2_Interpreter_FOUND`` +- System has the Python 2 interpreter. +-``Python2_EXECUTABLE`` +- Path to the Python 2 interpreter. +-``Python2_INTERPRETER_ID`` +- A short string unique to the interpreter. Possible values include: +- * Python +- * ActivePython +- * Anaconda +- * Canopy +- * IronPython +-``Python2_STDLIB`` +- Standard platform independent installation directory. +- +- Information returned by +- ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=True)``. +-``Python2_STDARCH`` +- Standard platform dependent installation directory. +- +- Information returned by +- ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=True)``. +-``Python2_SITELIB`` +- Third-party platform independent installation directory. +- +- Information returned by +- ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=False)``. +-``Python2_SITEARCH`` +- Third-party platform dependent installation directory. +- +- Information returned by +- ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=False)``. +-``Python2_Compiler_FOUND`` +- System has the Python 2 compiler. +-``Python2_COMPILER`` +- Path to the Python 2 compiler. Only offered by IronPython. +-``Python2_COMPILER_ID`` +- A short string unique to the compiler. Possible values include: +- * IronPython +-``Python2_Development_FOUND`` +- System has the Python 2 development artifacts. +-``Python2_INCLUDE_DIRS`` +- The Python 2 include directories. +-``Python2_LIBRARIES`` +- The Python 2 libraries. +-``Python2_LIBRARY_DIRS`` +- The Python 2 library directories. +-``Python2_RUNTIME_LIBRARY_DIRS`` +- The Python 2 runtime library directories. +-``Python2_VERSION`` +- Python 2 version. +-``Python2_VERSION_MAJOR`` +- Python 2 major version. +-``Python2_VERSION_MINOR`` +- Python 2 minor version. +-``Python2_VERSION_PATCH`` +- Python 2 patch version. +-``Python2_NumPy_FOUND`` +- System has the NumPy. +-``Python2_NumPy_INCLUDE_DIRS`` +- The NumPy include directries. +-``Python2_NumPy_VERSION`` +- The NumPy version. +- +-Hints +-^^^^^ +- +-``Python2_ROOT_DIR`` +- Define the root directory of a Python 2 installation. +- +-``Python2_USE_STATIC_LIBS`` +- * If not defined, search for shared libraries and static libraries in that +- order. +- * If set to TRUE, search **only** for static libraries. +- * If set to FALSE, search **only** for shared libraries. +- +-``Python2_FIND_REGISTRY`` +- On Windows the ``Python2_FIND_REGISTRY`` variable determine the order +- of preference between registry and environment variables. +- the ``Python2_FIND_REGISTRY`` variable can be set to empty or one of the +- following: +- +- * ``FIRST``: Try to use registry before environment variables. +- This is the default. +- * ``LAST``: Try to use registry after environment variables. +- * ``NEVER``: Never try to use registry. +- +-``CMAKE_FIND_FRAMEWORK`` +- On macOS the :variable:`CMAKE_FIND_FRAMEWORK` variable determine the order of +- preference between Apple-style and unix-style package components. +- +- .. note:: +- +- Value ``ONLY`` is not supported so ``FIRST`` will be used instead. +- +-.. note:: +- +- If a Python virtual environment is configured, set variable +- ``Python_FIND_REGISTRY`` (Windows) or ``CMAKE_FIND_FRAMEWORK`` (macOS) with +- value ``LAST`` or ``NEVER`` to select it preferably. +- +-Commands +-^^^^^^^^ +- +-This module defines the command ``Python2_add_library`` (when +-:prop_gbl:`CMAKE_ROLE` is ``PROJECT``), which has the same semantics as +-:command:`add_library`, but takes care of Python module naming rules +-(only applied if library is of type ``MODULE``), and adds a dependency to target +-``Python2::Python``:: +- +- Python2_add_library (my_module MODULE src1.cpp) +- +-If library type is not specified, ``MODULE`` is assumed. +-#]=======================================================================] +- +- +-set (_PYTHON_PREFIX Python2) +- +-set (_Python2_REQUIRED_VERSION_MAJOR 2) +- +-include (${CMAKE_CURRENT_LIST_DIR}/FindPython/Support.cmake) +- +-if (COMMAND __Python2_add_library) +- macro (Python2_add_library) +- __Python2_add_library (Python2 ${ARGV}) +- endmacro() +-endif() +- +-unset (_PYTHON_PREFIX) +diff --git a/cmake/cython/python/FindPython3.cmake b/cmake/cython/python/FindPython3.cmake +deleted file mode 100644 +index c2f3384..0000000 +--- a/cmake/cython/python/FindPython3.cmake ++++ /dev/null +@@ -1,189 +0,0 @@ +-# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +-# file Copyright.txt or https://cmake.org/licensing for details. +- +-#[=======================================================================[.rst: +-FindPython3 +------------ +- +-Find Python 3 interpreter, compiler and development environment (include +-directories and libraries). +- +-Three components are supported: +- +-* ``Interpreter``: search for Python 3 interpreter +-* ``Compiler``: search for Python 3 compiler. Only offered by IronPython. +-* ``Development``: search for development artifacts (include directories and +- libraries) +-* ``NumPy``: search for NumPy include directories. +- +-If no ``COMPONENTS`` is specified, ``Interpreter`` is assumed. +- +-To ensure consistent versions between components ``Interpreter``, ``Compiler``, +-``Development`` and ``NumPy``, specify all components at the same time:: +- +- find_package (Python3 COMPONENTS Interpreter Development) +- +-This module looks only for version 3 of Python. This module can be used +-concurrently with :module:`FindPython2` module to use both Python versions. +- +-The :module:`FindPython` module can be used if Python version does not matter +-for you. +- +-.. note:: +- +- If components ``Interpreter`` and ``Development`` are both specified, this +- module search only for interpreter with same platform architecture as the one +- defined by ``CMake`` configuration. This contraint does not apply if only +- ``Interpreter`` component is specified. +- +-Imported Targets +-^^^^^^^^^^^^^^^^ +- +-This module defines the following :ref:`Imported Targets ` +-(when :prop_gbl:`CMAKE_ROLE` is ``PROJECT``): +- +-``Python3::Interpreter`` +- Python 3 interpreter. Target defined if component ``Interpreter`` is found. +-``Python3::Compiler`` +- Python 3 compiler. Target defined if component ``Compiler`` is found. +-``Python3::Python`` +- Python 3 library. Target defined if component ``Development`` is found. +-``Python3::NumPy`` +- NumPy library for Python 3. Target defined if component ``NumPy`` is found. +- +-Result Variables +-^^^^^^^^^^^^^^^^ +- +-This module will set the following variables in your project +-(see :ref:`Standard Variable Names `): +- +-``Python3_FOUND`` +- System has the Python 3 requested components. +-``Python3_Interpreter_FOUND`` +- System has the Python 3 interpreter. +-``Python3_EXECUTABLE`` +- Path to the Python 3 interpreter. +-``Python3_INTERPRETER_ID`` +- A short string unique to the interpreter. Possible values include: +- * Python +- * ActivePython +- * Anaconda +- * Canopy +- * IronPython +-``Python3_STDLIB`` +- Standard platform independent installation directory. +- +- Information returned by +- ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=True)``. +-``Python3_STDARCH`` +- Standard platform dependent installation directory. +- +- Information returned by +- ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=True)``. +-``Python3_SITELIB`` +- Third-party platform independent installation directory. +- +- Information returned by +- ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=False)``. +-``Python3_SITEARCH`` +- Third-party platform dependent installation directory. +- +- Information returned by +- ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=False)``. +-``Python3_Compiler_FOUND`` +- System has the Python 3 compiler. +-``Python3_COMPILER`` +- Path to the Python 3 compiler. Only offered by IronPython. +-``Python3_COMPILER_ID`` +- A short string unique to the compiler. Possible values include: +- * IronPython +-``Python3_Development_FOUND`` +- System has the Python 3 development artifacts. +-``Python3_INCLUDE_DIRS`` +- The Python 3 include directories. +-``Python3_LIBRARIES`` +- The Python 3 libraries. +-``Python3_LIBRARY_DIRS`` +- The Python 3 library directories. +-``Python3_RUNTIME_LIBRARY_DIRS`` +- The Python 3 runtime library directories. +-``Python3_VERSION`` +- Python 3 version. +-``Python3_VERSION_MAJOR`` +- Python 3 major version. +-``Python3_VERSION_MINOR`` +- Python 3 minor version. +-``Python3_VERSION_PATCH`` +- Python 3 patch version. +-``Python3_NumPy_FOUND`` +- System has the NumPy. +-``Python3_NumPy_INCLUDE_DIRS`` +- The NumPy include directries. +-``Python3_NumPy_VERSION`` +- The NumPy version. +- +-Hints +-^^^^^ +- +-``Python3_ROOT_DIR`` +- Define the root directory of a Python 3 installation. +- +-``Python3_USE_STATIC_LIBS`` +- * If not defined, search for shared libraries and static libraries in that +- order. +- * If set to TRUE, search **only** for static libraries. +- * If set to FALSE, search **only** for shared libraries. +- +-``Python3_FIND_REGISTRY`` +- On Windows the ``Python3_FIND_REGISTRY`` variable determine the order +- of preference between registry and environment variables. +- the ``Python3_FIND_REGISTRY`` variable can be set to empty or one of the +- following: +- +- * ``FIRST``: Try to use registry before environment variables. +- This is the default. +- * ``LAST``: Try to use registry after environment variables. +- * ``NEVER``: Never try to use registry. +- +-``CMAKE_FIND_FRAMEWORK`` +- On OS X the :variable:`CMAKE_FIND_FRAMEWORK` variable determine the order of +- preference between Apple-style and unix-style package components. +- +- .. note:: +- +- Value ``ONLY`` is not supported so ``FIRST`` will be used instead. +- +-.. note:: +- +- If a Python virtual environment is configured, set variable +- ``Python_FIND_REGISTRY`` (Windows) or ``CMAKE_FIND_FRAMEWORK`` (macOS) with +- value ``LAST`` or ``NEVER`` to select it preferably. +- +-Commands +-^^^^^^^^ +- +-This module defines the command ``Python3_add_library`` (when +-:prop_gbl:`CMAKE_ROLE` is ``PROJECT``), which has the same semantics as +-:command:`add_library`, but takes care of Python module naming rules +-(only applied if library is of type ``MODULE``), and adds a dependency to target +-``Python3::Python``:: +- +- Python3_add_library (my_module MODULE src1.cpp) +- +-If library type is not specified, ``MODULE`` is assumed. +-#]=======================================================================] +- +- +-set (_PYTHON_PREFIX Python3) +- +-set (_Python3_REQUIRED_VERSION_MAJOR 3) +- +-include (${CMAKE_CURRENT_LIST_DIR}/FindPython/Support.cmake) +- +-if (COMMAND __Python3_add_library) +- macro (Python3_add_library) +- __Python3_add_library (Python3 ${ARGV}) +- endmacro() +-endif() +- +-unset (_PYTHON_PREFIX) +diff --git a/cmake/cython/python/README.md b/cmake/cython/python/README.md +deleted file mode 100644 +index 19a931a..0000000 +--- a/cmake/cython/python/README.md ++++ /dev/null +@@ -1,6 +0,0 @@ +-These files are taken from CMake v3.14.5 at +-[github](https://github.com/Kitware/CMake/tree/f3e9a6ff62f6f58cd661dd447c22a01c50f6f4ad) +-with small modifications to allow them to work outside of their expected +-location. +- +-They are used in the modules for CMake < 3.12 +diff --git a/cmake/python.cmake b/cmake/python.cmake +index aa5c452..0c5a284 100644 +--- a/cmake/python.cmake ++++ b/cmake/python.cmake +@@ -55,14 +55,6 @@ + # nothing for CMake < 3.12 which doesn't have those. This also export: - + # `FIND_NUMPY` and/or `SEARCH_FOR_BOOST_PYTHON` if necessary. + +-if(CMAKE_VERSION VERSION_LESS "3.2") +- set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/python ${CMAKE_MODULE_PATH}) +- message( +- STATUS +- "CMake versions older than 3.2 do not properly find Python. Custom macros are used to find it." +- ) +-endif(CMAKE_VERSION VERSION_LESS "3.2") +- + macro(FINDPYTHON) + if(DEFINED FINDPYTHON_ALREADY_CALLED) + message( +@@ -72,193 +64,29 @@ macro(FINDPYTHON) + endif() + set(FINDPYTHON_ALREADY_CALLED TRUE) + +- if(NOT PYTHON_COMPONENTS) +- set(PYTHON_COMPONENTS Interpreter Development) +- endif() +- +- list(FIND PYTHON_COMPONENTS "NumPy" _npindex) +- if(NOT ${_npindex} EQUAL -1) +- set(SEARCH_FOR_NUMPY TRUE) +- endif() +- +- if(CMAKE_VERSION VERSION_LESS "3.18") +- # IF("Development.Module" IN_LIST PYTHON_COMPONENTS) -- require CMake 3.3 +- list(FIND PYTHON_COMPONENTS "Development.Module" _index) +- if(NOT ${_index} EQUAL -1) +- message( +- STATUS +- "For CMake < 3.18, Development.Module is not available. Falling back to Development" +- ) +- list(REMOVE_ITEM PYTHON_COMPONENTS Development.Module) +- set(PYTHON_COMPONENTS ${PYTHON_COMPONENTS} Development) +- endif() +- if(CMAKE_VERSION VERSION_LESS "3.14") +- if(SEARCH_FOR_NUMPY) +- message( +- STATUS +- "For CMake < 3.14, NumPy is not available. Falling back to custom FIND_NUMPY()" +- ) +- list(REMOVE_ITEM PYTHON_COMPONENTS NumPy) +- endif() +- endif() ++ find_package(Python COMPONENTS Interpreter Development NumPy REQUIRED) ++ ++ set(_PYTHON_PREFIX "Python") ++ ++ if(${_PYTHON_PREFIX}_FOUND) ++ set(PYTHON_EXECUTABLE ${${_PYTHON_PREFIX}_EXECUTABLE}) ++ set(PYTHON_LIBRARY ${${_PYTHON_PREFIX}_LIBRARIES}) ++ set(PYTHON_LIBRARIES ${${_PYTHON_PREFIX}_LIBRARIES}) ++ set(PYTHON_INCLUDE_DIR ${${_PYTHON_PREFIX}_INCLUDE_DIRS}) ++ set(PYTHON_INCLUDE_DIRS ${${_PYTHON_PREFIX}_INCLUDE_DIRS}) ++ set(PYTHON_VERSION_STRING ${${_PYTHON_PREFIX}_VERSION}) ++ set(PYTHONLIBS_VERSION_STRING ${${_PYTHON_PREFIX}_VERSION}) ++ set(PYTHON_FOUND ${${_PYTHON_PREFIX}_FOUND}) ++ set(PYTHONLIBS_FOUND ${${_PYTHON_PREFIX}_FOUND}) ++ set(PYTHON_VERSION_MAJOR ${${_PYTHON_PREFIX}_VERSION_MAJOR}) ++ set(PYTHON_VERSION_MINOR ${${_PYTHON_PREFIX}_VERSION_MINOR}) ++ set(PYTHON_VERSION_PATCH ${${_PYTHON_PREFIX}_VERSION_PATCH}) ++ else() ++ message(FATAL_ERROR "Python executable has not been found.") + endif() + +- if(NOT CMAKE_VERSION VERSION_LESS "3.12") +- +- if(DEFINED PYTHON_EXECUTABLE +- OR DEFINED Python_EXECUTABLE +- OR DEFINED Python2_EXECUTABLE +- OR DEFINED Python3_EXECUTABLE) +- +- if(NOT DEFINED PYTHON_EXECUTABLE) +- if(DEFINED Python_EXECUTABLE) +- set(PYTHON_EXECUTABLE ${Python_EXECUTABLE}) +- elseif(DEFINED Python2_EXECUTABLE) +- set(PYTHON_EXECUTABLE ${Python2_EXECUTABLE}) +- elseif(DEFINED Python3_EXECUTABLE) +- set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) +- endif() +- endif() +- +- if(NOT DEFINED Python_EXCUTABLE) +- set(Python_EXECUTABLE ${PYTHON_EXECUTABLE}) +- endif() +- else() +- # Search for the default python of the system, if exists +- find_program(PYTHON_EXECUTABLE python) +- endif() +- +- if(PYTHON_EXECUTABLE) +- if(NOT EXISTS ${PYTHON_EXECUTABLE}) +- message( +- FATAL_ERROR +- "${PYTHON_EXECUTABLE} is not a valid path to the Python executable") +- endif() +- execute_process( +- COMMAND ${PYTHON_EXECUTABLE} --version +- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +- RESULT_VARIABLE _PYTHON_VERSION_RESULT_VARIABLE +- OUTPUT_VARIABLE _PYTHON_VERSION_OUTPUT +- ERROR_VARIABLE _PYTHON_VERSION_OUTPUT +- OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE) +- +- # Provide some hints according to the current PYTHON_EXECUTABLE +- if(NOT DEFINED PYTHON_INCLUDE_DIR) +- execute_process( +- COMMAND +- "${PYTHON_EXECUTABLE}" "-c" +- "import distutils.sysconfig as sysconfig; print(sysconfig.get_python_inc())" +- OUTPUT_VARIABLE PYTHON_INCLUDE_DIR +- ERROR_QUIET) +- string(STRIP "${PYTHON_INCLUDE_DIR}" PYTHON_INCLUDE_DIR) +- file(TO_CMAKE_PATH "${PYTHON_INCLUDE_DIR}" PYTHON_INCLUDE_DIR) +- endif() +- +- if(NOT "${_PYTHON_VERSION_RESULT_VARIABLE}" STREQUAL "0") +- message(FATAL_ERROR "${PYTHON_EXECUTABLE} --version did not succeed.") +- endif(NOT "${_PYTHON_VERSION_RESULT_VARIABLE}" STREQUAL "0") +- string(REGEX REPLACE "Python " "" _PYTHON_VERSION +- ${_PYTHON_VERSION_OUTPUT}) +- string(REGEX REPLACE "\\." ";" _PYTHON_VERSION ${_PYTHON_VERSION}) +- list(GET _PYTHON_VERSION 0 _PYTHON_VERSION_MAJOR) +- +- # Hint for finding the right Python version +- set(Python_EXECUTABLE ${PYTHON_EXECUTABLE}) +- set(Python${_PYTHON_VERSION_MAJOR}_EXECUTABLE ${PYTHON_EXECUTABLE}) +- set(Python${_PYTHON_VERSION_MAJOR}_INCLUDE_DIR ${PYTHON_INCLUDE_DIR}) +- +- find_package("Python${_PYTHON_VERSION_MAJOR}" REQUIRED +- COMPONENTS ${PYTHON_COMPONENTS}) +- else() +- # No hint was provided. We can then check for first Python 2, then Python +- # 3 +- find_package(Python2 QUIET COMPONENTS ${PYTHON_COMPONENTS}) +- if(NOT Python2_FOUND) +- find_package(Python3 QUIET COMPONENTS ${PYTHON_COMPONENTS}) +- if(NOT Python3_FOUND) +- message(FATAL_ERROR "Python executable has not been found.") +- else() +- set(_PYTHON_VERSION_MAJOR 3) +- endif(NOT Python3_FOUND) +- else() +- set(_PYTHON_VERSION_MAJOR 2) +- endif(NOT Python2_FOUND) +- endif(PYTHON_EXECUTABLE) +- +- set(_PYTHON_PREFIX "Python${_PYTHON_VERSION_MAJOR}") +- +- if(${_PYTHON_PREFIX}_FOUND) +- set(PYTHON_EXECUTABLE ${${_PYTHON_PREFIX}_EXECUTABLE}) +- set(PYTHON_LIBRARY ${${_PYTHON_PREFIX}_LIBRARIES}) +- set(PYTHON_LIBRARIES ${${_PYTHON_PREFIX}_LIBRARIES}) +- set(PYTHON_INCLUDE_DIR ${${_PYTHON_PREFIX}_INCLUDE_DIRS}) +- set(PYTHON_INCLUDE_DIRS ${${_PYTHON_PREFIX}_INCLUDE_DIRS}) +- set(PYTHON_VERSION_STRING ${${_PYTHON_PREFIX}_VERSION}) +- set(PYTHONLIBS_VERSION_STRING ${${_PYTHON_PREFIX}_VERSION}) +- set(PYTHON_FOUND ${${_PYTHON_PREFIX}_FOUND}) +- set(PYTHONLIBS_FOUND ${${_PYTHON_PREFIX}_FOUND}) +- set(PYTHON_VERSION_MAJOR ${${_PYTHON_PREFIX}_VERSION_MAJOR}) +- set(PYTHON_VERSION_MINOR ${${_PYTHON_PREFIX}_VERSION_MINOR}) +- set(PYTHON_VERSION_PATCH ${${_PYTHON_PREFIX}_VERSION_PATCH}) +- else() +- message(FATAL_ERROR "Python executable has not been found.") +- endif() +- +- if(SEARCH_FOR_NUMPY) +- set(NUMPY_INCLUDE_DIRS +- "${Python${_PYTHON_VERSION_MAJOR}_NumPy_INCLUDE_DIRS}") +- string(REPLACE "\\" "/" NUMPY_INCLUDE_DIRS "${NUMPY_INCLUDE_DIRS}") +- file(TO_CMAKE_PATH "${NUMPY_INCLUDE_DIRS}" NUMPY_INCLUDE_DIRS) +- endif() +- +- else(NOT CMAKE_VERSION VERSION_LESS "3.12") +- +- find_package(PythonInterp ${ARGN}) +- if(NOT ${PYTHONINTERP_FOUND} STREQUAL TRUE) +- message(FATAL_ERROR "Python executable has not been found.") +- endif(NOT ${PYTHONINTERP_FOUND} STREQUAL TRUE) +- message(STATUS "PythonInterp: ${PYTHON_EXECUTABLE}") +- +- # Set PYTHON_INCLUDE_DIR variables if it is not defined by the user +- if(DEFINED PYTHON_EXECUTABLE) +- # Retrieve the corresponding value of PYTHON_INCLUDE_DIR if it is not +- # defined +- if(NOT DEFINED PYTHON_INCLUDE_DIR) +- execute_process( +- COMMAND +- "${PYTHON_EXECUTABLE}" "-c" +- "import distutils.sysconfig as sysconfig; print(sysconfig.get_python_inc())" +- OUTPUT_VARIABLE PYTHON_INCLUDE_DIR +- ERROR_QUIET) +- string(STRIP "${PYTHON_INCLUDE_DIR}" PYTHON_INCLUDE_DIR) +- endif(NOT DEFINED PYTHON_INCLUDE_DIR) +- set(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR}) +- +- endif(DEFINED PYTHON_EXECUTABLE) +- +- # Inform PythonLibs of the required version of PythonInterp +- set(PYTHONLIBS_VERSION_STRING ${PYTHON_VERSION_STRING}) +- +- find_package(PythonLibs ${ARGN}) +- message(STATUS "PythonLibraries: ${PYTHON_LIBRARIES}") +- if(NOT ${PYTHONLIBS_FOUND} STREQUAL TRUE) +- message(FATAL_ERROR "Python has not been found.") +- endif(NOT ${PYTHONLIBS_FOUND} STREQUAL TRUE) +- +- string(REPLACE "." ";" _PYTHONLIBS_VERSION ${PYTHONLIBS_VERSION_STRING}) +- list(GET _PYTHONLIBS_VERSION 0 PYTHONLIBS_VERSION_MAJOR) +- list(GET _PYTHONLIBS_VERSION 1 PYTHONLIBS_VERSION_MINOR) +- +- if(NOT ${PYTHON_VERSION_MAJOR} EQUAL ${PYTHONLIBS_VERSION_MAJOR} +- OR NOT ${PYTHON_VERSION_MINOR} EQUAL ${PYTHONLIBS_VERSION_MINOR}) +- message( +- FATAL_ERROR +- "Python interpreter and libraries are in different version: ${PYTHON_VERSION_STRING} vs ${PYTHONLIBS_VERSION_STRING}" +- ) +- endif(NOT ${PYTHON_VERSION_MAJOR} EQUAL ${PYTHONLIBS_VERSION_MAJOR} +- OR NOT ${PYTHON_VERSION_MINOR} EQUAL ${PYTHONLIBS_VERSION_MINOR}) +- +- endif(NOT CMAKE_VERSION VERSION_LESS "3.12") ++ set(NUMPY_INCLUDE_DIRS ++ "${Python_NumPy_INCLUDE_DIRS}") + + # Find PYTHON_LIBRARY_DIRS + get_filename_component(PYTHON_LIBRARY_DIRS "${PYTHON_LIBRARIES}" PATH) +@@ -620,30 +448,9 @@ endmacro() + macro(FIND_NUMPY) + # Detect numpy. + message(STATUS "Checking for NumPy") +- execute_process( +- COMMAND "${PYTHON_EXECUTABLE}" "-c" "import numpy; print (True)" +- OUTPUT_VARIABLE IS_NUMPY +- ERROR_QUIET) +- if(NOT IS_NUMPY) +- message(FATAL_ERROR "Failed to detect numpy") +- else() +- if(NOT NUMPY_INCLUDE_DIRS) +- execute_process( +- COMMAND "${PYTHON_EXECUTABLE}" "-c" +- "import numpy; print (numpy.get_include())" +- OUTPUT_VARIABLE NUMPY_INCLUDE_DIRS +- ERROR_QUIET) +- string(REGEX REPLACE "\n$" "" NUMPY_INCLUDE_DIRS "${NUMPY_INCLUDE_DIRS}") +- file(TO_CMAKE_PATH "${NUMPY_INCLUDE_DIRS}" NUMPY_INCLUDE_DIRS) +- endif() +- message(STATUS " NUMPY_INCLUDE_DIRS=${NUMPY_INCLUDE_DIRS}") +- # Retrive NUMPY_VERSION +- execute_process( +- COMMAND "${PYTHON_EXECUTABLE}" "-c" +- "import numpy; print (numpy.__version__)" +- OUTPUT_VARIABLE NUMPY_VERSION +- ERROR_QUIET) +- string(REGEX REPLACE "\n$" "" NUMPY_VERSION "${NUMPY_VERSION}") +- message(STATUS " NUMPY_VERSION=${NUMPY_VERSION}") +- endif() ++ find_package (Python COMPONENTS Interpreter Development NumPy REQUIRED) ++ set(NUMPY_INCLUDE_DIRS ${Python_NumPy_INCLUDE_DIRS}) ++ set(NUMPY_VERSION ${Python_NumPy_VERSION}) ++ message(STATUS " NUMPY_INCLUDE_DIRS=${NUMPY_INCLUDE_DIRS}") ++ message(STATUS " NUMPY_VERSION=${NUMPY_VERSION}") + endmacro() +diff --git a/cmake/python/FindPythonInterp.cmake b/cmake/python/FindPythonInterp.cmake +deleted file mode 100644 +index 1e01a99..0000000 +--- a/cmake/python/FindPythonInterp.cmake ++++ /dev/null +@@ -1,171 +0,0 @@ +-# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +-# file Copyright.txt or https://cmake.org/licensing for details. +- +-#[=======================================================================[.rst: +-FindPythonInterp +----------------- +- +-.. deprecated:: 3.12 +- +- Use :module:`FindPython3`, :module:`FindPython2` or :module:`FindPython` instead. +- +-Find python interpreter +- +-This module finds if Python interpreter is installed and determines +-where the executables are. This code sets the following variables: +- +-:: +- +- PYTHONINTERP_FOUND - Was the Python executable found +- PYTHON_EXECUTABLE - path to the Python interpreter +- +- +- +-:: +- +- PYTHON_VERSION_STRING - Python version found e.g. 2.5.2 +- PYTHON_VERSION_MAJOR - Python major version found e.g. 2 +- PYTHON_VERSION_MINOR - Python minor version found e.g. 5 +- PYTHON_VERSION_PATCH - Python patch version found e.g. 2 +- +- +- +-The Python_ADDITIONAL_VERSIONS variable can be used to specify a list +-of version numbers that should be taken into account when searching +-for Python. You need to set this variable before calling +-find_package(PythonInterp). +- +-If calling both ``find_package(PythonInterp)`` and +-``find_package(PythonLibs)``, call ``find_package(PythonInterp)`` first to +-get the currently active Python version by default with a consistent version +-of PYTHON_LIBRARIES. +- +-.. note:: +- +- A call to ``find_package(PythonInterp ${V})`` for python version ``V`` +- may find a ``python`` executable with no version suffix. In this case +- no attempt is made to avoid python executables from other versions. +- Use :module:`FindPython3`, :module:`FindPython2` or :module:`FindPython` +- instead. +- +-#]=======================================================================] +- +-unset(_Python_NAMES) +- +-set(_PYTHON1_VERSIONS 1.6 1.5) +-set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) +-set(_PYTHON3_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) +- +-if(PythonInterp_FIND_VERSION) +- if(PythonInterp_FIND_VERSION_COUNT GREATER 1) +- set(_PYTHON_FIND_MAJ_MIN "${PythonInterp_FIND_VERSION_MAJOR}.${PythonInterp_FIND_VERSION_MINOR}") +- list(APPEND _Python_NAMES +- python${_PYTHON_FIND_MAJ_MIN} +- python${PythonInterp_FIND_VERSION_MAJOR}) +- unset(_PYTHON_FIND_OTHER_VERSIONS) +- if(NOT PythonInterp_FIND_VERSION_EXACT) +- foreach(_PYTHON_V ${_PYTHON${PythonInterp_FIND_VERSION_MAJOR}_VERSIONS}) +- if(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN) +- list(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V}) +- endif() +- endforeach() +- endif() +- unset(_PYTHON_FIND_MAJ_MIN) +- else() +- list(APPEND _Python_NAMES python${PythonInterp_FIND_VERSION_MAJOR}) +- set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON${PythonInterp_FIND_VERSION_MAJOR}_VERSIONS}) +- endif() +-else() +- set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS}) +-endif() +-find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES}) +- +-# Set up the versions we know about, in the order we will search. Always add +-# the user supplied additional versions to the front. +-set(_Python_VERSIONS ${Python_ADDITIONAL_VERSIONS}) +-# If FindPythonInterp has already found the major and minor version, +-# insert that version next to get consistent versions of the interpreter and +-# library. +-if(DEFINED PYTHONLIBS_VERSION_STRING) +- string(REPLACE "." ";" _PYTHONLIBS_VERSION "${PYTHONLIBS_VERSION_STRING}") +- list(GET _PYTHONLIBS_VERSION 0 _PYTHONLIBS_VERSION_MAJOR) +- list(GET _PYTHONLIBS_VERSION 1 _PYTHONLIBS_VERSION_MINOR) +- list(APPEND _Python_VERSIONS ${_PYTHONLIBS_VERSION_MAJOR}.${_PYTHONLIBS_VERSION_MINOR}) +-endif() +-# Search for the current active python version first +-list(APPEND _Python_VERSIONS ";") +-list(APPEND _Python_VERSIONS ${_PYTHON_FIND_OTHER_VERSIONS}) +- +-unset(_PYTHON_FIND_OTHER_VERSIONS) +-unset(_PYTHON1_VERSIONS) +-unset(_PYTHON2_VERSIONS) +-unset(_PYTHON3_VERSIONS) +- +-# Search for newest python version if python executable isn't found +-if(NOT PYTHON_EXECUTABLE) +- foreach(_CURRENT_VERSION IN LISTS _Python_VERSIONS) +- set(_Python_NAMES python${_CURRENT_VERSION}) +- if(CMAKE_HOST_WIN32) +- list(APPEND _Python_NAMES python) +- endif() +- find_program(PYTHON_EXECUTABLE +- NAMES ${_Python_NAMES} +- PATHS +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-32\\InstallPath] +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-64\\InstallPath] +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath] +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-32\\InstallPath] +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-64\\InstallPath] +- ) +- endforeach() +-endif() +- +-# determine python version string +-if(PYTHON_EXECUTABLE) +- execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c +- "import sys; sys.stdout.write(';'.join([str(x) for x in sys.version_info[:3]]))" +- OUTPUT_VARIABLE _VERSION +- RESULT_VARIABLE _PYTHON_VERSION_RESULT +- ERROR_QUIET) +- if(NOT _PYTHON_VERSION_RESULT) +- string(REPLACE ";" "." PYTHON_VERSION_STRING "${_VERSION}") +- list(GET _VERSION 0 PYTHON_VERSION_MAJOR) +- list(GET _VERSION 1 PYTHON_VERSION_MINOR) +- list(GET _VERSION 2 PYTHON_VERSION_PATCH) +- if(PYTHON_VERSION_PATCH EQUAL 0) +- # it's called "Python 2.7", not "2.7.0" +- string(REGEX REPLACE "\\.0$" "" PYTHON_VERSION_STRING "${PYTHON_VERSION_STRING}") +- endif() +- else() +- # sys.version predates sys.version_info, so use that +- # sys.version was first documented for Python 1.5, so assume version 1.4 +- # if retrieving sys.version fails. +- execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "try: import sys; sys.stdout.write(sys.version)\nexcept: sys.stdout.write(\"1.4.0\")" +- OUTPUT_VARIABLE _VERSION +- RESULT_VARIABLE _PYTHON_VERSION_RESULT +- ERROR_QUIET) +- if(NOT _PYTHON_VERSION_RESULT) +- string(REGEX REPLACE " .*" "" PYTHON_VERSION_STRING "${_VERSION}") +- string(REGEX REPLACE "^([0-9]+)\\.[0-9]+.*" "\\1" PYTHON_VERSION_MAJOR "${PYTHON_VERSION_STRING}") +- string(REGEX REPLACE "^[0-9]+\\.([0-9])+.*" "\\1" PYTHON_VERSION_MINOR "${PYTHON_VERSION_STRING}") +- if(PYTHON_VERSION_STRING MATCHES "^[0-9]+\\.[0-9]+\\.([0-9]+)") +- set(PYTHON_VERSION_PATCH "${CMAKE_MATCH_1}") +- else() +- set(PYTHON_VERSION_PATCH "0") +- endif() +- else() +- unset(PYTHON_VERSION_STRING) +- unset(PYTHON_VERSION_MAJOR) +- unset(PYTHON_VERSION_MINOR) +- unset(PYTHON_VERSION_PATCH) +- endif() +- endif() +- unset(_PYTHON_VERSION_RESULT) +- unset(_VERSION) +-endif() +- +-include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp REQUIRED_VARS PYTHON_EXECUTABLE VERSION_VAR PYTHON_VERSION_STRING) +- +-mark_as_advanced(PYTHON_EXECUTABLE) +diff --git a/cmake/python/FindPythonLibs.cmake b/cmake/python/FindPythonLibs.cmake +deleted file mode 100644 +index d3ec7be..0000000 +--- a/cmake/python/FindPythonLibs.cmake ++++ /dev/null +@@ -1,399 +0,0 @@ +-# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +-# file Copyright.txt or https://cmake.org/licensing for details. +- +-#[=======================================================================[.rst: +-FindPythonLibs +--------------- +- +-.. deprecated:: 3.12 +- +- Use :module:`FindPython3`, :module:`FindPython2` or :module:`FindPython` instead. +- +-Find python libraries +- +-This module finds if Python is installed and determines where the +-include files and libraries are. It also determines what the name of +-the library is. This code sets the following variables: +- +-:: +- +- PYTHONLIBS_FOUND - have the Python libs been found +- PYTHON_LIBRARIES - path to the python library +- PYTHON_INCLUDE_PATH - path to where Python.h is found (deprecated) +- PYTHON_INCLUDE_DIRS - path to where Python.h is found +- PYTHON_DEBUG_LIBRARIES - path to the debug library (deprecated) +- PYTHONLIBS_VERSION_STRING - version of the Python libs found (since CMake 2.8.8) +- +- +- +-The Python_ADDITIONAL_VERSIONS variable can be used to specify a list +-of version numbers that should be taken into account when searching +-for Python. You need to set this variable before calling +-find_package(PythonLibs). +- +-If you'd like to specify the installation of Python to use, you should +-modify the following cache variables: +- +-:: +- +- PYTHON_LIBRARY - path to the python library +- PYTHON_INCLUDE_DIR - path to where Python.h is found +- +-If calling both ``find_package(PythonInterp)`` and +-``find_package(PythonLibs)``, call ``find_package(PythonInterp)`` first to +-get the currently active Python version by default with a consistent version +-of PYTHON_LIBRARIES. +-#]=======================================================================] +- +-# Use the executable's path as a hint +-set(_Python_LIBRARY_PATH_HINT) +-if(IS_ABSOLUTE "${PYTHON_EXECUTABLE}") +- if(WIN32) +- get_filename_component(_Python_PREFIX "${PYTHON_EXECUTABLE}" PATH) +- if(_Python_PREFIX) +- set(_Python_LIBRARY_PATH_HINT ${_Python_PREFIX}/libs) +- endif() +- unset(_Python_PREFIX) +- else() +- get_filename_component(_Python_PREFIX "${PYTHON_EXECUTABLE}" PATH) +- get_filename_component(_Python_PREFIX "${_Python_PREFIX}" PATH) +- if(_Python_PREFIX) +- set(_Python_LIBRARY_PATH_HINT ${_Python_PREFIX}/lib) +- endif() +- unset(_Python_PREFIX) +- endif() +-endif() +- +-include(${CMAKE_CURRENT_LIST_DIR}/CMakeFindFrameworks.cmake) +-# Search for the python framework on Apple. +-CMAKE_FIND_FRAMEWORKS(Python) +- +-# Save CMAKE_FIND_FRAMEWORK +-if(DEFINED CMAKE_FIND_FRAMEWORK) +- set(_PythonLibs_CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK}) +-else() +- unset(_PythonLibs_CMAKE_FIND_FRAMEWORK) +-endif() +-# To avoid picking up the system Python.h pre-maturely. +-set(CMAKE_FIND_FRAMEWORK LAST) +- +-set(_PYTHON1_VERSIONS 1.6 1.5) +-set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) +-set(_PYTHON3_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) +- +-if(PythonLibs_FIND_VERSION) +- if(PythonLibs_FIND_VERSION_COUNT GREATER 1) +- set(_PYTHON_FIND_MAJ_MIN "${PythonLibs_FIND_VERSION_MAJOR}.${PythonLibs_FIND_VERSION_MINOR}") +- unset(_PYTHON_FIND_OTHER_VERSIONS) +- if(PythonLibs_FIND_VERSION_EXACT) +- if(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION) +- set(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}") +- else() +- set(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}" "${_PYTHON_FIND_MAJ_MIN}") +- endif() +- else() +- foreach(_PYTHON_V ${_PYTHON${PythonLibs_FIND_VERSION_MAJOR}_VERSIONS}) +- if(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN) +- list(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V}) +- endif() +- endforeach() +- endif() +- unset(_PYTHON_FIND_MAJ_MIN) +- else() +- set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON${PythonLibs_FIND_VERSION_MAJOR}_VERSIONS}) +- endif() +-else() +- set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS}) +-endif() +- +-# Set up the versions we know about, in the order we will search. Always add +-# the user supplied additional versions to the front. +-# If FindPythonInterp has already found the major and minor version, +-# insert that version between the user supplied versions and the stock +-# version list. +-set(_Python_VERSIONS ${Python_ADDITIONAL_VERSIONS}) +-if(DEFINED PYTHON_VERSION_MAJOR AND DEFINED PYTHON_VERSION_MINOR) +- list(APPEND _Python_VERSIONS ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) +-endif() +-list(APPEND _Python_VERSIONS ${_PYTHON_FIND_OTHER_VERSIONS}) +- +-unset(_PYTHON_FIND_OTHER_VERSIONS) +-unset(_PYTHON1_VERSIONS) +-unset(_PYTHON2_VERSIONS) +-unset(_PYTHON3_VERSIONS) +- +-# Python distribution: define which architectures can be used +-if (CMAKE_SIZEOF_VOID_P) +- # In this case, search only for 64bit or 32bit +- math (EXPR _PYTHON_ARCH "${CMAKE_SIZEOF_VOID_P} * 8") +- set (_PYTHON_ARCH2 _PYTHON_PREFIX_ARCH}) +-else() +- if (PYTHON_EXECUTABLE) +- # determine interpreter architecture +- execute_process (COMMAND "${PYTHON_EXECUTABLE}" -c "import sys; print(sys.maxsize > 2**32)" +- RESULT_VARIABLE _PYTHON_RESULT +- OUTPUT_VARIABLE _PYTHON_IS64BIT +- ERROR_VARIABLE _PYTHON_IS64BIT) +- if (NOT _PYTHON_RESULT) +- if (_PYTHON_IS64BIT) +- set (_PYTHON_ARCH 64) +- set (_PYTHON_ARCH2 64) +- else() +- set (_PYTHON_ARCH 32) +- set (_PYTHON_ARCH2 32) +- endif() +- endif() +- else() +- # architecture unknown, search for both 64bit and 32bit +- set (_PYTHON_ARCH 64) +- set (_PYTHON_ARCH2 32) +- endif() +-endif() +- +-foreach(_CURRENT_VERSION ${_Python_VERSIONS}) +- string(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION}) +- if(WIN32) +- find_library(PYTHON_DEBUG_LIBRARY +- NAMES python${_CURRENT_VERSION_NO_DOTS}_d python +- NAMES_PER_DIR +- HINTS ${_Python_LIBRARY_PATH_HINT} +- PATHS +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH}\\InstallPath]/libs/Debug +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH2}\\InstallPath]/libs/Debug +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH}\\InstallPath]/libs/Debug +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH2}\\InstallPath]/libs/Debug +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH}\\InstallPath]/libs +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH2}\\InstallPath]/libs +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH}\\InstallPath]/libs +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH2}\\InstallPath]/libs +- ) +- endif() +- +- set(PYTHON_FRAMEWORK_LIBRARIES) +- if(Python_FRAMEWORKS AND NOT PYTHON_LIBRARY) +- foreach(dir ${Python_FRAMEWORKS}) +- list(APPEND PYTHON_FRAMEWORK_LIBRARIES +- ${dir}/Versions/${_CURRENT_VERSION}/lib) +- endforeach() +- endif() +- find_library(PYTHON_LIBRARY +- NAMES +- python${_CURRENT_VERSION_NO_DOTS} +- python${_CURRENT_VERSION}mu +- python${_CURRENT_VERSION}m +- python${_CURRENT_VERSION}u +- python${_CURRENT_VERSION} +- NAMES_PER_DIR +- HINTS +- ${_Python_LIBRARY_PATH_HINT} +- PATHS +- ${PYTHON_FRAMEWORK_LIBRARIES} +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH}\\InstallPath]/libs +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH2}\\InstallPath]/libs +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH}\\InstallPath]/libs +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH2}\\InstallPath]/libs +- ) +- # Look for the static library in the Python config directory +- find_library(PYTHON_LIBRARY +- NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION} +- NAMES_PER_DIR +- # This is where the static library is usually located +- PATH_SUFFIXES python${_CURRENT_VERSION}/config +- ) +- +- # Don't search for include dir until library location is known +- if(PYTHON_LIBRARY) +- +- # Use the library's install prefix as a hint +- set(_Python_INCLUDE_PATH_HINT) +- # PYTHON_LIBRARY may contain a list because of SelectLibraryConfigurations +- # which may have been run previously. If it is the case, the list can be: +- # optimized;;debug; +- foreach(lib ${PYTHON_LIBRARY} ${PYTHON_DEBUG_LIBRARY}) +- if(IS_ABSOLUTE "${lib}") +- get_filename_component(_Python_PREFIX "${lib}" PATH) +- get_filename_component(_Python_PREFIX "${_Python_PREFIX}" PATH) +- if(_Python_PREFIX) +- list(APPEND _Python_INCLUDE_PATH_HINT ${_Python_PREFIX}/include) +- endif() +- unset(_Python_PREFIX) +- endif() +- endforeach() +- +- # Add framework directories to the search paths +- set(PYTHON_FRAMEWORK_INCLUDES) +- if(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR) +- foreach(dir ${Python_FRAMEWORKS}) +- list(APPEND PYTHON_FRAMEWORK_INCLUDES +- ${dir}/Versions/${_CURRENT_VERSION}/include) +- endforeach() +- endif() +- +- find_path(PYTHON_INCLUDE_DIR +- NAMES Python.h +- HINTS +- ${_Python_INCLUDE_PATH_HINT} +- PATHS +- ${PYTHON_FRAMEWORK_INCLUDES} +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH}\\InstallPath]/include +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH2}\\InstallPath]/include +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH}\\InstallPath]/include +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-${_PYTHON_ARCH2}\\InstallPath]/include +- PATH_SUFFIXES +- python${_CURRENT_VERSION}mu +- python${_CURRENT_VERSION}m +- python${_CURRENT_VERSION}u +- python${_CURRENT_VERSION} +- ) +- endif() +- +- # For backward compatibility, set PYTHON_INCLUDE_PATH. +- set(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}") +- +- if(PYTHON_INCLUDE_DIR AND EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h") +- file(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" python_version_str +- REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"") +- string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1" +- PYTHONLIBS_VERSION_STRING "${python_version_str}") +- unset(python_version_str) +- endif() +- +- if(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR) +- break() +- endif() +-endforeach() +- +-unset(_Python_INCLUDE_PATH_HINT) +-unset(_Python_LIBRARY_PATH_HINT) +- +-mark_as_advanced( +- PYTHON_DEBUG_LIBRARY +- PYTHON_LIBRARY +- PYTHON_INCLUDE_DIR +-) +- +-# We use PYTHON_INCLUDE_DIR, PYTHON_LIBRARY and PYTHON_DEBUG_LIBRARY for the +-# cache entries because they are meant to specify the location of a single +-# library. We now set the variables listed by the documentation for this +-# module. +-set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}") +-set(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}") +- +-# These variables have been historically named in this module different from +-# what SELECT_LIBRARY_CONFIGURATIONS() expects. +-set(PYTHON_LIBRARY_DEBUG "${PYTHON_DEBUG_LIBRARY}") +-set(PYTHON_LIBRARY_RELEASE "${PYTHON_LIBRARY}") +-include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) +-SELECT_LIBRARY_CONFIGURATIONS(PYTHON) +-# SELECT_LIBRARY_CONFIGURATIONS() sets ${PREFIX}_FOUND if it has a library. +-# Unset this, this prefix doesn't match the module prefix, they are different +-# for historical reasons. +-unset(PYTHON_FOUND) +- +-# Restore CMAKE_FIND_FRAMEWORK +-if(DEFINED _PythonLibs_CMAKE_FIND_FRAMEWORK) +- set(CMAKE_FIND_FRAMEWORK ${_PythonLibs_CMAKE_FIND_FRAMEWORK}) +- unset(_PythonLibs_CMAKE_FIND_FRAMEWORK) +-else() +- unset(CMAKE_FIND_FRAMEWORK) +-endif() +- +-include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs +- REQUIRED_VARS PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS +- VERSION_VAR PYTHONLIBS_VERSION_STRING) +- +-# PYTHON_ADD_MODULE( src1 src2 ... srcN) is used to build modules for python. +-# PYTHON_WRITE_MODULES_HEADER() writes a header file you can include +-# in your sources to initialize the static python modules +-function(PYTHON_ADD_MODULE _NAME ) +- get_property(_TARGET_SUPPORTS_SHARED_LIBS +- GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS) +- option(PYTHON_ENABLE_MODULE_${_NAME} "Add module ${_NAME}" TRUE) +- option(PYTHON_MODULE_${_NAME}_BUILD_SHARED +- "Add module ${_NAME} shared" ${_TARGET_SUPPORTS_SHARED_LIBS}) +- +- # Mark these options as advanced +- mark_as_advanced(PYTHON_ENABLE_MODULE_${_NAME} +- PYTHON_MODULE_${_NAME}_BUILD_SHARED) +- +- if(PYTHON_ENABLE_MODULE_${_NAME}) +- if(PYTHON_MODULE_${_NAME}_BUILD_SHARED) +- set(PY_MODULE_TYPE MODULE) +- else() +- set(PY_MODULE_TYPE STATIC) +- set_property(GLOBAL APPEND PROPERTY PY_STATIC_MODULES_LIST ${_NAME}) +- endif() +- +- set_property(GLOBAL APPEND PROPERTY PY_MODULES_LIST ${_NAME}) +- add_library(${_NAME} ${PY_MODULE_TYPE} ${ARGN}) +-# target_link_libraries(${_NAME} ${PYTHON_LIBRARIES}) +- +- if(PYTHON_MODULE_${_NAME}_BUILD_SHARED) +- set_target_properties(${_NAME} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}") +- if(WIN32 AND NOT CYGWIN) +- set_target_properties(${_NAME} PROPERTIES SUFFIX ".pyd") +- endif() +- endif() +- +- endif() +-endfunction() +- +-function(PYTHON_WRITE_MODULES_HEADER _filename) +- +- get_property(PY_STATIC_MODULES_LIST GLOBAL PROPERTY PY_STATIC_MODULES_LIST) +- +- get_filename_component(_name "${_filename}" NAME) +- string(REPLACE "." "_" _name "${_name}") +- string(TOUPPER ${_name} _nameUpper) +- set(_filename ${CMAKE_CURRENT_BINARY_DIR}/${_filename}) +- +- set(_filenameTmp "${_filename}.in") +- file(WRITE ${_filenameTmp} "/*Created by cmake, do not edit, changes will be lost*/\n") +- file(APPEND ${_filenameTmp} +-"#ifndef ${_nameUpper} +-#define ${_nameUpper} +- +-#include +- +-#ifdef __cplusplus +-extern \"C\" { +-#endif /* __cplusplus */ +- +-") +- +- foreach(_currentModule ${PY_STATIC_MODULES_LIST}) +- file(APPEND ${_filenameTmp} "extern void init${PYTHON_MODULE_PREFIX}${_currentModule}(void);\n\n") +- endforeach() +- +- file(APPEND ${_filenameTmp} +-"#ifdef __cplusplus +-} +-#endif /* __cplusplus */ +- +-") +- +- +- foreach(_currentModule ${PY_STATIC_MODULES_LIST}) +- file(APPEND ${_filenameTmp} "int ${_name}_${_currentModule}(void) \n{\n static char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n") +- endforeach() +- +- file(APPEND ${_filenameTmp} "void ${_name}_LoadAllPythonModules(void)\n{\n") +- foreach(_currentModule ${PY_STATIC_MODULES_LIST}) +- file(APPEND ${_filenameTmp} " ${_name}_${_currentModule}();\n") +- endforeach() +- file(APPEND ${_filenameTmp} "}\n\n") +- file(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n ${_name}_LoadAllPythonModules();\n}\n#endif\n\n#endif\n") +- +-# with configure_file() cmake complains that you may not use a file created using file(WRITE) as input file for configure_file() +- execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_filenameTmp}" "${_filename}" OUTPUT_QUIET ERROR_QUIET) +- +-endfunction() diff --git a/patch/ros-noetic-libfranka.patch b/patch/ros-noetic-libfranka.patch index b3dc906c0..a9f345ef9 100644 --- a/patch/ros-noetic-libfranka.patch +++ b/patch/ros-noetic-libfranka.patch @@ -1,5 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c3b03ef..de89fcc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -158,7 +158,7 @@ install(EXPORT FrankaTargets + # Ignore find_package(Franka) in subprojects. + set(FRANKA_IS_FOUND TRUE) + +-option(BUILD_TESTS "Build tests" ON) ++option(BUILD_TESTS "Build tests" OFF) + if(BUILD_TESTS) + enable_testing() + add_subdirectory(test) diff --git a/src/network.cpp b/src/network.cpp -index 8df6939..b92f7b6 100644 +index 9d47072..dded9ed 100644 --- a/src/network.cpp +++ b/src/network.cpp @@ -5,6 +5,14 @@ @@ -17,80 +30,3 @@ index 8df6939..b92f7b6 100644 using namespace std::string_literals; // NOLINT(google-build-using-namespace) namespace franka { - - -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index 3306c67..a79e8ef 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -62,69 +62,3 @@ target_link_libraries(run_all_tests PUBLIC ${TEST_DEPENDENCIES}) - - add_test(Default run_all_tests --gtest_output=xml:${TEST_OUTPUT_DIR}/default.xml) - --if(BUILD_COVERAGE) -- find_program(LCOV_PROG lcov) -- if(NOT LCOV_PROG) -- message(FATAL_ERROR "lcov not found.") -- endif() -- -- find_program(GENHTML_PROG genhtml) -- if(NOT GENHTML_PROG) -- message(FATAL_ERROR "genhtml not found.") -- endif() -- -- set(COVERAGE_REPORT_DIR "coverage") -- set(COVERAGE_FILE "all_tests.coverage") -- -- add_custom_target(coverage -- COMMAND ${LCOV_PROG} --directory . --zerocounters -- COMMAND ${CMAKE_CTEST_COMMAND} -R Default . -- COMMAND ${LCOV_PROG} --directory . --capture --output-file ${COVERAGE_FILE} -- COMMAND ${LCOV_PROG} --remove ${COVERAGE_FILE} 'test/*' '/usr/*' --output-file ${COVERAGE_FILE} -- COMMAND ${GENHTML_PROG} -o ${COVERAGE_REPORT_DIR} ${COVERAGE_FILE} -- WORKING_DIRECTORY ${CMAKE_BINARY_DIR} -- DEPENDS run_all_tests -- COMMENT "Generating code coverage" -- ) -- return() --endif() -- --## Sanitizers --include(CheckCXXCompilerFlag) --get_target_property(TESTS run_all_tests SOURCES) -- --set(ASan_FLAGS -g -O1 -fsanitize=address) --set(UBSan_FLAGS -g -O1 -fsanitize=undefined -fno-sanitize=alignment -fno-sanitize-recover=undefined) --set(TSan_FLAGS -g -O1 -fsanitize=thread) --set(SANITIZERS ASan UBSan TSan) -- --foreach(sanitizer ${SANITIZERS}) -- set(sanitizer_flags "${${sanitizer}_FLAGS}") -- -- set(CMAKE_REQUIRED_LIBRARIES "${sanitizer_flags}") -- check_cxx_compiler_flag("${sanitizer_flags}" HAVE_${sanitizer}) -- unset(CMAKE_REQUIRED_LIBRARIES) -- -- if(HAVE_${sanitizer}) -- string(TOLOWER "${sanitizer}" sanitizer_lc) -- set(target_name "run_all_tests_${sanitizer_lc}") -- -- add_executable(${target_name} ${TESTS}) -- target_compile_definitions(${target_name} PRIVATE ${TEST_COMPILE_DEFINITIONS}) -- target_include_directories(${target_name} PRIVATE ${TEST_INCLUDE_DIRECTORIES}) -- target_link_libraries(${target_name} PUBLIC ${TEST_DEPENDENCIES} ${sanitizer_flags}) -- target_compile_options(${target_name} PRIVATE ${sanitizer_flags}) -- add_test(NAME ${sanitizer} -- COMMAND ${target_name} --gtest_output=xml:${TEST_OUTPUT_DIR}/${sanitizer_lc}.xml -- ) -- endif() --endforeach() -- --## Valgrind --find_program(VALGRIND_PROG valgrind) --if(VALGRIND_PROG) -- add_test(NAME Valgrind -- COMMAND ${VALGRIND_PROG} --error-exitcode=1 --track-origins=yes -- -- ./run_all_tests --gtest_output=xml:${TEST_OUTPUT_DIR}/valgrind.xml -- ) --endif() - diff --git a/patch/ros-noetic-moveit-ros-move-group.patch b/patch/ros-noetic-moveit-ros-move-group.patch deleted file mode 100644 index 33072a98b..000000000 --- a/patch/ros-noetic-moveit-ros-move-group.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/moveit_ros/move_group/include/moveit/move_group/move_group_context.h b/moveit_ros/move_group/include/moveit/move_group/move_group_context.h -index e500cf5f174..e31455b331f 100644 ---- a/moveit_ros/move_group/include/moveit/move_group/move_group_context.h -+++ b/moveit_ros/move_group/include/moveit/move_group/move_group_context.h -@@ -36,6 +36,7 @@ - - #pragma once - -+#include - #include - - namespace moveit_cpp - diff --git a/patch/ros-noetic-moveit-ros-perception.osx.patch b/patch/ros-noetic-moveit-ros-perception.osx.patch index 9d557f055..cf4fb7cb0 100644 --- a/patch/ros-noetic-moveit-ros-perception.osx.patch +++ b/patch/ros-noetic-moveit-ros-perception.osx.patch @@ -49,19 +49,6 @@ index e2e3dc26e..735d225f4 100644 find_package(OpenMP REQUIRED) find_package(OpenCV) -diff --git a/mesh_filter/src/depth_self_filter_nodelet.cpp b/mesh_filter/src/depth_self_filter_nodelet.cpp -index 5bbe88239..6acab3f10 100644 ---- a/mesh_filter/src/depth_self_filter_nodelet.cpp -+++ b/mesh_filter/src/depth_self_filter_nodelet.cpp -@@ -91,7 +91,7 @@ void mesh_filter::DepthSelfFiltering::onInit() - model_label_ptr_ = std::make_shared(); - - mesh_filter_ = std::make_shared>( -- bind(&TransformProvider::getTransform, &transform_provider_, std::placeholders::_1, std::placeholders::_2), -+ std::bind(&TransformProvider::getTransform, &transform_provider_, std::placeholders::_1, std::placeholders::_2), - mesh_filter::StereoCameraModel::REGISTERED_PSDK_PARAMS); - mesh_filter_->parameters().setDepthRange(near_clipping_plane_distance_, far_clipping_plane_distance_); - mesh_filter_->setShadowThreshold(shadow_threshold_); diff --git a/mesh_filter/src/gl_renderer.cpp b/mesh_filter/src/gl_renderer.cpp index 834d2b4ed..8ba0300b2 100644 --- a/mesh_filter/src/gl_renderer.cpp diff --git a/patch/ros-noetic-moveit-ros-planning-interface.win.patch b/patch/ros-noetic-moveit-ros-planning-interface.patch similarity index 74% rename from patch/ros-noetic-moveit-ros-planning-interface.win.patch rename to patch/ros-noetic-moveit-ros-planning-interface.patch index 6147d00f2..272c0009e 100644 --- a/patch/ros-noetic-moveit-ros-planning-interface.win.patch +++ b/patch/ros-noetic-moveit-ros-planning-interface.patch @@ -1,10 +1,10 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index bcc6070c8..78c0637bf 100644 +index 73f1aa3ea4..67528cf75c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -28,6 +28,9 @@ find_package(catkin REQUIRED COMPONENTS - rosconsole +@@ -19,6 +19,9 @@ find_package(catkin REQUIRED COMPONENTS ) + moveit_build_options() +find_package(PkgConfig REQUIRED) +pkg_check_modules(EIGENPY REQUIRED eigenpy) @@ -12,7 +12,7 @@ index bcc6070c8..78c0637bf 100644 find_package(PythonInterp REQUIRED) find_package(PythonLibs "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" REQUIRED) -@@ -88,8 +91,11 @@ include_directories(SYSTEM +@@ -77,8 +80,11 @@ include_directories(SYSTEM ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS} @@ -25,7 +25,7 @@ index bcc6070c8..78c0637bf 100644 add_subdirectory(common_planning_interface_objects) add_subdirectory(planning_scene_interface) diff --git a/move_group_interface/CMakeLists.txt b/move_group_interface/CMakeLists.txt -index d822174bf..c3eb1686c 100644 +index d822174bf0..c3eb1686c0 100644 --- a/move_group_interface/CMakeLists.txt +++ b/move_group_interface/CMakeLists.txt @@ -2,7 +2,7 @@ set(MOVEIT_LIB_NAME moveit_move_group_interface) @@ -38,10 +38,10 @@ index d822174bf..c3eb1686c 100644 add_library(${MOVEIT_LIB_NAME}_python src/wrap_python_move_group.cpp) diff --git a/move_group_interface/include/moveit/move_group_interface/move_group_interface.h b/move_group_interface/include/moveit/move_group_interface/move_group_interface.h -index ec8d70f0b..0e8c6b340 100644 +index 17de157197..fdae58ab37 100644 --- a/move_group_interface/include/moveit/move_group_interface/move_group_interface.h +++ b/move_group_interface/include/moveit/move_group_interface/move_group_interface.h -@@ -55,6 +55,20 @@ +@@ -56,6 +56,20 @@ #include #include @@ -62,7 +62,7 @@ index ec8d70f0b..0e8c6b340 100644 namespace moveit { /** \brief Simple interface to MoveIt components */ -@@ -96,7 +110,7 @@ MOVEIT_CLASS_FORWARD(MoveGroupInterface); +@@ -70,7 +84,7 @@ MOVEIT_CLASS_FORWARD(MoveGroupInterface); // Defines MoveGroupInterfacePtr, Con \brief Client class to conveniently use the ROS interfaces provided by the move_group node. This class includes many default settings to make things easy to use. */ @@ -71,3 +71,17 @@ index ec8d70f0b..0e8c6b340 100644 { public: /** \brief Default ROS parameter name from where to read the robot's URDF. Set to 'robot_description' */ +diff --git a/py_bindings_tools/CMakeLists.txt b/py_bindings_tools/CMakeLists.txt +index 1f82d7e4dc..9ef98d8136 100644 +--- a/py_bindings_tools/CMakeLists.txt ++++ b/py_bindings_tools/CMakeLists.txt +@@ -1,5 +1,9 @@ + set(MOVEIT_LIB_NAME moveit_py_bindings_tools) + ++find_package(PythonInterp REQUIRED) ++find_package(PythonLibs "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" REQUIRED) ++ ++ + add_library(${MOVEIT_LIB_NAME} src/roscpp_initializer.cpp) + set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}") + target_link_libraries(${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) diff --git a/patch/ros-noetic-moveit-setup-assistant.win.patch b/patch/ros-noetic-moveit-setup-assistant.win.patch index 43bafa649..2e6ac07f1 100644 --- a/patch/ros-noetic-moveit-setup-assistant.win.patch +++ b/patch/ros-noetic-moveit-setup-assistant.win.patch @@ -11,15 +11,16 @@ index c39d7cfe2..9fc8981b0 100644 catkin_package( INCLUDE_DIRS diff --git a/src/tools/collision_linear_model.h b/src/tools/collision_linear_model.h -index dd3dd4006..87835d61d 100644 +index 9cd06f5911..283145c1d3 100644 --- a/src/tools/collision_linear_model.h +++ b/src/tools/collision_linear_model.h -@@ -42,11 +42,24 @@ +@@ -41,8 +41,21 @@ + #include - #ifndef Q_MOC_RUN - #include + #include "collision_matrix_model.h" +#include -+ + +-class CollisionLinearModel : public QAbstractProxyModel +// Import/export for windows dll's and visibility for gcc shared libraries. + +#ifdef ROS_BUILD_SHARED_LIBS // ros is being built around shared libraries @@ -31,16 +32,12 @@ index dd3dd4006..87835d61d 100644 +#else // ros is being built around static libraries + #define MOVEIT_SETUP_ASSISTANT_TOOLS_DECL +#endif - #endif - - #include "collision_matrix_model.h" - --class CollisionLinearModel : public QAbstractProxyModel ++ +class MOVEIT_SETUP_ASSISTANT_TOOLS_DECL CollisionLinearModel : public QAbstractProxyModel { Q_OBJECT -@@ -76,7 +89,7 @@ public: +@@ -71,7 +84,7 @@ class CollisionLinearModel : public QAbstractProxyModel }; /** proxy model to allow for sorting of CollisionLinearModel, considering sorting history */ diff --git a/patch/ros-noetic-python-qt-binding.patch b/patch/ros-noetic-python-qt-binding.patch index 0f4fdb8d0..c5d342dfd 100644 --- a/patch/ros-noetic-python-qt-binding.patch +++ b/patch/ros-noetic-python-qt-binding.patch @@ -42,7 +42,7 @@ index 0000000..9353bab +define-macros = [@SIP_EXTRA_DEFINES@] +exceptions = true diff --git a/cmake/sip_helper.cmake b/cmake/sip_helper.cmake -index a055cf5..e30c04f 100644 +index a055cf5..a27a6cd 100644 --- a/cmake/sip_helper.cmake +++ b/cmake/sip_helper.cmake @@ -18,7 +18,7 @@ execute_process( @@ -70,7 +70,7 @@ index a055cf5..e30c04f 100644 # # Run the SIP generator and compile the generated code into a library. # -@@ -89,32 +98,99 @@ function(build_sip_binding PROJECT_NAME SIP_FILE) +@@ -89,32 +98,89 @@ function(build_sip_binding PROJECT_NAME SIP_FILE) # SIP configure doesn't handle CMake targets catkin_replace_imported_library_targets(LIBRARIES ${LIBRARIES}) @@ -81,7 +81,7 @@ index a055cf5..e30c04f 100644 - WORKING_DIRECTORY ${sip_SOURCE_DIR} - COMMENT "Running SIP generator for ${PROJECT_NAME} Python bindings..." - ) -+ if(${SIP_VERSION} VERSION_GREATER_EQUAL "5.0.0") ++ if(TRUE) + # Since v5, SIP implements the backend per PEP 517, PEP 518 + # Here we synthesize `pyproject.toml` and run `pip install` + @@ -105,35 +105,25 @@ index a055cf5..e30c04f 100644 + # SIP expects the libraries WITHOUT the file extension. + set(SIP_LIBARIES "") + set(SIP_LIBRARY_DIRS "") ++ foreach(_x ${LIBRARY_DIRS}) ++ set(SIP_LIBRARY_DIRS "${SIP_LIBRARY_DIRS},\"${_x}\"") ++ endforeach() ++ + foreach(_x ${LIBRARIES} ${PYTHON_LIBRARIES}) -+ string(FIND "${_x}" "/" STARTSWITHSLASH) -+ if("${STARTSWITHSLASH}" EQUAL 0) -+ get_filename_component(_x_NAME "${_x}" NAME_WLE) -+ get_filename_component(_x_DIR "${_x}" DIRECTORY) -+ get_filename_component(_x "${_x_DIR}/${_x_NAME}" ABSOLUTE) -+ STRING(REGEX REPLACE "^lib" "" _x_NAME_NOPREFIX ${_x_NAME}) -+ string(FIND "${_x_NAME_NOPREFIX}" "$) ++ else() ++ # This library should work as is ++ list(APPEND qt_gui_cpp_sip_LIBRARIES ${_lib_name}) ++ endif() ++endforeach() ++ + find_package(python_qt_binding REQUIRED) + include(${python_qt_binding_EXTRAS_DIR}/sip_helper.cmake) + +@@ -47,11 +60,19 @@ if(sip_helper_FOUND) ) if(APPLE) @@ -15,6 +42,15 @@ index 370457fe..db1ca537 100644 elseif(WIN32) set(LIBQT_GUI_CPP_SIP_SUFFIX .pyd) else() +- set(LIBQT_GUI_CPP_SIP_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}) ++ if(${SIP_VERSION} VERSION_GREATER_EQUAL "5.0.0") ++ set(LIBQT_GUI_CPP_SIP_SUFFIX ".cpython-${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}-${CMAKE_HOST_SYSTEM_PROCESSOR}-linux-gnu${CMAKE_SHARED_LIBRARY_SUFFIX}") ++ else() ++ set(LIBQT_GUI_CPP_SIP_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}) ++ endif() + endif() + + install(FILES ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION}/libqt_gui_cpp_sip${LIBQT_GUI_CPP_SIP_SUFFIX} diff --git a/src/qt_gui_cpp_sip/qt_gui_cpp.sip b/src/qt_gui_cpp_sip/qt_gui_cpp.sip index ef3c52d7..cd02078d 100644 --- a/src/qt_gui_cpp_sip/qt_gui_cpp.sip diff --git a/patch/ros-noetic-robot-localization.win.patch b/patch/ros-noetic-robot-localization.win.patch index d710dfa45..da6fa40c3 100644 --- a/patch/ros-noetic-robot-localization.win.patch +++ b/patch/ros-noetic-robot-localization.win.patch @@ -1,16 +1,16 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 56fd522..4574e58 100644 +index cc7f3341..eac0a60f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -114,7 +114,6 @@ catkin_package( - tf2_ros +@@ -115,7 +115,6 @@ catkin_package( DEPENDS ${EIGEN_PACKAGE} + GeographicLib - YAML_CPP ) ########### -@@ -127,8 +126,6 @@ include_directories( +@@ -128,8 +127,6 @@ include_directories( ${EIGEN3_INCLUDE_DIRS} ${YAML_CPP_INCLUDE_DIRS}) @@ -18,4 +18,4 @@ index 56fd522..4574e58 100644 - # Library definitions add_library(filter_utilities src/filter_utilities.cpp) - add_library(filter_base src/filter_base.cpp) + add_library(filter_base src/filter_base.cpp) \ No newline at end of file diff --git a/patch/ros-noetic-rtabmap.patch b/patch/ros-noetic-rtabmap.patch index 283983e92..0c044b9bc 100644 --- a/patch/ros-noetic-rtabmap.patch +++ b/patch/ros-noetic-rtabmap.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index c9adfe3..763fb46 100644 +index 6f9c28f4b..7390fc010 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -74,14 +74,6 @@ IF(MINGW) +@@ -79,14 +79,6 @@ IF(MINGW) SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--enable-auto-import") ENDIF(MINGW) @@ -17,7 +17,7 @@ index c9adfe3..763fb46 100644 #The CDT Error Parser cannot handle error messages that span #more than one line, which is the default gcc behavior. #In order to force gcc to generate single line error messages with no line wrapping -@@ -157,14 +149,14 @@ OPTION(BUILD_TOOLS "Build tools" ON) +@@ -162,14 +154,14 @@ OPTION(BUILD_TOOLS "Build tools" ON) OPTION(BUILD_EXAMPLES "Build examples" ON) ####### DEPENDENCIES ####### @@ -34,7 +34,7 @@ index c9adfe3..763fb46 100644 option(WITH_PYTHON_THREADING "Use more than one Python interpreter." OFF) option(WITH_PDAL "Include PDAL support" ON) option(WITH_FREENECT "Include Freenect support" ON) -@@ -325,6 +317,8 @@ IF(WITH_QT) +@@ -348,6 +340,8 @@ IF(WITH_QT) ENDIF() ADD_DEFINITIONS(-DQT_NO_KEYWORDS) # To avoid conflicts with boost signals/foreach and Qt macros ENDIF(QT4_FOUND OR Qt5_FOUND) @@ -42,21 +42,12 @@ index c9adfe3..763fb46 100644 + add_compile_definitions(DISABLE_VTK) ENDIF(WITH_QT) - IF(WITH_TORCH) -@@ -335,7 +329,7 @@ IF(WITH_TORCH) - ENDIF(WITH_TORCH) - - IF(WITH_PYTHON) -- FIND_PACKAGE(Python3 COMPONENTS Interpreter Development) -+ FIND_PACKAGE(Python3 COMPONENTS Interpreter Development NumPy) - IF(Python3_FOUND) - MESSAGE(STATUS "Found Python3") - ENDIF(Python3_FOUND) + IF(NOT VTK_FOUND) diff --git a/corelib/src/CMakeLists.txt b/corelib/src/CMakeLists.txt -index 2f7f005..9e2e659 100644 +index 9df6b45fd..78c02b658 100644 --- a/corelib/src/CMakeLists.txt +++ b/corelib/src/CMakeLists.txt -@@ -155,6 +155,13 @@ SET(LIBRARIES +@@ -159,6 +159,13 @@ SET(LIBRARIES ${ZLIB_LIBRARIES} ) @@ -70,23 +61,15 @@ index 2f7f005..9e2e659 100644 IF(Sqlite3_FOUND) SET(INCLUDE_DIRS ${INCLUDE_DIRS} -@@ -195,6 +202,7 @@ IF(Python3_FOUND) - SET(LIBRARIES - ${LIBRARIES} - Python3::Python -+ Python3::NumPy - ) - SET(SRC_FILES - ${SRC_FILES} -@@ -206,6 +214,8 @@ IF(Python3_FOUND) +@@ -210,6 +217,8 @@ IF(WITH_PYTHON AND Python3_FOUND) + SET(INCLUDE_DIRS ${TORCH_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/python ++ ${Python3_INCLUDE_DIRS} ++ ${Python3_NumPy_INCLUDE_DIRS} ${INCLUDE_DIRS} -+ ${Python3_INCLUDE_DIRS} -+ ${Python3_NumPy_INCLUDE_DIRS} ) - ENDIF(Python3_FOUND) - + ENDIF(WITH_PYTHON AND Python3_FOUND) diff --git a/tools/EurocDataset/CMakeLists.txt b/tools/EurocDataset/CMakeLists.txt index 3b1e5e4..2f23770 100644 --- a/tools/EurocDataset/CMakeLists.txt diff --git a/patch/ros-noetic-rviz.osx.patch b/patch/ros-noetic-rviz.osx.patch index fb72eb0df..e96482872 100644 --- a/patch/ros-noetic-rviz.osx.patch +++ b/patch/ros-noetic-rviz.osx.patch @@ -3,13 +3,13 @@ index 49abcfea8..af47fef99 100644 --- a/src/rviz/default_plugin/camera_display.cpp +++ b/src/rviz/default_plugin/camera_display.cpp @@ -34,6 +34,7 @@ - #include - #include - #include -+#include - #include - #include - #include + #include + #include + #include ++#include + #include + #include + #include @@ -102,6 +103,8 @@ CameraDisplay::CameraDisplay() SLOT(forceRender())); zoom_property_->setMin(0.00001); @@ -206,9 +206,9 @@ index 5532741d4..10fc63314 100644 +++ b/src/rviz/render_panel.cpp @@ -35,6 +35,7 @@ - #include - #include -+#include + #include + #include ++#include #include #include diff --git a/patch/ros-noetic-rviz.patch b/patch/ros-noetic-rviz.patch index 2b6f7c492..5f868e090 100644 --- a/patch/ros-noetic-rviz.patch +++ b/patch/ros-noetic-rviz.patch @@ -1,8 +1,20 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index d623dd4e..0d1c07bb 100644 +index d623dd4e..e4490137 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -98,10 +98,10 @@ if(APPLE) +@@ -1,6 +1,11 @@ + cmake_minimum_required(VERSION 3.0.2) + project(rviz) + ++## Restrict Windows header namespace usage ++if(WIN32) ++ add_definitions(-DNOGDI) ++endif() ++ + if (POLICY CMP0042) + cmake_policy(SET CMP0042 NEW) + endif() +@@ -98,10 +103,10 @@ if(APPLE) endif() # Prefer newer vender-specific OpenGL library @@ -17,7 +29,7 @@ index d623dd4e..0d1c07bb 100644 set(CMAKE_AUTOMOC ON) -@@ -214,7 +214,7 @@ catkin_package( +@@ -214,7 +219,7 @@ catkin_package( #catkin_lint: ignore_once external_directory include_directories(src ${EXPORT_HEADER_DIR}) @@ -44,10 +56,34 @@ index 4b3c5b82..e714db0f 100644 { type truetype diff --git a/src/python_bindings/sip/CMakeLists.txt b/src/python_bindings/sip/CMakeLists.txt -index efbb497b..7a2a60e6 100644 +index efbb497b..f68732cf 100644 --- a/src/python_bindings/sip/CMakeLists.txt +++ b/src/python_bindings/sip/CMakeLists.txt -@@ -69,7 +69,12 @@ if(sip_helper_FOUND) +@@ -48,7 +48,11 @@ set(rviz_sip_INCLUDE_DIRS + ${OGRE_INCLUDE_DIRS} + ${catkin_INCLUDE_DIRS} + ) +-set(rviz_sip_LIBRARIES ${rviz_LIBRARIES} ${PROJECT_NAME}) ++ ++find_package(OpenGL REQUIRED) ++find_package(Threads REQUIRED) ++message(WARNING "TEST: ${OPENGL_gl_LIBRARY}") ++set(rviz_sip_LIBRARIES ${rviz_LIBRARIES} ${PROJECT_NAME} ${OPENGL_gl_LIBRARY}) + set(rviz_sip_LIBRARY_DIRS ${rviz_LIBRARY_DIRS} ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_LIB_DESTINATION}) + if (MSVC) + set(rviz_sip_LDFLAGS_OTHER ${rviz_LDFLAGS_OTHER} /LIBPATH:\"${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_LIB_DESTINATION}\") +@@ -56,6 +60,10 @@ else() + set(rviz_sip_LDFLAGS_OTHER ${rviz_LDFLAGS_OTHER} -Wl,-rpath,\\"${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_LIB_DESTINATION}\\") + endif() + ++message(WARNING "rviz_sip_LIBRARIES: ${rviz_sip_LIBRARIES}") ++message(WARNING "rviz_sip_LIBRARY_DIRS: ${rviz_sip_LIBRARY_DIRS}") ++ ++ + if(sip_helper_FOUND) + list(APPEND rviz_BINDINGS "sip") + set(rviz_BINDINGS "${rviz_BINDINGS}" PARENT_SCOPE) +@@ -69,11 +77,21 @@ if(sip_helper_FOUND) if(DEFINED PYTHON_EXTENSION_MODULE_SUFFIX) set(rviz_sip_LIBRARY_FILE librviz_sip${PYTHON_EXTENSION_MODULE_SUFFIX}) elseif(APPLE) @@ -61,6 +97,16 @@ index efbb497b..7a2a60e6 100644 elseif(WIN32) set(rviz_sip_LIBRARY_FILE librviz_sip.pyd) else() +- set(rviz_sip_LIBRARY_FILE librviz_sip${CMAKE_SHARED_LIBRARY_SUFFIX}) ++ if(${SIP_VERSION} VERSION_GREATER_EQUAL "5.0.0") ++ message(WARNING "Use hack") ++ set(rviz_sip_LIBRARY_FILE "librviz_sip.cpython-${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}-${CMAKE_HOST_SYSTEM_PROCESSOR}-linux-gnu${CMAKE_SHARED_LIBRARY_SUFFIX}") ++ else() ++ set(rviz_sip_LIBRARY_FILE librviz_sip${CMAKE_SHARED_LIBRARY_SUFFIX}) ++ endif() + endif() + #catkin_lint: ignore_once external_file + install(FILES ${CATKIN_DEVEL_PREFIX}/${PYTHON_INSTALL_DIR}/rviz/${rviz_sip_LIBRARY_FILE} diff --git a/src/rviz/ogre_helpers/render_system.cpp b/src/rviz/ogre_helpers/render_system.cpp index 4005f982..c0441de8 100644 --- a/src/rviz/ogre_helpers/render_system.cpp diff --git a/patch/ros-noetic-twist-mux.patch b/patch/ros-noetic-twist-mux.patch deleted file mode 100644 index 2360b5996..000000000 --- a/patch/ros-noetic-twist-mux.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff --git a/include/twist_mux/topic_handle.h b/include/twist_mux/topic_handle.h -index a24cbaa..aac2600 100644 ---- a/include/twist_mux/topic_handle.h -+++ b/include/twist_mux/topic_handle.h -@@ -85,7 +85,7 @@ class TopicHandle_ : boost::noncopyable - */ - bool hasExpired() const - { -- return (timeout_ > 0.0) and -+ return (timeout_ > 0.0) && - ((ros::Time::now() - stamp_).toSec() > timeout_); - } - -@@ -155,7 +155,7 @@ class VelocityTopicHandle : public TopicHandle_ - - bool isMasked(priority_type lock_priority) const - { -- return hasExpired() or (getPriority() < lock_priority); -+ return hasExpired() || (getPriority() < lock_priority); - } - - void callback(const geometry_msgs::TwistConstPtr& msg) -@@ -194,7 +194,7 @@ class LockTopicHandle : public TopicHandle_ - */ - bool isLocked() const - { -- return hasExpired() or getMessage().data; -+ return hasExpired() || getMessage().data; - } - - void callback(const std_msgs::BoolConstPtr& msg) -diff --git a/src/twist_mux.cpp b/src/twist_mux.cpp -index 4a67ea4..783316e 100644 ---- a/src/twist_mux.cpp -+++ b/src/twist_mux.cpp -@@ -41,7 +41,7 @@ bool hasIncreasedAbsVelocity(const geometry_msgs::Twist& old_twist, const geomet - const auto old_angular_z = std::abs(old_twist.angular.z); - const auto new_angular_z = std::abs(new_twist.angular.z); - -- return (old_linear_x < new_linear_x ) or -+ return (old_linear_x < new_linear_x ) || - (old_angular_z < new_angular_z); - } - -@@ -149,7 +149,7 @@ bool TwistMux::hasPriority(const VelocityTopicHandle& twist) - /// that is NOT masked by the lock priority: - for (const auto& velocity_h : *velocity_hs_) - { -- if (not velocity_h.isMasked(lock_priority)) -+ if (!velocity_h.isMasked(lock_priority)) - { - const auto velocity_priority = velocity_h.getPriority(); - if (priority < velocity_priority) diff --git a/robostack.yaml b/robostack.yaml index 2381fb267..61a780629 100644 --- a/robostack.yaml +++ b/robostack.yaml @@ -32,8 +32,12 @@ bullet: robostack: [bullet] bzip2: robostack: [bzip2] +cartographer: + robostack: [cartographer] ca-certificates: robostack: [ca-certificates] +clang-tidy: + robostack: [clang-tools] cmake: robostack: [cmake] coinor-libcbc-dev: @@ -62,7 +66,7 @@ curl: cython: robostack: [cython] doxygen: - robostack: [doxygen] + robostack: [doxygen, graphviz] eigen: robostack: [eigen] emacs: @@ -122,16 +126,22 @@ gtk3: xorg-libxinerama, xorg-xineramaproto, epoxy, REQUIRE_GL] ignition-common4: robostack: [libignition-common4] +ignition-cmake2: + robostack: [libignition-cmake2] ignition-gazebo3: robostack: [libignition-gazebo5] ignition-gazebo5: robostack: [libignition-gazebo5] +ignition-gazebo6: + robostack: [libignition-gazebo6] ignition-gui5: robostack: [libignition-gui5] ignition-math6: robostack: [libignition-math6] ignition-msgs5: robostack: [libignition-msgs5] +ignition-msgs8: + robostack: [libignition-msgs8] ignition-msgs7: robostack: [libignition-msgs7] ignition-rendering5: @@ -140,6 +150,8 @@ ignition-transport8: robostack: [libignition-transport8] ignition-transport10: robostack: [libignition-transport10] +ignition-transport11: + robostack: [libignition-transport11] java: robostack: [openjdk] jupyter-notebook: @@ -152,6 +164,8 @@ lcov: robostack: [lcov] leveldb: robostack: [leveldb] +libabsl-dev: + robostack: [abseil-cpp] libblas-dev: robostack: [libblas, libcblas] libboost-chrono-dev: @@ -207,6 +221,10 @@ libconsole-bridge-dev: robostack: [console_bridge] libcunit-dev: robostack: [cunit] +libcurl: + robostack: [libcurl] +libcurl-dev: + robostack: [libcurl] libdc1394-dev: robostack: [libdc1394] libfcl-dev: @@ -265,6 +283,8 @@ libhdf5-dev: robostack: [hdf5] libi2c-dev: robostack: [libi2c] +liblttng-ust-dev: + robostack: [lttng-ust] libjpeg: robostack: [libjpeg-turbo] libjsoncpp: @@ -305,6 +325,8 @@ libopenblas-dev: robostack: [libblas] libopencv-dev: robostack: [py-opencv, libopencv, REQUIRE_OPENGL] +libopencv-imgproc-dev: + robostack: [py-opencv, libopencv, REQUIRE_OPENGL] libopenni-dev: robostack: [] liborocos-kdl: @@ -332,35 +354,21 @@ libqglviewer-dev-qt5: libqhull: robostack: [qhull] libqt5-core: - robostack: - linux: [qt 5.12] - osx: [qt-main] - win64: [qt 5] + robostack: [qt-main, REQUIRE_OPENGL] libqt5-gui: - robostack: - linux: [qt 5.12, REQUIRE_OPENGL] - osx: [qt-main, REQUIRE_OPENGL] - win64: [qt 5] + robostack: [qt-main, REQUIRE_OPENGL] libqt5-opengl: - robostack: - linux: [qt 5.12, REQUIRE_OPENGL] - osx: [qt-main, REQUIRE_OPENGL] - win64: [qt 5] + robostack: [qt-main, REQUIRE_OPENGL] libqt5-opengl-dev: - robostack: - linux: [qt 5.12, REQUIRE_OPENGL] - osx: [qt-main, REQUIRE_OPENGL] - win64: [qt 5] + robostack: [qt-main, REQUIRE_OPENGL] +libqt5-svg-dev: + robostack: [qt-main, REQUIRE_OPENGL] +libqt5-websockets-dev: + robostack: [qt-main, REQUIRE_OPENGL] libqt5-widgets: - robostack: - linux: [qt 5.12, REQUIRE_OPENGL] - osx: [qt-main, REQUIRE_OPENGL] - win64: [qt 5] + robostack: [qt-main, REQUIRE_OPENGL] libqt5x11extras5-dev: - robostack: - linux: [qt 5.12, REQUIRE_OPENGL] - osx: [qt-main, REQUIRE_OPENGL] - win64: [qt 5] + robostack: [qt-main, REQUIRE_OPENGL] libreadline: robostack: [readline] libreadline-dev: @@ -379,6 +387,8 @@ libtool: robostack: [libtool] libturbojpeg: robostack: [libjpeg-turbo] +libtins-dev: + robostack: [libtins] libudev-dev: robostack: [libusb] liburdfdom-dev: @@ -458,6 +468,8 @@ netpbm: linux: [netpbm] osx: [netpbm] win64: [] +nlohmann-json-dev: + robostack: [nlohmann_json] nlopt: robostack: [nlopt] ocl-icd-opencl-dev: @@ -485,6 +497,8 @@ protobuf-dev: robostack: [libprotobuf, protobuf] pugixml-dev: robostack: [pugixml] +pybind11-dev: + robostack: [pybind11] pycodestyle: robostack: [pycodestyle] pydocstyle: @@ -566,10 +580,7 @@ python-pygraphviz: python-pyusb-pip: robostack: [pyusb] python-qt5-bindings: - robostack: - linux: [pyqt 5.12] - osx: [pyqt 5, pyqt-builder] - win64: [pyqt 5] + robostack: [pyqt, pyqt-builder] python-rosdep: robostack: [rosdep] python-rosdep-modules: @@ -640,6 +651,12 @@ python3-empy: robostack: [empy] python3-flake8: robostack: [flake8] +python3-flask: + robostack: [flask] +python3-flask-cors: + robostack: [flask-cors] +python3-fiona: + robostack: [fiona] python3-future: robostack: [future] python3-github: @@ -662,6 +679,8 @@ python3-importlib-metadata: robostack: [importlib-metadata] python3-importlib-resources: robostack: [importlib_resources] +python3-jinja2: + robostack: [jinja2] python3-kitchen: robostack: [kitchen] python3-lark-parser: @@ -727,24 +746,17 @@ python3-pytest-cov: python3-pytest-mock: robostack: [pytest-mock] python3-qt5-bindings: - robostack: - linux: [pyqt 5.12] - osx: [pyqt 5, pyqt-builder] - win64: [pyqt 5] + robostack: [pyqt, pyqt-builder] python3-qt5-bindings-gl: - robostack: - linux: [pyqt 5.12] - osx: [pyqt 5, pyqt-builder] - win64: [pyqt 5] + robostack: [pyqt, pyqt-builder] python3-qt5-bindings-webkit: - robostack: - linux: [pyqt 5.12] - osx: [pyqt, pyqt-builder] - win64: [pyqt 5] + robostack: [pyqtwebengine] python3-requests: robostack: [requests] python3-requests-oauthlib: robostack: [requests-oauthlib] +python3-rtree: + robostack: [rtree] python3-rosdep: robostack: [rosdep] python3-rosdep-modules: @@ -785,6 +797,8 @@ python3-tornado: robostack: [tornado] python3-twisted: robostack: [twisted] +python3-typeguard: + robostack: [typeguard] python3-usb: robostack: [pyusb] python3-venv: @@ -796,20 +810,11 @@ python3-yaml: python3-zmq: robostack: [pyzmq] qt5-image-formats-plugins: - robostack: - linux: [qt 5.12] - osx: [qt-main] - win64: [qt 5] + robostack: [qt-main, REQUIRE_OPENGL] qt5-qmake: - robostack: - linux: [qt 5.12] - osx: [qt-main] - win64: [qt 5] + robostack: [qt-main, REQUIRE_OPENGL] qtbase5-dev: - robostack: - linux: [qt 5.12, REQUIRE_OPENGL] - osx: [qt-main, REQUIRE_OPENGL] - win64: [qt 5] + robostack: [qt-main, REQUIRE_OPENGL] roboticstoolbox-python: robostack: [roboticstoolbox-python] rsync: @@ -825,6 +830,8 @@ screen: robostack: [screen] sdformat: robostack: [libsdformat] +sdformat12: + robostack: [libsdformat12] sdl: robostack: [sdl] sdl-image: @@ -843,6 +850,8 @@ subversion: robostack: [subversion] suitesparse: robostack: [suitesparse] +sqlite3: + robostack: [sqlite 3.*] swig: robostack: [swig] sysstat: diff --git a/vinca_linux_64.yaml b/vinca_linux_64.yaml index 67d9bd926..44c4a49a9 100644 --- a/vinca_linux_64.yaml +++ b/vinca_linux_64.yaml @@ -1,21 +1,22 @@ ros_distro: noetic -mutex_package: ros-distro-mutex 0.3 noetic +mutex_package: ros-distro-mutex 0.4 noetic # mapping for package keys conda_index: - robostack.yaml - packages-ignore.yaml -build_number: 14 +build_number: 15 # Ignore all dependencies of selected packages skip_all_deps: false # If full rebuild, the build number of the existing package has # to match the selected build number for skipping -full_rebuild: false +full_rebuild: true packages_skip_by_deps: + - eigenpy # - ros_core # - diagnostic_updater @@ -33,14 +34,18 @@ build_in_own_azure_stage: skip_existing: - https://conda.anaconda.org/robostack/ + - https://conda.anaconda.org/robostack-staging/ packages_select_by_deps: # - pybind11_catkin # Needs to be patched to use conda-forge's pybind11 - apriltag - apriltag-ros - find-object-2d - - rtabmap - - rtabmap-ros + # - rtabmap + # - rtabmap-ros + - convex-decomposition + - pcl-ros + - pcl-conversions ## Only limited number of packages to reduce maintainer burden - catkin - ros-control @@ -93,75 +98,72 @@ packages_select_by_deps: - criutils - baldor - rosmon - - rosmon-msgs - catch-ros - rosfmt - - rqt-rosmon - # - desktop - # - amcl - # - map-server - # - move-base - # - gmapping - # - simulators - # - desktop_full - # - moveit-ros-move-group - # - moveit-ros-manipulation - # - moveit - # - robot_localization - # # For jackal - # - gazebo-dev - # - gazebo-ros - # - hector-gazebo-plugins - # - gazebo-ros-control - # - gazebo-plugins - # - lms1xx - # - controller-manager - # - interactive_marker_twist_server - # - diff-drive-controller - # - joint-state-controller - # - joy - # - robot-localization - # - teleop-twist-joy - # - twist-mux - # - pointgrey-camera-description - # - nmea-msgs - # - geometry-msgs - # - nmea-navsat-driver - # - rosserial-server - # - imu-filter-madgwick - # - rosserial-python - # - tf2_web_republisher - # - libfranka - # - franka - # - franka-gripper - # - franka-hw - # - franka-msgs + - desktop + - amcl + - map-server + - move-base + - gmapping + - simulators + - desktop_full + - moveit-ros-move-group + - moveit-ros-manipulation + - moveit + - robot_localization + - gazebo-dev + - gazebo-ros + - hector-gazebo-plugins + - gazebo-ros-control + - gazebo-plugins + - lms1xx + - controller-manager + - interactive_marker_twist_server + - diff-drive-controller + - joint-state-controller + - joy + - robot-localization + - teleop-twist-joy + - twist-mux + - pointgrey-camera-description + - nmea-msgs + - geometry-msgs + - nmea-navsat-driver + - rosserial-server + - imu-filter-madgwick + - rosserial-python + - tf2_web_republisher + - libfranka + - franka + - franka-gripper + - franka-hw + - franka-msgs - franka-description - # - franka-control - # - franka_example_controllers - # - franka_ros - # - combined-robot-hw - # - panda-moveit-config - # - moveit-ros-visualization - # - moveit-ros-planning-interface - # - niryo_one_simulation - # - teb-local-planner - # - turtlebot3 - # - turtlebot3-fake - # - librealsense2 - # - realsense2_camera - # - realsense2-description - # - ur-msgs - # - rosdoc-lite - # - ros_numpy - # - velodyne-description - # - velodyne-simulator - # - effort-controllers - # - velocity-controllers - # - turtlebot3-teleop - # - turtlebot3-simulations - # - slam-toolbox + - franka-control + - franka_example_controllers + - franka_ros + - combined-robot-hw + - panda-moveit-config + - moveit-ros-visualization + - moveit-ros-planning-interface + - niryo_one_simulation + - teb-local-planner + - turtlebot3 + - turtlebot3-fake + - librealsense2 + - realsense2_camera + - realsense2-description + - ur-msgs + - rosdoc-lite + - ros_numpy + - velodyne-description + - velodyne-simulator + - effort-controllers + - velocity-controllers + - turtlebot3-teleop + - turtlebot3-simulations + - slam-toolbox ## PREVIOUSLY SUPPORTED PACKAGES, NOW NOT PACKAGED ANYMORE UNTIL REQUESTED ## TODO AFTER REBUILD diff --git a/vinca_linux_aarch64.yaml b/vinca_linux_aarch64.yaml index 08be0b7dd..40c8a1011 100644 --- a/vinca_linux_aarch64.yaml +++ b/vinca_linux_aarch64.yaml @@ -1,23 +1,23 @@ ros_distro: noetic -mutex_package: ros-distro-mutex 0.3 noetic +mutex_package: ros-distro-mutex 0.4 noetic # mapping for package keys conda_index: - robostack.yaml - packages-ignore.yaml -build_number: 8 +build_number: 9 # Ignore all dependencies of selected packages skip_all_deps: false # If full rebuild, the build number of the existing package has # to match the selected build number for skipping -full_rebuild: false +full_rebuild: true packages_skip_by_deps: - - rviz # - diagnostic_updater + - eigenpy packages_remove_from_deps: - stage-ros @@ -25,6 +25,7 @@ packages_remove_from_deps: skip_existing: - https://conda.anaconda.org/robostack/ + - https://conda.anaconda.org/robostack-staging/ packages_select_by_deps: - rqt-gui @@ -55,20 +56,21 @@ packages_select_by_deps: - urdf-geometry-parser - gps-common - rosbridge_suite - + - pcl-ros + - pcl-conversions # ## Only limited number of packages to reduce maintainer burden - # - desktop - # - amcl - # - map-server - # - move-base - # - gmapping - # - moveit - # - robot_localization - # - perception - # - simulators - # - desktop_full + - desktop + - amcl + - map-server + - move-base + - gmapping + - moveit + - robot_localization + - perception + - simulators + - desktop_full - # # # For jackal + # # # # For jackal # - hector-gazebo-plugins # - gazebo-dev # - gazebo-ros @@ -92,6 +94,9 @@ packages_select_by_deps: # - rosserial-python # - ros_numpy + + + ## PREVIOUSLY SUPPORTED PACKAGES, NOW NOT PACKAGED ANYMORE UNTIL REQUESTED # # after rebuild diff --git a/vinca_osx.yaml b/vinca_osx.yaml index ad63a9453..0beb77ee3 100644 --- a/vinca_osx.yaml +++ b/vinca_osx.yaml @@ -1,23 +1,24 @@ ros_distro: noetic -mutex_package: ros-distro-mutex 0.3 noetic +mutex_package: ros-distro-mutex 0.4 noetic # mapping for package keys conda_index: - robostack.yaml - packages-ignore.yaml -build_number: 16 +build_number: 17 # Ignore all dependencies of selected packages skip_all_deps: false # If full rebuild, the build number of the existing package has # to match the selected build number for skipping -full_rebuild: false +full_rebuild: true packages_skip_by_deps: # - rviz # - diagnostic_updater + - eigenpy packages_remove_from_deps: - stage-ros @@ -25,38 +26,37 @@ packages_remove_from_deps: skip_existing: - https://conda.anaconda.org/robostack/ + - https://conda.anaconda.org/robostack-staging/ packages_select_by_deps: - python-qt-binding - qt-gui - qt-gui-cpp - # - ros-control - # - ros-controllers - # - imu-sensor-controller - # - ackermann-steering-controller + - ros-control + - ros-controllers + - imu-sensor-controller + - ackermann-steering-controller - rqt-gui - - # - velodyne-description - # - effort-controllers - # - velocity-controllers - # - teb-local-planner - # - turtlebot3-teleop - # - force-torque-sensor-controller - # - gripper-action-controller + - rqt-ez-publisher + - pcl-ros + - pcl-conversions + - velodyne-description + - effort-controllers + - velocity-controllers + - teb-local-planner + - turtlebot3-teleop + - force-torque-sensor-controller + - gripper-action-controller - rqt-gui-cpp - rqt-gui-py - # - joint-trajectory-controller - # - velodyne-simulator - # - velodyne-gazebo-plugins - # - catkin + - joint-trajectory-controller + - velodyne-simulator + - velodyne-gazebo-plugins # - mavros-msgs # - mavros # - libmavconn # - mavros-extras # - mavlink - # - cmake-modules - # - bondcpp - # - nodelet - kdl-parser-py - imu-tools - rqt-controller-manager @@ -81,67 +81,67 @@ packages_select_by_deps: # ## Only limited number of packages to reduce maintainer burden - # - catkin - # - rviz - # - desktop - # - desktop_full - # - perception - # - simulators - # - moveit - # - robot_localization - # - amcl - # - map-server - # - move-base - # - gmapping - # - turtlebot3 - # - turtlebot3-simulations + - catkin + - rviz + - desktop + - desktop_full + - perception + - simulators + - moveit + - robot_localization + - amcl + - map-server + - move-base + - gmapping + - turtlebot3 + - turtlebot3-simulations # # # For jackal - # - gazebo-dev - # - gazebo-ros - # - hector-gazebo-plugins - # - gazebo-ros-control - # - gazebo-plugins - # - lms1xx - # - controller-manager - # - interactive_marker_twist_server - # - diff-drive-controller - # - joint-state-controller - # - joy - # - robot-localization - # - teleop-twist-joy - # - twist-mux - # - pointgrey-camera-description - # - nmea-msgs - # - geometry-msgs - # - nmea-navsat-driver - # - rosserial-server - # - imu-filter-madgwick - # - rosserial-python - # - tf2_web_republisher - # - libfranka - # - franka - # - franka-gripper - # - franka-hw - # - franka-msgs - # - franka-description - # - franka-control - # - franka_example_controllers - # - franka_ros - # - combined-robot-hw - # - panda-moveit-config - # - moveit-ros-visualization - # - moveit-ros-planning-interface - # - niryo_one_simulation - # - teb-local-planner - # - turtlebot3 - # - turtlebot3-fake - # - librealsense2 - # - realsense2_camera - # - realsense2-description - # - ur-msgs - # - rosdoc-lite - # - ros_numpy + - gazebo-dev + - gazebo-ros + - hector-gazebo-plugins + - gazebo-ros-control + - gazebo-plugins + - lms1xx + - controller-manager + - interactive_marker_twist_server + - diff-drive-controller + - joint-state-controller + - joy + - robot-localization + - teleop-twist-joy + - twist-mux + - pointgrey-camera-description + - nmea-msgs + - geometry-msgs + - nmea-navsat-driver + - rosserial-server + - imu-filter-madgwick + - rosserial-python + - tf2_web_republisher + - libfranka + - franka + - franka-gripper + - franka-hw + - franka-msgs + - franka-description + - franka-control + - franka_example_controllers + - franka_ros + - combined-robot-hw + - panda-moveit-config + - moveit-ros-visualization + - moveit-ros-planning-interface + - niryo_one_simulation + - teb-local-planner + - turtlebot3 + - turtlebot3-fake + - librealsense2 + - realsense2_camera + - realsense2-description + - ur-msgs + - rosdoc-lite + - ros_numpy ## PREVIOUSLY SUPPORTED PACKAGES, NOW NOT PACKAGED ANYMORE UNTIL REQUESTED ## diff --git a/vinca_osx_arm64.yaml b/vinca_osx_arm64.yaml index e9444ea8c..fea58f58a 100644 --- a/vinca_osx_arm64.yaml +++ b/vinca_osx_arm64.yaml @@ -1,22 +1,23 @@ ros_distro: noetic -mutex_package: ros-distro-mutex 0.3 noetic +mutex_package: ros-distro-mutex 0.4 noetic # mapping for package keys conda_index: - robostack.yaml - packages-ignore.yaml -build_number: 4 +build_number: 5 # Ignore all dependencies of selected packages skip_all_deps: false # If full rebuild, the build number of the existing package has # to match the selected build number for skipping -full_rebuild: false +full_rebuild: true packages_skip_by_deps: - - rviz + # - rviz + - eigenpy packages_remove_from_deps: - stage-ros @@ -26,6 +27,7 @@ packages_remove_from_deps: skip_existing: - https://conda.anaconda.org/robostack/ + - https://conda.anaconda.org/robostack-staging/ # - /Users/fischert/mambaforge/conda-bld packages_select_by_deps: @@ -38,24 +40,21 @@ packages_select_by_deps: - rqt-gui-py - rqt-gui-cpp - qt-gui-cpp - # - roslisp - # - catkin - # - cmake-modules - # - bondcpp - # - nodelet + - rqt-ez-publisher + - pcl-ros + - pcl-conversions + - roslisp # - qt-gui-cpp # needs manual build - # - catkin - # - robot # - rviz # needs manual build - # - desktop - # - perception - # - moveit + - desktop + - perception + - moveit # - eigenpy # needs manual build - # - turtlebot3 - # - turtlebot3-simulations - # - desktop-full - # - realsense2_camera - # - realsense2_description + - turtlebot3 + - turtlebot3-simulations + - desktop-full + - realsense2_camera + - realsense2_description - kdl-parser-py - imu-tools - rqt-controller-manager @@ -80,34 +79,35 @@ packages_select_by_deps: # # For jackal - # - gazebo-dev - # - hector-gazebo-plugins - # - gazebo-ros - # - gazebo-ros-control - # - gazebo-plugins - # - lms1xx - # - controller-manager - # - interactive_marker_twist_server - # - diff-drive-controller - # - joint-state-controller - # - joy - # - robot-localization - # - teleop-twist-joy - # - twist-mux - # - pointgrey-camera-description - # - nmea-msgs - # - geometry-msgs - # - nmea-navsat-driver - # - rosserial-server - # - imu-filter-madgwick - # - rosserial-python - # - gmapping - # - velodyne-description - # - velodyne-simulator - # - effort-controllers - # - velocity-controllers - # - teb-local-planner - # - slam-toolbox - # - turtlebot3-teleop + - gazebo-dev + - hector-gazebo-plugins + - gazebo-ros + - gazebo-ros-control + - gazebo-plugins + - lms1xx + - controller-manager + - interactive_marker_twist_server + - diff-drive-controller + - joint-state-controller + - joy + - robot-localization + - teleop-twist-joy + - twist-mux + - pointgrey-camera-description + - nmea-msgs + - geometry-msgs + - nmea-navsat-driver + - rosserial-server + - imu-filter-madgwick + - rosserial-python + - gmapping + - velodyne-description + - velodyne-simulator + - effort-controllers + - velocity-controllers + - teb-local-planner + - slam-toolbox + - turtlebot3-teleop + - move-base patch_dir: patch diff --git a/vinca_win.yaml b/vinca_win.yaml index 614121c4e..81e2adb97 100644 --- a/vinca_win.yaml +++ b/vinca_win.yaml @@ -1,23 +1,24 @@ ros_distro: noetic -mutex_package: ros-distro-mutex 0.3 noetic +mutex_package: ros-distro-mutex 0.4 noetic # mapping for package keys conda_index: - robostack.yaml - packages-ignore.yaml -build_number: 12 +build_number: 13 # Ignore all dependencies of selected packages skip_all_deps: false # If full rebuild, the build number of the existing package has # to match the selected build number for skipping -full_rebuild: false +full_rebuild: true packages_skip_by_deps: - - rviz + # - rviz # - diagnostic_updater + - eigenpy packages_remove_from_deps: # see https://github.com/RoboStack/ros-noetic/issues/25 @@ -27,6 +28,7 @@ packages_remove_from_deps: skip_existing: - https://conda.anaconda.org/robostack/ + - https://conda.anaconda.org/robostack-staging/ packages_select_by_deps: - rqt-gui @@ -35,16 +37,16 @@ packages_select_by_deps: - perception_pcl - rosbridge_suite ## Only limited number of packages to reduce maintainer burden - # - desktop - # - rviz - # - robot_localization - # - amcl - # - map-server - # - move-base - # - gmapping - # - fcl - # - desktop_full - # - moveit + - desktop + - rviz + - robot_localization + - amcl + - map-server + - move-base + - gmapping + - fcl + - desktop_full + - moveit - kdl-parser-py - imu-tools - rqt-controller-manager @@ -71,8 +73,9 @@ packages_select_by_deps: - tf2_sensor_msgs - tf2_tools - gps-common - - + - pcl-ros + - pcl-conversions + # # For jackal # - gazebo-dev # - gazebo-ros