Skip to content

Commit

Permalink
science/py-pygmo2: Update 2.16.1 -> 2.18.0
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yurivict committed Aug 5, 2021
1 parent 16c1136 commit 9fa053e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
6 changes: 3 additions & 3 deletions science/py-pygmo2/Makefile
@@ -1,7 +1,6 @@
PORTNAME= pygmo2
DISTVERSIONPREFIX= v
DISTVERSION= 2.16.1
PORTREVISION= 2
DISTVERSION= 2.18.0
CATEGORIES= science graphics
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

Expand All @@ -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>
6 changes: 3 additions & 3 deletions science/py-pygmo2/distinfo
@@ -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
13 changes: 13 additions & 0 deletions science/py-pygmo2/files/patch-CMakeLists.txt
@@ -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")
2 changes: 1 addition & 1 deletion science/py-pygmo2/pkg-plist
Expand Up @@ -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

0 comments on commit 9fa053e

Please sign in to comment.