3 %bcond_without doc # HTML documentation build
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
6 %bcond_with tests # unit tests [fail with pytest 3.0?]
9 Summary: Library with cross-python path, ini-parsing, io, code, log facilities
10 Summary(pl.UTF-8): Biblioteka wspierająca obsługę ścieżek, ini, we/wy, kodowania i logowania w wielu Pythonach
11 Name: python-%{module}
15 Group: Development/Languages/Python
16 #Source0Download: https://pypi.org/simple/py/
17 Source0: https://files.pythonhosted.org/packages/source/p/py/py-%{version}.tar.gz
18 # Source0-md5: bde7dcc1cb452a1e10206ef2f811ba88
19 Patch0: %{name}-pytest4.patch
20 URL: https://pypi.org/project/py/
22 BuildRequires: python-devel >= 1:2.7
23 BuildRequires: python-setuptools >= 1:7.0
24 BuildRequires: python-setuptools_scm
26 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
27 BuildRequires: glibc-localedb-all
29 BuildRequires: python-attrs
30 BuildRequires: python-pytest >= 2.9.0
34 BuildRequires: python3-devel >= 1:3.4
35 BuildRequires: python3-modules >= 1:3.4
36 BuildRequires: python3-setuptools >= 1:7.0
37 BuildRequires: python3-setuptools_scm
39 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
40 BuildRequires: glibc-localedb-all
42 BuildRequires: python3-attrs
43 BuildRequires: python3-pytest >= 2.9.0
46 BuildRequires: rpm-pythonprov
47 BuildRequires: rpmbuild(macros) >= 1.714
48 %{?with_doc:BuildRequires: sphinx-pdg >= 1.0}
49 %{?with_doc:BuildRequires: python-devel-tools}
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 The py lib is a Python development support library featuring the
55 following tools and modules:
56 - py.path: uniform local and svn path objects
57 - py.apipkg: explicit API control and lazy-importing
58 - py.iniconfig: easy parsing of .ini files
59 - py.code: dynamic code generation and introspection
61 %description -l pl.UTF-8
62 Biblioteka py to biblioteka wpierająca tworzenie oprogramowania w
63 Pythonie. Zawiera następujące narzędzia i moduły:
64 - py.path - jednolite obiekty ścieżek lokalnych i svn
65 - py.apipkg - bezpośrednia kontrola API i leniwego importowania
66 - py.iniconfig - łatwa analiza plików .ini
67 - py.code - dynamiczne generowanie kodu i introspekcji
69 %package -n python3-py
70 Summary: Library with cross-python path, ini-parsing, io, code, log facilities
71 Summary(pl.UTF-8): Biblioteka wspierająca obsługę ścieżek, ini, we/wy, kodowania i logowania w wielu Pythonach
72 Group: Development/Languages/Python
74 %description -n python3-py
75 The py lib is a Python development support library featuring the
76 following tools and modules:
77 - py.path: uniform local and svn path objects
78 - py.apipkg: explicit API control and lazy-importing
79 - py.iniconfig: easy parsing of .ini files
80 - py.code: dynamic code generation and introspection
82 %description -n python3-py -l pl.UTF-8
83 Biblioteka py to biblioteka wpierająca tworzenie oprogramowania w
84 Pythonie. Zawiera następujące narzędzia i moduły:
85 - py.path - jednolite obiekty ścieżek lokalnych i svn
86 - py.apipkg - bezpośrednia kontrola API i leniwego importowania
87 - py.iniconfig - łatwa analiza plików .ini
88 - py.code - dynamiczne generowanie kodu i introspekcji
91 Summary: Documentation for Python py library
92 Summary(pl.UTF-8): Dokumentacja do biblioteki Pythona py
96 Documentation for Python py library.
98 %description apidocs -l pl.UTF-8
99 Dokumentacja do biblioteki Pythona py.
102 %setup -q -n %{module}-%{version}
111 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
112 %{__python} -m pytest testing
121 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
122 %{__python3} -m pytest testing
128 %{__make} -C doc html
132 rm -rf $RPM_BUILD_ROOT
145 rm -rf $RPM_BUILD_ROOT
149 %defattr(644,root,root,755)
150 %doc AUTHORS CHANGELOG.rst LICENSE README.rst
151 %{py_sitescriptdir}/%{module}
152 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
157 %defattr(644,root,root,755)
158 %doc AUTHORS CHANGELOG.rst LICENSE README.rst
159 %{py3_sitescriptdir}/%{module}
160 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
165 %defattr(644,root,root,755)
166 %doc doc/_build/html/{_modules,_static,announce,*.html,*.js}