science/py-pygmo2: Update 2.16.1 -> 2.18.0

Also
* fix using wrong python version by patching the CMakeLists.txt
* add comment about the test target.

Reported by:	portscout

science/py-pygmo2: Add patch to fix python version
This commit is contained in:
Yuri Victorovich 2021-08-05 00:17:25 -07:00
parent 16c1136158
commit 9fa053ecfc
4 changed files with 20 additions and 7 deletions

View File

@ -1,7 +1,6 @@
PORTNAME= pygmo2
DISTVERSIONPREFIX= v
DISTVERSION= 2.16.1
PORTREVISION= 2
DISTVERSION= 2.18.0
CATEGORIES= science graphics
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@ -28,10 +27,11 @@ USE_GITHUB= yes
GH_ACCOUNT= esa
CMAKE_ON= PYGMO_ENABLE_IPO
CMAKE_ARGS= -DFREEBSD_PYTHON_DISTVERSION=${PYTHON_DISTVERSION}
CXXFLAGS+= -I${LOCALBASE}/include/coin # see https://github.com/esa/pygmo2/issues/58
do-test: # requires to have the package installed; test taken from azure-pipelines.yml
do-test: install # tests require sysctl sudo sysctl kern.threads.max_threads_per_proc variable to be at least 15000 ; test taken from azure-pipelines.yml
@${PYTHON_CMD} -c "import pygmo; pygmo.test.run_test_suite(1); pygmo.mp_island.shutdown_pool(); pygmo.mp_bfe.shutdown_pool()"
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1608698367
SHA256 (esa-pygmo2-v2.16.1_GH0.tar.gz) = 54d4fa99e4bff539fca67dfcdc909499fd3f1a3186f7c7fc8200f19512954166
SIZE (esa-pygmo2-v2.16.1_GH0.tar.gz) = 3027274
TIMESTAMP = 1628134231
SHA256 (esa-pygmo2-v2.18.0_GH0.tar.gz) = 9f081cc973297894af09f713f889870ac452bfb32b471f9f7ba08a5e0bb9a125
SIZE (esa-pygmo2-v2.18.0_GH0.tar.gz) = 3021797

View File

@ -0,0 +1,13 @@
- Fix the python version to one used by the port.
--- CMakeLists.txt.orig 2021-08-05 03:52:20 UTC
+++ CMakeLists.txt
@@ -137,7 +137,7 @@ if(${pagmo_VERSION} VERSION_LESS ${_PYGMO_MIN_PAGMO_VE
endif()
# python.
-find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
+find_package(Python3 ${FREEBSD_PYTHON_DISTVERSION} EXACT REQUIRED COMPONENTS Interpreter Development)
message(STATUS "Python3 interpreter: ${Python3_EXECUTABLE}")
message(STATUS "Python3 installation directory: ${Python3_SITEARCH}")
set(PYGMO_INSTALL_PATH "" CACHE STRING "pygmo module installation path")

View File

@ -21,6 +21,6 @@
%%PYTHON_SITELIBDIR%%/pygmo/_s_policy_test.py
%%PYTHON_SITELIBDIR%%/pygmo/_topology_test.py
%%PYTHON_SITELIBDIR%%/pygmo/_version.py
%%PYTHON_SITELIBDIR%%/pygmo/core.so
%%PYTHON_SITELIBDIR%%/pygmo/core%%PYTHON_EXT_SUFFIX%%.so
%%PYTHON_SITELIBDIR%%/pygmo/plotting/__init__.py
%%PYTHON_SITELIBDIR%%/pygmo/test.py