diff --git a/CMakeLists.txt b/CMakeLists.txt index 4cffaee..3a3a20c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,9 +80,9 @@ if (BUILD_PYTHON) endif () if (WIN32) - set (OTTEMPLATE_PYTHON_MODULE_PATH Lib/site-packages CACHE PATH "site-packages dir") + set (OTTEMPLATE_PYTHON_MODULE_PATH Lib/site-packages CACHE STRING "site-packages dir") else () - set (OTTEMPLATE_PYTHON_MODULE_PATH ${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages CACHE PATH "site-packages dir") + set (OTTEMPLATE_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/distro/debian/rules b/distro/debian/rules index 875e54f..3116c7d 100644 --- a/distro/debian/rules +++ b/distro/debian/rules @@ -7,19 +7,17 @@ CXXFLAGS+=$(CPPFLAGS) DPKG_EXPORT_BUILDFLAGS = 1 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) -PY3VER = $(shell py3versions -d) - %: dh $@ --buildsystem=cmake --with python3 override_dh_auto_configure: dh_auto_configure -Bbuild -- \ - -DUSE_SPHINX=OFF \ -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \ -DCMAKE_INSTALL_PREFIX:PATH=/usr \ - -DCMAKE_INSTALL_LIBDIR:PATH="lib/$(DEB_HOST_MULTIARCH)" \ + -DCMAKE_INSTALL_LIBDIR:PATH=lib/$(DEB_HOST_MULTIARCH) \ -DINSTALL_DESTDIR:PATH=$(CURDIR)/debian/ottemplate \ - -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=32 + -DOTTEMPLATE_PYTHON_MODULE_PATH=lib/python3/dist-packages \ + -DCMAKE_UNITY_BUILD=ON override_dh_auto_build: $(MAKE) -C build -j4 diff --git a/distro/rpm/ottemplate.spec b/distro/rpm/ottemplate.spec index 2387a5c..9d451e3 100644 --- a/distro/rpm/ottemplate.spec +++ b/distro/rpm/ottemplate.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: ottemplate Version: 0.0 @@ -65,8 +59,7 @@ Python textual interface to OTTemplate uncertainty library %build %cmake -DINSTALL_DESTDIR:PATH=%{buildroot} \ -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \ - -DCMAKE_UNITY_BUILD=ON \ - -DUSE_SPHINX=OFF . + -DCMAKE_UNITY_BUILD=ON . make %{?_smp_mflags} %install