]> git.pld-linux.org Git - packages/python-entrypoints.git/blame - python-entrypoints.spec
rebuild with python 3.10
[packages/python-entrypoints.git] / python-entrypoints.spec
CommitLineData
760139f5
JB
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
8Summary: Discover and load entry points from installed packages
9Summary(pl.UTF-8): Wykrywanie i wczytywanie punktów wejścia z zainstalowanych pakietów
10Name: python-entrypoints
11Version: 0.3
32bbf564 12Release: 5
760139f5
JB
13License: MIT
14Group: Libraries/Python
15#Source0Download: https://pypi.org/simple/entrypoints/
16Source0: https://files.pythonhosted.org/packages/source/e/entrypoints/entrypoints-%{version}.tar.gz
17# Source0-md5: c5c61ea2e46a0c50ea08f4af7955a0b1
18Patch0: %{name}-use_setuptools.patch
19URL: https://pypi.org/project/entrypoints/
20BuildRequires: rpm-pythonprov
21BuildRequires: rpmbuild(macros) >= 1.714
22%if %{with python2}
23BuildRequires: python-configparser >= 3.5
24BuildRequires: python-modules >= 1:2.7
25BuildRequires: python-setuptools
26%if %{with tests}
27BuildRequires: python-pytest
28%endif
29%endif
30%if %{with python3}
31BuildRequires: python3-modules >= 1:3.5
32BuildRequires: python3-setuptools
33%if %{with tests}
34BuildRequires: python3-pytest
35%endif
36%endif
37%if %{with doc}
38BuildRequires: sphinx-pdg
39%endif
40Requires: python-modules >= 1:2.7
41BuildArch: noarch
42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44%description
45Entry points are a way for Python packages to advertise objects with
46some common interface. The most common examples are console_scripts
47entry points, which define shell commands by identifying a Python
48function to run.
49
50Groups of entry points, such as console_scripts, point to objects with
51similar interfaces. An application might use a group to find its
52plugins, or multiple groups if it has different kinds of plugins.
53
54The entrypoints module contains functions to find and load entry
55points.
56
57%description -l pl.UTF-8
58Punty wejścia to sposób, w jaki pakiety Pythona udostępniają obiekty z
59jakimś wspólnym interfejsem. Najpowszechniejszym przykładem są punkty
60wejściowe skryptów konsoli (console_scripts), definiujące polecenia
61powłoki poprzez określanie funkcji pythonowych do uruchomienia.
62
63Grupy punktów wejścia, takie jak console_scripts, wskazują na obiekty
64z podobnymi interfejsami. Aplikacja może używać grupy do znalezienia
65swoich wtyczek, lub wielu grup, jeśli używa wtyczek różnych rodzajów.
66
67Moduł entrypoints zawiera funkcje pomagające znajdować i ładować
68punkty wejścia.
69
70%package -n python3-entrypoints
71Summary: Discover and load entry points from installed packages
72Summary(pl.UTF-8): Wykrywanie i wczytywanie punktów wejścia z zainstalowanych pakietów
73Group: Libraries/Python
74Requires: python3-modules >= 1:3.5
75
76%description -n python3-entrypoints
77Entry points are a way for Python packages to advertise objects with
78some common interface. The most common examples are console_scripts
79entry points, which define shell commands by identifying a Python
80function to run.
81
82Groups of entry points, such as console_scripts, point to objects with
83similar interfaces. An application might use a group to find its
84plugins, or multiple groups if it has different kinds of plugins.
85
86The entrypoints module contains functions to find and load entry
87points.
88
89%description -n python3-entrypoints -l pl.UTF-8
90Punty wejścia to sposób, w jaki pakiety Pythona udostępniają obiekty z
91jakimś wspólnym interfejsem. Najpowszechniejszym przykładem są punkty
92wejściowe skryptów konsoli (console_scripts), definiujące polecenia
93powłoki poprzez określanie funkcji pythonowych do uruchomienia.
94
95Grupy punktów wejścia, takie jak console_scripts, wskazują na obiekty
96z podobnymi interfejsami. Aplikacja może używać grupy do znalezienia
97swoich wtyczek, lub wielu grup, jeśli używa wtyczek różnych rodzajów.
98
99Moduł entrypoints zawiera funkcje pomagające znajdować i ładować
100punkty wejścia.
101
102%package apidocs
103Summary: API documentation for Python entrypoints module
104Summary(pl.UTF-8): Dokumentacja API modułu Pythona entrypoints
105Group: Documentation
106
107%description apidocs
108API documentation for Python entrypoints module.
109
110%description apidocs -l pl.UTF-8
111Dokumentacja 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
139rm -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
152rm -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.407805 seconds and 4 git commands to generate.