Skip to content

Commit

Permalink
Update Linux packages
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Oct 23, 2024
1 parent 73ec2ce commit fe7a41e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 17 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down
2 changes: 1 addition & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= 0.18 release (wip)
= 0.18 release (2024-10-23)

* Add GetValidCovarianceModels

Expand Down
8 changes: 4 additions & 4 deletions distro/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 2 additions & 8 deletions distro/rpm/otmixmod.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions python/src/MixtureFactory.i
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fe7a41e

Please sign in to comment.