What does "make show=CONFIGURE_ARGS" say?
If that has python3.8, you have something out of date in your ports tree or
other directory in PORTSDIR_PATH.
--
Sent from a phone, apologies for poor formatting.
On 24 May 2022 19:00:09 j...@bitminer.ca wrote:
Hi ports,
I'm trying to build a "simple" c++ code with a python binding. It uses
pybind11 to create the binding.
But CMake finds (defaults to) python3.8 not python 3.9.12. Except
it's not there (pkg_delete python-3.8.13p0).
CMakeCache.txt includes this fragment:
//No help, variable specified on the command line.
PYTHON_EXECUTABLE:UNINITIALIZED=/usr/local/bin/python3.8
Why is this happening?
Note this is on 7.1-release not -current.
/usr/ports/ is correctly setup with CVS to -r 7_1_RELEASE
I have tried setting MODPY_VERSION = ${MODPY_DEFAULT_VERSION}
but that is rejected with
Fatal: unknown or unsupported MODPY_VERSION: (in math/hdbscan)
I have tried various other attempts to force python3.9,
including changing the above PYTHON_EXECUTABLE for cmake
with a line for CONFIGURE_ARGS.
(Ultimately the issue is python3.8 has nothing in site-
packages while 3.9 has all relevant site-packages. But
cmake, or ports infrastructure, looks in the wrong place.)
Here is the Makefile, any hints gratefully appreciated:
COMMENT = C++ fast parallel algorithm for clustering
V = 0.1.0
DISTNAME = hdbscan-$V
##SHARED_LIBS += hdbscan 0.0
CATEGORIES = math devel
GH_ACCOUNT = wangyiqiu
GH_PROJECT = hdbscan
GH_COMMIT = 0f21522a4d34db040dd0cd6c6506ad39ed6f2a9e
# MIT
PERMIT_PACKAGE = Yes
FULLPKGNAME = hdbscan-$V
WANTLIB = ${COMPILER_LIBCXX} m
# c++17
COMPILER = base-clang ports-gcc
MODULES = devel/cmake \
lang/python
FLAVORS = python3
FLAVOR = python3
BUILD_DEPENDS = devel/py-pybind11${MODPY_FLAVOR} \
math/parlaylib
## -DCMAKE_LIBRARY_PATH="${WRKBUILD}/lib:${CMAKE_LIBRARY_PATH} \
CONFIGURE_ARGS += -DCMAKE_CXX_FLAGS_RELEASE=-I${LOCALBASE}/include
\
-DCMAKE_EXE_LINKER_FLAGS_RELEASE=-L${LOCALBASE}/lib \
-DPYTHON_EXECUTABLE=python3 \
-DCMAKE_PREFIX_PATH=${MODPY_SITEPKG}/pybind11/share/cmake/}:${CMAKE_PREFIX_PATH}
##
-Dpybind11_DIR=${MODPY_SITEPKG}/pybind11/share/cmake/pybind11/
NO_TEST = Yes
post-extract:
rm ${WRKSRC}/pybindings/pybind11
rm ${WRKSRC}/pybindings/requirements.txt
.include <bsd.port.mk>