From 73af81fb45839c6e04a1d852e6bf0c844fc52020 Mon Sep 17 00:00:00 2001 From: Francesco Biscani Date: Fri, 13 Dec 2019 16:28:31 +0100 Subject: [PATCH 1/3] Update the usage of the write_basic_package_version_file() CMake function to be consistent with pagmo's API/ABI guarantees. --- CMakeLists.txt | 11 +++++++++-- pygmo/CMakeLists.txt | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fed866de6..aae43f806 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -427,8 +427,15 @@ if(PAGMO_BUILD_PAGMO) install(EXPORT pagmo_export NAMESPACE Pagmo:: DESTINATION lib/cmake/pagmo) # Take care of versioning. include(CMakePackageConfigHelpers) - write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/pagmo-config-version.cmake" VERSION ${pagmo_VERSION} - COMPATIBILITY ExactVersion) + # NOTE: SameMinorVersion available only + # since CMake 3.11. + if(${CMAKE_VERSION} VERSION_LESS "3.11.0") + write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/pagmo-config-version.cmake" VERSION ${pagmo_VERSION} + COMPATIBILITY SameMinorVersion) + else() + write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/pagmo-config-version.cmake" VERSION ${pagmo_VERSION} + COMPATIBILITY SameMajorVersion) + endif() install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pagmo-config-version.cmake" DESTINATION "lib/cmake/pagmo") endif() diff --git a/pygmo/CMakeLists.txt b/pygmo/CMakeLists.txt index 6515d3f0f..688468f0a 100644 --- a/pygmo/CMakeLists.txt +++ b/pygmo/CMakeLists.txt @@ -35,8 +35,15 @@ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../cmake_modules/FindNumPy.cmake" "${ "${CMAKE_CURRENT_SOURCE_DIR}/../cmake_modules/yacma/YACMAPythonSetup.cmake" DESTINATION "lib/cmake/pygmo") # Take care of versioning. include(CMakePackageConfigHelpers) -write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/pygmo-config-version.cmake" VERSION ${pygmo_VERSION} - COMPATIBILITY ExactVersion) +# NOTE: SameMinorVersion available only +# since CMake 3.11. +if(${CMAKE_VERSION} VERSION_LESS "3.11.0") + write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/pygmo-config-version.cmake" VERSION ${pygmo_VERSION} + COMPATIBILITY SameMajorVersion) +else() + write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/pygmo-config-version.cmake" VERSION ${pygmo_VERSION} + COMPATIBILITY SameMinorVersion) +endif() install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pygmo-config-version.cmake" DESTINATION "lib/cmake/pygmo") install(TARGETS pygmo EXPORT pygmo_export) install(EXPORT pygmo_export NAMESPACE Pygmo:: DESTINATION lib/cmake/pygmo) From 0107c36403a1e3f1d041c6d55962ab4f9e10cefb Mon Sep 17 00:00:00 2001 From: Francesco Biscani Date: Fri, 13 Dec 2019 16:39:25 +0100 Subject: [PATCH 2/3] Small doc updates. --- doc/sphinx/install.rst | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/doc/sphinx/install.rst b/doc/sphinx/install.rst index 06d0b5c41..ee1cdd2ee 100644 --- a/doc/sphinx/install.rst +++ b/doc/sphinx/install.rst @@ -129,13 +129,20 @@ Conda pagmo is available via the `conda `__ package manager for Linux, OSX and Windows thanks to the infrastructure provided by `conda-forge `__. +Two packages are available: + +* `pagmo `__, which contains the pagmo shared library, +* `pagmo-devel `__, + which contains the pagmo headers and the + CMake support files. + In order to install pagmo via conda, you just need to add ``conda-forge`` to the channels, and then we can immediately install pagmo: .. code-block:: console $ conda config --add channels conda-forge - $ conda install pagmo + $ conda install pagmo pagmo-devel The conda packages for pagmo are maintained by the core development team, and they are regularly updated when new pagmo versions are released. @@ -343,6 +350,18 @@ and they are regularly updated when new pygmo versions are released. We provide pip packages for Linux and Windows (both Python 2.7 and 3.x), but **not** for OSX. +.. warning:: + + It has been reported that the pip packages for Windows + exhibit erratic behaviour (sometimes leading to crashes) + when certain algorithms are used. These issues stem + from incompatibilities between the compiler currently + in use for the production of the pip packages on Windows + (MinGW) and the compiler used to compile Python itself (MSVC). + We are trying to determine if and how these issues can be + resolved. For the time being, users are encouraged to use + the conda packages on Windows instead of the pip packages. + Arch Linux """""""""" From f9d148d7c57144689e9446cb90bb7a0aa0e256dd Mon Sep 17 00:00:00 2001 From: Francesco Biscani Date: Fri, 13 Dec 2019 16:40:58 +0100 Subject: [PATCH 3/3] Brainfart. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aae43f806..0ed1011d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -431,10 +431,10 @@ if(PAGMO_BUILD_PAGMO) # since CMake 3.11. if(${CMAKE_VERSION} VERSION_LESS "3.11.0") write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/pagmo-config-version.cmake" VERSION ${pagmo_VERSION} - COMPATIBILITY SameMinorVersion) + COMPATIBILITY SameMajorVersion) else() write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/pagmo-config-version.cmake" VERSION ${pagmo_VERSION} - COMPATIBILITY SameMajorVersion) + COMPATIBILITY SameMinorVersion) endif() install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pagmo-config-version.cmake" DESTINATION "lib/cmake/pagmo") endif()