]> git.pld-linux.org Git - packages/python-simplegeneric.git/blame - python-simplegeneric.spec
rebuild with python 3.10
[packages/python-simplegeneric.git] / python-simplegeneric.spec
CommitLineData
e825b753 1#
a5443def 2# Conditional build:
e825b753 3%bcond_without tests # unit tests
a5443def
MK
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module simplegeneric
8Summary: Simple generic functions
e825b753 9Summary(pl.UTF-8): Proste funkcje generyczne
a5443def
MK
10Name: python-%{module}
11Version: 0.8.1
855fd103 12Release: 6
e825b753 13License: ZPL v2.1
a5443def 14Group: Libraries/Python
e825b753
JB
15#Source0Download: https://pypi.org/simple/simplegeneric/
16Source0: https://files.pythonhosted.org/packages/source/s/simplegeneric/simplegeneric-%{version}.zip
a5443def 17# Source0-md5: f9c1fab00fd981be588fc32759f474e3
e825b753 18URL: https://pypi.org/project/simplegeneric/
a5443def
MK
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
e825b753 22BuildRequires: python-modules >= 1:2.5
a5443def
MK
23BuildRequires: python-setuptools
24%endif
25%if %{with python3}
e825b753 26BuildRequires: python3-modules >= 1:3.2
a5443def
MK
27BuildRequires: python3-setuptools
28%endif
e825b753 29Requires: python-modules >= 1:2.5
a5443def
MK
30BuildArch: noarch
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34The simplegeneric module lets you define simple single-dispatch
e825b753 35generic functions, akin to Python's built-in generic functions like
a5443def
MK
36len(), iter() and so on. However, instead of using specially-named
37methods, these generic functions use simple lookup tables, akin to
38those used by e.g. pickle.dump() and other generic functions found in
39the Python standard library.
40
e825b753
JB
41%description -l pl.UTF-8
42Moduł simplegeneric pozwala definiować proste funkcje generyczne
43pojedynczego wyboru, podobne do wbudowanych funkcji generycznych
44Pythona, takich jak len(), iter() itp. Jednak, zamiast używania
45specjalnie nazwanych metod, te funkcje generyczne używają
46pojedynczych tabel wyszukiwania, podobnie do tych używanych przez np.
47pickle.dump() czy inne funkcje generyczne w bibliotece standardowej
48Pythona.
a5443def
MK
49
50%package -n python3-%{module}
e825b753
JB
51Summary: Simple generic functions
52Summary(pl.UTF-8): Proste funkcje generyczne
a5443def 53Group: Libraries/Python
e825b753 54Requires: python3-modules >= 1:3.2
a5443def
MK
55
56%description -n python3-%{module}
57The simplegeneric module lets you define simple single-dispatch
58generic functions, akin to Python’s built-in generic functions like
59len(), iter() and so on. However, instead of using specially-named
60methods, these generic functions use simple lookup tables, akin to
61those used by e.g. pickle.dump() and other generic functions found in
62the Python standard library.
63
e825b753
JB
64%description -n python3-%{module} -l pl.UTF-8
65Moduł simplegeneric pozwala definiować proste funkcje generyczne
66pojedynczego wyboru, podobne do wbudowanych funkcji generycznych
67Pythona, takich jak len(), iter() itp. Jednak, zamiast używania
68specjalnie nazwanych metod, te funkcje generyczne używają
69pojedynczych tabel wyszukiwania, podobnie do tych używanych przez np.
70pickle.dump() czy inne funkcje generyczne w bibliotece standardowej
71Pythona.
a5443def
MK
72
73%prep
74%setup -q -n %{module}-%{version}
75
76%build
77%if %{with python2}
78%py_build %{?with_tests:test}
79%endif
80
81%if %{with python3}
82%py3_build %{?with_tests:test}
83%endif
84
a5443def
MK
85%install
86rm -rf $RPM_BUILD_ROOT
87
88%if %{with python2}
89%py_install
90
a5443def
MK
91%py_postclean
92%endif
93
94%if %{with python3}
95%py3_install
96%endif
97
98%clean
99rm -rf $RPM_BUILD_ROOT
100
101%if %{with python2}
102%files
103%defattr(644,root,root,755)
104%doc README.txt
e825b753
JB
105%{py_sitescriptdir}/simplegeneric.py[co]
106%{py_sitescriptdir}/simplegeneric-%{version}-py*.egg-info
a5443def
MK
107%endif
108
109%if %{with python3}
110%files -n python3-%{module}
111%defattr(644,root,root,755)
112%doc README.txt
e825b753
JB
113%{py3_sitescriptdir}/simplegeneric.py
114%{py3_sitescriptdir}/__pycache__/simplegeneric.cpython-*.py[co]
115%{py3_sitescriptdir}/simplegeneric-%{version}-py*.egg-info
a5443def 116%endif
This page took 0.112661 seconds and 4 git commands to generate.