60 lines
1.6 KiB
RPMSpec
60 lines
1.6 KiB
RPMSpec
%global pypi_name xxhash
|
|
%global pypi_version 2.0.2
|
|
|
|
Name: python-%{pypi_name}
|
|
Version: %{pypi_version}
|
|
Release: 1%{?dist}
|
|
Summary: Python binding for xxHash
|
|
|
|
License: BSD
|
|
URL: https://github.com/ifduyue/python-xxhash
|
|
Source0: https://files.pythonhosted.org/packages/source/%(c=%{pypi_name}; echo ${c:0:1})/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
BuildRequires: python%{python3_version}dist(setuptools)
|
|
|
|
BuildRequires: gcc
|
|
BuildRequires: pkgconfig(libxxhash)
|
|
|
|
%global _description %{expand:
|
|
xxhash is a Python binding for the xxHash library by Yann Collet.}
|
|
|
|
%description %_description
|
|
|
|
|
|
%package -n python%{python3_pkgversion}-%{pypi_name}
|
|
Summary: %{summary}
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
|
|
|
|
%description -n python%{python3_pkgversion}-%{pypi_name} %_description
|
|
|
|
|
|
%prep
|
|
%autosetup -n %{pypi_name}-%{pypi_version}
|
|
#rm -rf %{pypi_name}.egg-info
|
|
rm -rf deps
|
|
|
|
%build
|
|
# Build using external library.
|
|
export XXHASH_LINK_SO=1
|
|
%py3_build
|
|
|
|
%install
|
|
%py3_install
|
|
|
|
%check
|
|
#%{__python3} setup.py test
|
|
cd tests
|
|
PYTHONPATH='%{buildroot}%{python3_sitearch}' %{__python3} -c "import xxhash; print(xxhash.VERSION)"
|
|
PYTHONPATH='%{buildroot}%{python3_sitearch}' %{__python3} -m unittest discover
|
|
|
|
%files -n python%{python3_pkgversion}-%{pypi_name}
|
|
%license LICENSE
|
|
%doc README.rst
|
|
%{python3_sitearch}/%{pypi_name}
|
|
%{python3_sitearch}/%{pypi_name}-%{pypi_version}-py%{python3_version}.egg-info
|
|
|
|
%changelog
|
|
* Tue Apr 19 2022 Daniel Uvehag <ufven+pkgs@protonmail.com> - 2.0.2-1
|
|
- Initial package.
|