3 %bcond_without doc # don't build doc
4 %bcond_without tests # do not perform "make test"
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
10 %define pypi_name pyuca
11 Summary: A Python implementation of the Unicode Collation Algorithm
12 Name: python-%{module}
16 Group: Libraries/Python
17 Source0: https://files.pythonhosted.org/packages/source/p/%{module}/%{module}-%{version}.tar.gz
18 # Source0-md5: 083a414b2a81a9cd6e7f3d83443820f4
19 URL: https://github.com/jtauber/pyuca
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.714
23 BuildRequires: python-devel
24 BuildRequires: python-setuptools
27 BuildRequires: python3-devel
28 BuildRequires: python3-setuptools
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 A Python implementation of the Unicode Collation Algorithm.
36 %package -n python3-%{pypi_name}
37 Summary: A Python implementation of the Unicode Collation Algorithm
38 Group: Libraries/Python
40 %description -n python3-%{pypi_name}
41 A Python implementation of the Unicode Collation Algorithm.
44 %setup -q -n %{module}-%{version}
46 # Remove bundled egg-info
47 %{__rm} -r %{module}.egg-info
51 %py_build %{?with_tests:test}
55 %py3_build %{?with_tests:test}
59 rm -rf $RPM_BUILD_ROOT
71 rm -rf $RPM_BUILD_ROOT
75 %defattr(644,root,root,755)
77 %{py_sitescriptdir}/%{pypi_name}
78 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
82 %files -n python3-%{pypi_name}
83 %defattr(644,root,root,755)
85 %{py3_sitescriptdir}/%{pypi_name}
86 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info