Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: drop possible use of PyROOT #1254

Merged
merged 3 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/runPythonChecks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source /cvmfs/sft.cern.ch/lcg/views/${VIEW}/setup.sh
cd /Package

echo "RUNNING FLAKE8 CHECK" && \
find . -name "*.py" -and -not -name 'ddsix.py' -exec flake8 {} +
find . -name "*.py" -exec flake8 {} +
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
release-platform: ${{ matrix.LCG }}
run: |
echo "RUNNING FLAKE8 CHECK"
find . -name "*.py" -and -not -name 'ddsix.py' -exec flake8 {} +
find . -name "*.py" -exec flake8 {} +
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Python:
script:
- source /cvmfs/sft.cern.ch/lcg/views/LCG_102/x86_64-centos7-gcc11-opt/setup.sh
- echo "RUNNING FLAKE8 CHECK"
- find . -name "*.py" -and -not -name 'ddsix.py' -exec flake8 {} +
- find . -name "*.py" -exec flake8 {} +



Expand Down
4 changes: 2 additions & 2 deletions DDCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ ELSE()
ENDIF()

#--------------------------- Specialized PYTHON plugin ----------------------------
IF(TARGET ${DD4HEP_ROOT_PYTHON})
IF(TARGET ROOT::ROOTTPython)
dd4hep_add_plugin(DDPythonPlugins
SOURCES src/python/*.cpp
USES DDCore ROOT::Core ${DD4HEP_ROOT_PYTHON}
USES DDCore ROOT::Core ROOT::ROOTTPython
)
set_target_properties(DDPythonPlugins PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION})
LIST(APPEND OPTIONAL_TARGETS DDPythonPlugins)
Expand Down
5 changes: 2 additions & 3 deletions DDCore/python/dd4hepFactories.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
import optparse
import logging
import errno
from ddsix.moves import input
from io import open
import io

logger = logging.getLogger(__name__)

Expand All @@ -43,7 +42,7 @@ def scanPath(self):

def readComponents(self, fname):
logger.info('+== Search component file: ' + fname)
file = open(fname, "r")
file = io.open(fname, "r")
lines = file.readlines()
dirname = os.path.dirname(fname)
for line in lines:
Expand Down
5 changes: 2 additions & 3 deletions DDCore/python/dd4hep_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,9 @@ def unicode_2_string(value):

:return: always a str
"""
import ddsix as six
if isinstance(value, (bool, float, six.integer_types)):
if isinstance(value, (bool, float, int)):
value = value
elif isinstance(value, six.string_types):
elif isinstance(value, str):
value = str(value)
elif isinstance(value, bytes):
value = value.decode()
Expand Down
Loading
Loading