a0c6e81
%global desc %{expand: \
690002b
PyEMD is a Python wrapper for Ofir Pele and Michael Werman's implementation of
690002b
the Earth Mover's Distance that allows it to be used with NumPy. If you use
a0c6e81
this code, please cite the papers listed in the README.rst file.}
a0c6e81
626542d
Name:           python-pyemd
690002b
Version:        1.0.0
baadee9
Release:        %autorelease
a0c6e81
Summary:        Fast EMD for Python
a0c6e81
a0c6e81
a0c6e81
License:        MIT
626542d
URL:            https://github.com/wmayner/pyemd
626542d
Source0:        %{pypi_source pyemd}
a0c6e81
a0c6e81
%description
a0c6e81
%{desc}
a0c6e81
626542d
%package -n python3-pyemd
a0c6e81
Summary:        %{summary}
00fc6ea
BuildRequires:  gcc
00fc6ea
BuildRequires:  gcc-c++
00fc6ea
BuildRequires:  python3-devel
00fc6ea
BuildRequires:  %{py3_dist pytest}
a0c6e81
626542d
%description -n python3-pyemd
a0c6e81
%{desc}
a0c6e81
a0c6e81
a0c6e81
%prep
626542d
%autosetup -n pyemd-%{version}
690002b
690002b
# don't install dev files
690002b
sed -i 's/include_package_data=True/include_package_data=False/' setup.py
690002b
690002b
# use numpy, not oldest-supported-numpy
690002b
sed -i 's/oldest-supported-numpy/numpy/' pyproject.toml
690002b
690002b
sed -i '/\/usr\/bin\/env python3/ d' src/pyemd/__init__.py
690002b
sed -i '/\/usr\/bin\/env python3/ d' src/pyemd/emd.pyx
a0c6e81
2ae590c
%generate_buildrequires
2ae590c
%pyproject_buildrequires
2ae590c
a0c6e81
%build
2ae590c
%pyproject_wheel
a0c6e81
a0c6e81
%install
2ae590c
%pyproject_install
2ae590c
%pyproject_save_files pyemd
a0c6e81
a0c6e81
%check
a0c6e81
export PYTHONPATH=%{buildroot}/%{python3_sitearch}
2ae590c
%{pytest}
a0c6e81
2ae590c
%files -n python3-pyemd -f %{pyproject_files}
a0c6e81
%doc README.rst
a0c6e81
a0c6e81
%changelog
baadee9
%autochangelog