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

Remove FindPythonModule #3736

Merged
merged 2 commits into from
May 27, 2020
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
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