From 571c3ba34ad5eeae1bf39433543e7c50a51de22f Mon Sep 17 00:00:00 2001 From: Vanya Belyaev Date: Sat, 7 Sep 2024 16:20:49 +0200 Subject: [PATCH] update --- ostap/CMakeLists.txt | 8 +++++--- ostap/core/__init__.py | 12 ++++++++++++ ostap/core/ostap_types.py | 4 ++-- ostap/fitting/__init__.py | 9 +++++++-- ostap/fixes/fixes.py | 2 +- ostap/histos/__init__.py | 5 ----- ostap/math/__init__.py | 8 +++++++- source/CMakeROOT_6_23.cmake | 12 +++++++----- 8 files changed, 41 insertions(+), 19 deletions(-) diff --git a/ostap/CMakeLists.txt b/ostap/CMakeLists.txt index 7a639765..2266d31f 100644 --- a/ostap/CMakeLists.txt +++ b/ostap/CMakeLists.txt @@ -339,7 +339,7 @@ foreach(filename ${files}) endforeach() # ======================================================================================== -## additimal tests +## additiomal tests # ======================================================================================== file(GLOB allfiles "${CMAKE_INSTALL_PREFIX}/${OSTAP_PYTHON_SITE_LOCAL}/ostap/*/*.py") list(SORT allfiles) @@ -383,8 +383,10 @@ add_test (NAME ostap.dependencies WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/Testing/ install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - DESTINATION . - FILES_MATCHING PATTERN "*.py" + DESTINATION . + FILES_MATCHING + COMPONENT python + PATTERN "*.py" PATTERN "*.#*" EXCLUDE ) ## nosetests -w ../ostap/tools --exe --processes=16 --process-timeout=2000 -I '.*chopping.*' diff --git a/ostap/core/__init__.py b/ostap/core/__init__.py index e69de29b..a4e4c736 100755 --- a/ostap/core/__init__.py +++ b/ostap/core/__init__.py @@ -0,0 +1,12 @@ +#!/usr/env python +# -*- coding: utf-8 -*- +# ============================================================================= +import sys, os +if sys.warnoptions or os.environ.get ( 'OSTAP_CMAKE_TEST', False ) : + import warnings + with warnings.catch_warnings(): + warnings.simplefilter ( "always" ) + import cppyy +# ============================================================================= +## The END +# ============================================================================= diff --git a/ostap/core/ostap_types.py b/ostap/core/ostap_types.py index 3c3d8eef..cbad38f2 100644 --- a/ostap/core/ostap_types.py +++ b/ostap/core/ostap_types.py @@ -43,8 +43,8 @@ 'all_strings' , ## all argumets of string types? ) # ============================================================================= -import math, os, array, cppyy -from sys import version_info as python_version +import sys, os, math, array, cppyy +from sys import version_info as python_version # ============================================================================= # logging # ============================================================================= diff --git a/ostap/fitting/__init__.py b/ostap/fitting/__init__.py index 38ec0a30..be6ce727 100755 --- a/ostap/fitting/__init__.py +++ b/ostap/fitting/__init__.py @@ -1,9 +1,14 @@ #!/usr/env python # -*- coding: utf-8 -*- # ============================================================================= +import sys, os +if sys.warnoptions or os.environ.get ( 'OSTAP_CMAKE_TEST', False ) : + import warnings + with warnings.catch_warnings(): + warnings.simplefilter ( "always" ) + import cppyy +# ============================================================================= import ostap.fitting.rooreduce - - # ============================================================================= ## The END # ============================================================================= diff --git a/ostap/fixes/fixes.py b/ostap/fixes/fixes.py index 1e65f28f..5806c989 100755 --- a/ostap/fixes/fixes.py +++ b/ostap/fixes/fixes.py @@ -6,7 +6,7 @@ # @author Vanya BELYAEV Ivan.Belyaev@itep.ru # @date 2016-02-23 # ============================================================================= -"""Couple of minor fixes for Ostap +""" Couple of minor fixes for Ostap """ # ============================================================================= __version__ = '$Revision$' diff --git a/ostap/histos/__init__.py b/ostap/histos/__init__.py index 1a4d4eb5..dd718c06 100755 --- a/ostap/histos/__init__.py +++ b/ostap/histos/__init__.py @@ -3,11 +3,6 @@ # ============================================================================= from ostap.core.core import VE import ostap.histos.graph_reduce -## import ostap.histos.histos -## import ostap.histos.graphs -## import ostap.histos.param -## import ostap.histos.compare - # ============================================================================= ## The END # ============================================================================= diff --git a/ostap/math/__init__.py b/ostap/math/__init__.py index 4a02e739..2841a53b 100755 --- a/ostap/math/__init__.py +++ b/ostap/math/__init__.py @@ -1,8 +1,14 @@ #!/usr/env python # -*- coding: utf-8 -*- # ============================================================================= +import sys, os +if sys.warnoptions or os.environ.get ( 'OSTAP_CMAKE_TEST', False ) : + import warnings + with warnings.catch_warnings(): + warnings.simplefilter ( "always" ) + import cppyy +# ============================================================================= import ostap.math.reduce - # ============================================================================= ## The END # ============================================================================= diff --git a/source/CMakeROOT_6_23.cmake b/source/CMakeROOT_6_23.cmake index 998e53d8..b2009f92 100644 --- a/source/CMakeROOT_6_23.cmake +++ b/source/CMakeROOT_6_23.cmake @@ -251,19 +251,21 @@ install ( TARGETS ostap EXPORT ostap-export LIBRARY DESTINATION lib INCLUDES DESTINATION include ) -install ( TARGETS ostapDict LIBRARY DESTINATION lib ) +install ( TARGETS ostapDict LIBRARY DESTINATION lib COMPONENT libraries ) install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/Ostap DESTINATION include FILES_MATCHING + COMPONENT headers PATTERN "*.h" PATTERN "*.hpp" PATTERN "*.icpp" PATTERN "*#*" EXCLUDE ) -install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/Ostap/Config.h DESTINATION include/Ostap ) -install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/ostap_rdict.pcm DESTINATION lib ) -install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/ostapDict.rootmap DESTINATION lib ) -install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/build.config DESTINATION lib ) + +install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/Ostap/Config.h DESTINATION include/Ostap COMPONENT headers ) +install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/ostap_rdict.pcm DESTINATION lib COMPONENT libraries ) +install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/ostapDict.rootmap DESTINATION lib COMPONENT libraries ) +install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/build.config DESTINATION lib COMPONENT libraroes ) install(EXPORT ostap-export FILE OstapTargets.cmake