3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 %define module simplegeneric
8 Summary: Simple generic functions
9 Summary(pl.UTF-8): Proste funkcje generyczne
10 Name: python-%{module}
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/simplegeneric/
16 Source0: https://files.pythonhosted.org/packages/source/s/simplegeneric/simplegeneric-%{version}.zip
17 # Source0-md5: f9c1fab00fd981be588fc32759f474e3
18 URL: https://pypi.org/project/simplegeneric/
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-modules >= 1:2.5
23 BuildRequires: python-setuptools
26 BuildRequires: python3-modules >= 1:3.2
27 BuildRequires: python3-setuptools
29 Requires: python-modules >= 1:2.5
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 The simplegeneric module lets you define simple single-dispatch
35 generic functions, akin to Python's built-in generic functions like
36 len(), iter() and so on. However, instead of using specially-named
37 methods, these generic functions use simple lookup tables, akin to
38 those used by e.g. pickle.dump() and other generic functions found in
39 the Python standard library.
41 %description -l pl.UTF-8
42 Moduł simplegeneric pozwala definiować proste funkcje generyczne
43 pojedynczego wyboru, podobne do wbudowanych funkcji generycznych
44 Pythona, takich jak len(), iter() itp. Jednak, zamiast używania
45 specjalnie nazwanych metod, te funkcje generyczne używają
46 pojedynczych tabel wyszukiwania, podobnie do tych używanych przez np.
47 pickle.dump() czy inne funkcje generyczne w bibliotece standardowej
50 %package -n python3-%{module}
51 Summary: Simple generic functions
52 Summary(pl.UTF-8): Proste funkcje generyczne
53 Group: Libraries/Python
54 Requires: python3-modules >= 1:3.2
56 %description -n python3-%{module}
57 The simplegeneric module lets you define simple single-dispatch
58 generic functions, akin to Python’s built-in generic functions like
59 len(), iter() and so on. However, instead of using specially-named
60 methods, these generic functions use simple lookup tables, akin to
61 those used by e.g. pickle.dump() and other generic functions found in
62 the Python standard library.
64 %description -n python3-%{module} -l pl.UTF-8
65 Moduł simplegeneric pozwala definiować proste funkcje generyczne
66 pojedynczego wyboru, podobne do wbudowanych funkcji generycznych
67 Pythona, takich jak len(), iter() itp. Jednak, zamiast używania
68 specjalnie nazwanych metod, te funkcje generyczne używają
69 pojedynczych tabel wyszukiwania, podobnie do tych używanych przez np.
70 pickle.dump() czy inne funkcje generyczne w bibliotece standardowej
74 %setup -q -n %{module}-%{version}
78 %py_build %{?with_tests:test}
82 %py3_build %{?with_tests:test}
86 rm -rf $RPM_BUILD_ROOT
99 rm -rf $RPM_BUILD_ROOT
103 %defattr(644,root,root,755)
105 %{py_sitescriptdir}/simplegeneric.py[co]
106 %{py_sitescriptdir}/simplegeneric-%{version}-py*.egg-info
110 %files -n python3-%{module}
111 %defattr(644,root,root,755)
113 %{py3_sitescriptdir}/simplegeneric.py
114 %{py3_sitescriptdir}/__pycache__/simplegeneric.cpython-*.py[co]
115 %{py3_sitescriptdir}/simplegeneric-%{version}-py*.egg-info