Blob Blame History Raw
%global forgeurl
Version:        3.2.0

Name:           python-gsd
Release:        %autorelease
Summary:        Read and write GSD files for use with HOOMD-blue

License:        BSD-2-Clause
URL:            %{forgeurl}
Source0:        %{forgesource}

BuildRequires:  python3-devel
BuildRequires:  gcc
BuildRequires:  %{py3_dist pytest}

%global _description %{expand:
The GSD file format is the native file format for HOOMD-blue. GSD files store
trajectories of the HOOMD-blue system state in a binary file with efficient
random access to frames. GSD allows all particle and topology properties to vary
from one frame to the next. Use the GSD Python API to specify the initial
condition for a HOOMD-blue simulation or analyze trajectory output with a
script. Read a GSD trajectory with a visualization tool to explore the behavior
of the simulation.}

%description %_description

%package -n     python3-gsd
Summary:        %{summary}

%description -n python3-gsd %_description

%autosetup -p1 -n gsd-%{version}

sed -i 's/oldest-supported-numpy/numpy/g' pyproject.toml



%pyproject_save_files gsd

ln -s %{buildroot}%{python3_sitearch}/gsd/fl.cpython-%{python3_version_nodots}-%{python3_platform_triplet}.so gsd/
# reading little-endian files on big-endian is unsupported
%pytest -v gsd \
    --basetemp=$(mktemp -d -p %{_tmppath}) \
%ifarch s390x
-k "not test_gsd_v1_read \
and not test_gsd_v1_upgrade_read \
and not test_gsd_v1_write \
and not test_gsd_v1_upgrade_write"

%files -n python3-gsd -f %{pyproject_files}