]> git.pld-linux.org Git - packages/python-entrypoints.git/blob - python-entrypoints.spec
rebuild with python 3.10
[packages/python-entrypoints.git] / python-entrypoints.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 Summary:        Discover and load entry points from installed packages
9 Summary(pl.UTF-8):      Wykrywanie i wczytywanie punktów wejścia z zainstalowanych pakietów
10 Name:           python-entrypoints
11 Version:        0.3
12 Release:        5
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/entrypoints/
16 Source0:        https://files.pythonhosted.org/packages/source/e/entrypoints/entrypoints-%{version}.tar.gz
17 # Source0-md5:  c5c61ea2e46a0c50ea08f4af7955a0b1
18 Patch0:         %{name}-use_setuptools.patch
19 URL:            https://pypi.org/project/entrypoints/
20 BuildRequires:  rpm-pythonprov
21 BuildRequires:  rpmbuild(macros) >= 1.714
22 %if %{with python2}
23 BuildRequires:  python-configparser >= 3.5
24 BuildRequires:  python-modules >= 1:2.7
25 BuildRequires:  python-setuptools
26 %if %{with tests}
27 BuildRequires:  python-pytest
28 %endif
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3-modules >= 1:3.5
32 BuildRequires:  python3-setuptools
33 %if %{with tests}
34 BuildRequires:  python3-pytest
35 %endif
36 %endif
37 %if %{with doc}
38 BuildRequires:  sphinx-pdg
39 %endif
40 Requires:       python-modules >= 1:2.7
41 BuildArch:      noarch
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 Entry points are a way for Python packages to advertise objects with
46 some common interface. The most common examples are console_scripts
47 entry points, which define shell commands by identifying a Python
48 function to run.
49
50 Groups of entry points, such as console_scripts, point to objects with
51 similar interfaces. An application might use a group to find its
52 plugins, or multiple groups if it has different kinds of plugins.
53
54 The entrypoints module contains functions to find and load entry
55 points.
56
57 %description -l pl.UTF-8
58 Punty wejścia to sposób, w jaki pakiety Pythona udostępniają obiekty z
59 jakimś wspólnym interfejsem. Najpowszechniejszym przykładem są punkty
60 wejściowe skryptów konsoli (console_scripts), definiujące polecenia
61 powłoki poprzez określanie funkcji pythonowych do uruchomienia.
62
63 Grupy punktów wejścia, takie jak console_scripts, wskazują na obiekty
64 z podobnymi interfejsami. Aplikacja może używać grupy do znalezienia
65 swoich wtyczek, lub wielu grup, jeśli używa wtyczek różnych rodzajów.
66
67 Moduł entrypoints zawiera funkcje pomagające znajdować i ładować
68 punkty wejścia.
69
70 %package -n python3-entrypoints
71 Summary:        Discover and load entry points from installed packages
72 Summary(pl.UTF-8):      Wykrywanie i wczytywanie punktów wejścia z zainstalowanych pakietów
73 Group:          Libraries/Python
74 Requires:       python3-modules >= 1:3.5
75
76 %description -n python3-entrypoints
77 Entry points are a way for Python packages to advertise objects with
78 some common interface. The most common examples are console_scripts
79 entry points, which define shell commands by identifying a Python
80 function to run.
81
82 Groups of entry points, such as console_scripts, point to objects with
83 similar interfaces. An application might use a group to find its
84 plugins, or multiple groups if it has different kinds of plugins.
85
86 The entrypoints module contains functions to find and load entry
87 points.
88
89 %description -n python3-entrypoints -l pl.UTF-8
90 Punty wejścia to sposób, w jaki pakiety Pythona udostępniają obiekty z
91 jakimś wspólnym interfejsem. Najpowszechniejszym przykładem są punkty
92 wejściowe skryptów konsoli (console_scripts), definiujące polecenia
93 powłoki poprzez określanie funkcji pythonowych do uruchomienia.
94
95 Grupy punktów wejścia, takie jak console_scripts, wskazują na obiekty
96 z podobnymi interfejsami. Aplikacja może używać grupy do znalezienia
97 swoich wtyczek, lub wielu grup, jeśli używa wtyczek różnych rodzajów.
98
99 Moduł entrypoints zawiera funkcje pomagające znajdować i ładować
100 punkty wejścia.
101
102 %package apidocs
103 Summary:        API documentation for Python entrypoints module
104 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona entrypoints
105 Group:          Documentation
106
107 %description apidocs
108 API documentation for Python entrypoints module.
109
110 %description apidocs -l pl.UTF-8
111 Dokumentacja API modułu Pythona entrypoints.
112
113 %prep
114 %setup -q -n entrypoints-%{version}
115 %patch0 -p1
116
117 %build
118 %if %{with python2}
119 %py_build
120
121 %if %{with tests}
122 %{__python} -m pytest tests
123 %endif
124 %endif
125
126 %if %{with python3}
127 %py3_build
128
129 %if %{with tests}
130 %{__python3} -m pytest tests
131 %endif
132 %endif
133
134 %if %{with doc}
135 %{__make} -C doc html
136 %endif
137
138 %install
139 rm -rf $RPM_BUILD_ROOT
140
141 %if %{with python2}
142 %py_install
143
144 %py_postclean
145 %endif
146
147 %if %{with python3}
148 %py3_install
149 %endif
150
151 %clean
152 rm -rf $RPM_BUILD_ROOT
153
154 %if %{with python2}
155 %files
156 %defattr(644,root,root,755)
157 %doc LICENSE README.rst
158 %{py_sitescriptdir}/entrypoints.py[co]
159 %{py_sitescriptdir}/entrypoints-%{version}-py*.egg-info
160 %endif
161
162 %if %{with python3}
163 %files -n python3-entrypoints
164 %defattr(644,root,root,755)
165 %doc LICENSE README.rst
166 %{py3_sitescriptdir}/entrypoints.py
167 %{py3_sitescriptdir}/__pycache__/entrypoints.cpython-*.py[co]
168 %{py3_sitescriptdir}/entrypoints-%{version}-py*.egg-info
169 %endif
170
171 %if %{with doc}
172 %files apidocs
173 %defattr(644,root,root,755)
174 %doc doc/_build/html/{_static,*.html,*.js}
175 %endif
This page took 0.055367 seconds and 3 git commands to generate.