]> git.pld-linux.org Git - packages/python-simplegeneric.git/blob - python-simplegeneric.spec
rebuild with python 3.10
[packages/python-simplegeneric.git] / python-simplegeneric.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  simplegeneric
8 Summary:        Simple generic functions
9 Summary(pl.UTF-8):      Proste funkcje generyczne
10 Name:           python-%{module}
11 Version:        0.8.1
12 Release:        6
13 License:        ZPL v2.1
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
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.5
23 BuildRequires:  python-setuptools
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-modules >= 1:3.2
27 BuildRequires:  python3-setuptools
28 %endif
29 Requires:       python-modules >= 1:2.5
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
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.
40
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
48 Pythona.
49
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
55
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.
63
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
71 Pythona.
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
85 %install
86 rm -rf $RPM_BUILD_ROOT
87
88 %if %{with python2}
89 %py_install
90
91 %py_postclean
92 %endif
93
94 %if %{with python3}
95 %py3_install
96 %endif
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %if %{with python2}
102 %files
103 %defattr(644,root,root,755)
104 %doc README.txt
105 %{py_sitescriptdir}/simplegeneric.py[co]
106 %{py_sitescriptdir}/simplegeneric-%{version}-py*.egg-info
107 %endif
108
109 %if %{with python3}
110 %files -n python3-%{module}
111 %defattr(644,root,root,755)
112 %doc README.txt
113 %{py3_sitescriptdir}/simplegeneric.py
114 %{py3_sitescriptdir}/__pycache__/simplegeneric.cpython-*.py[co]
115 %{py3_sitescriptdir}/simplegeneric-%{version}-py*.egg-info
116 %endif
This page took 0.091483 seconds and 3 git commands to generate.