diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a6c083..cb46a73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,9 +82,9 @@ if (BUILD_PYTHON) endif () if (WIN32) - set (OTMIXMOD_PYTHON_MODULE_PATH Lib/site-packages CACHE PATH "site-packages dir") + set (OTMIXMOD_PYTHON_MODULE_PATH Lib/site-packages CACHE STRING "site-packages dir") else () - set (OTMIXMOD_PYTHON_MODULE_PATH ${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages CACHE PATH "site-packages dir") + set (OTMIXMOD_PYTHON_MODULE_PATH ${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages CACHE STRING "site-packages dir") endif () endif () endif () diff --git a/ChangeLog b/ChangeLog index bcfad49..366f38f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -= 0.18 release (wip) += 0.18 release (2024-10-23) * Add GetValidCovarianceModels diff --git a/distro/debian/rules b/distro/debian/rules index f9d6a98..2787180 100644 --- a/distro/debian/rules +++ b/distro/debian/rules @@ -14,12 +14,12 @@ PY3VER = $(shell py3versions -d) override_dh_auto_configure: dh_auto_configure -Bbuild -- \ - -DBUILD_DOC=OFF \ -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \ -DCMAKE_INSTALL_PREFIX:PATH=/usr \ - -DCMAKE_INSTALL_LIBDIR:PATH="lib/$(DEB_HOST_MULTIARCH)" \ - -DINSTALL_DESTDIR:PATH=$(CURDIR)/debian/otmixmod \ - -DPYTHON_SITE_PACKAGES:PATH="lib/$(PY3VER)/site-packages" + -DCMAKE_INSTALL_LIBDIR:PATH=lib/$(DEB_HOST_MULTIARCH) \ + -DINSTALL_DESTDIR:PATH=$(CURDIR)/debian/ottemplate \ + -DOTMIXMOD_PYTHON_MODULE_PATH=lib/python3/dist-packages \ + -DCMAKE_UNITY_BUILD=ON override_dh_auto_build: $(MAKE) -C build -j4 diff --git a/distro/rpm/otmixmod.spec b/distro/rpm/otmixmod.spec index 92a8fe9..faa8781 100644 --- a/distro/rpm/otmixmod.spec +++ b/distro/rpm/otmixmod.spec @@ -7,17 +7,11 @@ %endif %define __cmake %{_bindir}/cmake -%define _cmake_lib_suffix64 -DLIB_SUFFIX=64 %define cmake \ CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ -%__cmake \\\ --DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\ -%if "%{?_lib}" == "lib64" \ -%{?_cmake_lib_suffix64} \\\ -%endif \ --DBUILD_SHARED_LIBS:BOOL=ON +%__cmake -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} Name: otmixmod Version: 0.18 @@ -66,7 +60,7 @@ Python textual interface to otmixmod uncertainty library %build %cmake -DINSTALL_DESTDIR:PATH=%{buildroot} \ -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \ - -DBUILD_DOC=OFF . + -DCMAKE_UNITY_BUILD=ON . make %{?_smp_mflags} %install diff --git a/python/src/MixtureFactory.i b/python/src/MixtureFactory.i index 5ee5d6d..7cf59ce 100644 --- a/python/src/MixtureFactory.i +++ b/python/src/MixtureFactory.i @@ -2,8 +2,8 @@ // do not pass argument by reference, return it as tuple item %typemap(in, numinputs=0) (OT::Indices & labels, OT::Point & BICLogLikelihood) ($*1_ltype temp1,$*2_ltype temp2) %{ temp1 = OT::Indices(); $1 = &temp1; temp2=OT::Point(); $2=&temp2; %} -%typemap(argout) (OT::Indices & labels, OT::Point & BICLogLikelihood) %{ $result = SWIG_Python_AppendOutput($result, SWIG_NewPointerObj(new OT::Indices(*$1), SWIG_TypeQuery("OT::Indices *"), SWIG_POINTER_OWN | 0 )); -$result= SWIG_Python_AppendOutput($result, SWIG_NewPointerObj(new OT::Point(*$2), SWIG_TypeQuery("OT::Point *"), SWIG_POINTER_OWN | 0 )); %} +%typemap(argout) (OT::Indices & labels, OT::Point & BICLogLikelihood) %{ $result = OT::AppendOutput($result, SWIG_NewPointerObj(new OT::Indices(*$1), SWIG_TypeQuery("OT::Indices *"), SWIG_POINTER_OWN)); +$result = OT::AppendOutput($result, SWIG_NewPointerObj(new OT::Point(*$2), SWIG_TypeQuery("OT::Point *"), SWIG_POINTER_OWN)); %} OT::Mixture OTMIXMOD::MixtureFactory::buildAsMixture(const OT::Sample & sample, OT::Indices & labels, OT::Point & BICLogLikelihood) const; OT::Implementation OTMIXMOD::MixtureFactory::build(const OT::Sample & sample, OT::Indices & labels, OT::Point & BICLogLikelihood) const; %ignore OTMIXMOD::MixtureFactory::buildAsMixture(const OT::Sample & sample) const;