Skip to content

Commit

Permalink
Remove FindPythonModule (#3736)
Browse files Browse the repository at this point in the history
This CMake module is not actually needed. Follow-up to #3656 (comment).
  • Loading branch information
kodiakhq[bot] authored May 27, 2020
2 parents 0b7394a + 31ffa70 commit 1faa7c0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 32 deletions.
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(FeatureSummary)
include(GNUInstallDirs)
project(ESPResSo)
include(FindPythonModule)
include(option_enum)
include(option_if_available)
if(POLICY CMP0074)
Expand Down Expand Up @@ -197,8 +196,6 @@ if(WITH_HDF5)
if(HDF5_FOUND)
if(HDF5_IS_PARALLEL)
set(H5MD 1)
include(FindPythonModule)
find_python_module(h5py)
add_feature_info(HDF5 ON "parallel")
else()
unset(H5MD)
Expand Down
24 changes: 0 additions & 24 deletions cmake/FindPythonModule.cmake

This file was deleted.

5 changes: 1 addition & 4 deletions testsuite/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,7 @@ python_test(FILE elc.py MAX_NUM_PROC 2)
python_test(FILE elc_vs_analytic.py MAX_NUM_PROC 2)
python_test(FILE rotation.py MAX_NUM_PROC 1)
python_test(FILE shapes.py MAX_NUM_PROC 1)

if(PY_H5PY)
python_test(FILE h5md.py MAX_NUM_PROC 2)
endif(PY_H5PY)
python_test(FILE h5md.py MAX_NUM_PROC 2)

add_custom_target(
python_test_data
Expand Down
10 changes: 9 additions & 1 deletion testsuite/python/h5md.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@
import unittest_decorators as utx
import numpy as np
import espressomd
import h5py # h5py has to be imported *after* espressomd (MPI)
from espressomd.interactions import Virtual
try:
import h5py # h5py has to be imported *after* espressomd (MPI)
skipIfMissingPythonPackage = ut.case._id
except ImportError:
skipIfMissingPythonPackage = ut.skip(
"Python module h5py not available, skipping test!")


npart = 26

Expand Down Expand Up @@ -121,6 +127,7 @@ def test_bonds(self):


@utx.skipIfMissingFeatures(['H5MD'])
@skipIfMissingPythonPackage
class H5mdTestOrdered(CommonTests):

"""
Expand Down Expand Up @@ -161,6 +168,7 @@ def test_ids(self):


@utx.skipIfMissingFeatures(['H5MD'])
@skipIfMissingPythonPackage
class H5mdTestUnordered(CommonTests):

"""
Expand Down

0 comments on commit 1faa7c0

Please sign in to comment.