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: e53ac12db4286737837ef3ccb4158301
19 Source1: http://docs.python.org/objects.inv?/python-objects.inv
20 # Source1-md5: 3d3c0b594b2e91d559418c107d973633
21 Patch0: %{name}-offline.patch
22 URL: https://pypi.org/project/py/
24 BuildRequires: python-devel >= 1:2.7
25 BuildRequires: python-setuptools >= 7.0
26 BuildRequires: python-setuptools_scm
28 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
29 BuildRequires: glibc-localedb-all
31 BuildRequires: python-pytest >= 2.9.0
35 BuildRequires: python3-devel >= 1:3.4
36 BuildRequires: python3-modules >= 1:3.4
37 BuildRequires: python3-setuptools >= 7.0
38 BuildRequires: python3-setuptools_scm
40 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
41 BuildRequires: glibc-localedb-all
43 BuildRequires: python3-pytest >= 2.9.0
46 BuildRequires: rpm-pythonprov
47 BuildRequires: rpmbuild(macros) >= 1.710
48 %{?with_doc:BuildRequires: sphinx-pdg >= 1.0}
49 %{?with_doc:BuildRequires: python-devel-tools}
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 The py lib is a Python development support library featuring the
54 following tools and modules:
55 - py.path: uniform local and svn path objects
56 - py.apipkg: explicit API control and lazy-importing
57 - py.iniconfig: easy parsing of .ini files
58 - py.code: dynamic code generation and introspection
60 %description -l pl.UTF-8
61 Biblioteka py to biblioteka wpierająca tworzenie oprogramowania w
62 Pythonie. Zawiera następujące narzędzia i moduły:
63 - py.path - jednolite obiekty ścieżek lokalnych i svn
64 - py.apipkg - bezpośrednia kontrola API i leniwego importowania
65 - py.iniconfig - łatwa analiza plików .ini
66 - py.code - dynamiczne generowanie kodu i introspekcji
68 %package -n python3-py
69 Summary: Library with cross-python path, ini-parsing, io, code, log facilities
70 Summary(pl.UTF-8): Biblioteka wspierająca obsługę ścieżek, ini, we/wy, kodowania i logowania w wielu Pythonach
71 Group: Development/Languages/Python
73 %description -n python3-py
74 The py lib is a Python development support library featuring the
75 following tools and modules:
76 - py.path: uniform local and svn path objects
77 - py.apipkg: explicit API control and lazy-importing
78 - py.iniconfig: easy parsing of .ini files
79 - py.code: dynamic code generation and introspection
81 %description -n python3-py -l pl.UTF-8
82 Biblioteka py to biblioteka wpierająca tworzenie oprogramowania w
83 Pythonie. Zawiera następujące narzędzia i moduły:
84 - py.path - jednolite obiekty ścieżek lokalnych i svn
85 - py.apipkg - bezpośrednia kontrola API i leniwego importowania
86 - py.iniconfig - łatwa analiza plików .ini
87 - py.code - dynamiczne generowanie kodu i introspekcji
90 Summary: Documentation for Python py library
91 Summary(pl.UTF-8): Dokumentacja do biblioteki Pythona py
95 Documentation for Python py library.
97 %description apidocs -l pl.UTF-8
98 Dokumentacja do biblioteki Pythona py.
101 %setup -q -n %{module}-%{version}
112 %{__python} -m pytest testing
121 %{__python3} -m pytest testing
127 %{__make} -C doc html
131 rm -rf $RPM_BUILD_ROOT
144 rm -rf $RPM_BUILD_ROOT
148 %defattr(644,root,root,755)
149 %doc AUTHORS CHANGELOG LICENSE README.rst
150 %{py_sitescriptdir}/%{module}
151 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
156 %defattr(644,root,root,755)
157 %doc AUTHORS CHANGELOG LICENSE README.rst
158 %{py3_sitescriptdir}/%{module}
159 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
164 %defattr(644,root,root,755)
165 %doc doc/_build/html/{_modules,_static,announce,*.html,*.js}