diff options
author | CoprDistGit <infra@openeuler.org> | 2024-12-15 11:11:37 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-12-15 11:11:37 +0000 |
commit | dab4e3c4f07d2007872b59985a47ed95e39a3567 (patch) | |
tree | 6139238a179e88501a471a0df948d77b176727c4 | |
parent | ea7f5b1c63acf799d7de8064dc562f34867ca400 (diff) |
automatic import of lammps
-rw-r--r-- | lammps.spec | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lammps.spec b/lammps.spec index 8410d8b..1be4bc4 100644 --- a/lammps.spec +++ b/lammps.spec @@ -174,17 +174,16 @@ BuildRequires: python3-build cp %{SOURCE5} cmake/ %build -cd cmake set +e . /etc/profile.d/modules.sh set -e - +mkdir build && cd build for mpi in '' mpich %{?with_openmpi:openmpi} ; do test -n "${mpi}" && module load mpi/${mpi}-%{_arch} #python wrapper isn't mpi specific - %cmake . \ - -C ./presets/all_on.cmake \ - -C ./presets/nolib.cmake \ + %cmake3 ../cmake \ + -C ../cmake/presets/all_on.cmake \ + -C ../cmake/presets/nolib.cmake \ %{cmake_blas_flags} \ -DCMAKE_TUNE_FLAGS='' \ -DCMAKE_CUSTOM_LINKER="default" \ @@ -219,20 +218,19 @@ cd ../python %py3_build %install -cd cmake set +e . /etc/profile.d/modules.sh set -e for mpi in '' mpich %{?with_openmpi:openmpi} ; do - %make_install + %make_install -C build done cd python %py3_install %check -cd cmake + %global testargs --label-exclude unstable --exclude-regex '\(SimpleCommands\|Variables\|ComputeGlobal\|MolPairStyle:coul_slater_long\|AtomicPairStyle:meam_spline\|FixTimestep:.*\|.*tip4p.*\)' %ifnarch %ix86 @@ -250,7 +248,7 @@ set -e for mpi in '' mpich %{?with_openmpi:openmpi} ; do old_PYTHONPATH="${PYTHONPATH}" test -n "${mpi}" && module load mpi/${mpi}-%{_arch} && export PYTHONPATH="${MPI_PYTHON3_SITEARCH}:${PYTHONPATH}" - %ctest --output-on-failure %{?testargs} || true + %ctest --output-on-failure %{?testargs} -C build || true test -n "${mpi}" && module unload mpi/${mpi}-%{_arch} && export PYTHONPATH="${old_PYTHONPATH}" done @@ -287,7 +285,9 @@ done %{_libdir}/mpich*/lib/pkgconfig/liblammps_mpich.pc %{_libdir}/mpich*/lib/cmake/LAMMPS -%files -n python%{python3_pkgversion}-%{name} -f %{pyproject_files} +%files -n python3-%{name} +%{python3_sitelib}/lammps +%{python3_sitelib}/lammps-*.egg-info %files headers %license LICENSE |