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: 5f108bfe00d5468cbdb8071051f86a55
19 URL: https://pypi.org/project/py/
21 BuildRequires: python-devel >= 1:2.7
22 BuildRequires: python-setuptools >= 7.0
23 BuildRequires: python-setuptools_scm
25 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
26 BuildRequires: glibc-localedb-all
28 BuildRequires: python-pytest >= 2.9.0
32 BuildRequires: python3-devel >= 1:3.4
33 BuildRequires: python3-modules >= 1:3.4
34 BuildRequires: python3-setuptools >= 7.0
35 BuildRequires: python3-setuptools_scm
37 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
38 BuildRequires: glibc-localedb-all
40 BuildRequires: python3-pytest >= 2.9.0
43 BuildRequires: rpm-pythonprov
44 BuildRequires: rpmbuild(macros) >= 1.710
45 %{?with_doc:BuildRequires: sphinx-pdg >= 1.0}
46 %{?with_doc:BuildRequires: python-devel-tools}
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 The py lib is a Python development support library featuring the
52 following tools and modules:
53 - py.path: uniform local and svn path objects
54 - py.apipkg: explicit API control and lazy-importing
55 - py.iniconfig: easy parsing of .ini files
56 - py.code: dynamic code generation and introspection
58 %description -l pl.UTF-8
59 Biblioteka py to biblioteka wpierająca tworzenie oprogramowania w
60 Pythonie. Zawiera następujące narzędzia i moduły:
61 - py.path - jednolite obiekty ścieżek lokalnych i svn
62 - py.apipkg - bezpośrednia kontrola API i leniwego importowania
63 - py.iniconfig - łatwa analiza plików .ini
64 - py.code - dynamiczne generowanie kodu i introspekcji
66 %package -n python3-py
67 Summary: Library with cross-python path, ini-parsing, io, code, log facilities
68 Summary(pl.UTF-8): Biblioteka wspierająca obsługę ścieżek, ini, we/wy, kodowania i logowania w wielu Pythonach
69 Group: Development/Languages/Python
71 %description -n python3-py
72 The py lib is a Python development support library featuring the
73 following tools and modules:
74 - py.path: uniform local and svn path objects
75 - py.apipkg: explicit API control and lazy-importing
76 - py.iniconfig: easy parsing of .ini files
77 - py.code: dynamic code generation and introspection
79 %description -n python3-py -l pl.UTF-8
80 Biblioteka py to biblioteka wpierająca tworzenie oprogramowania w
81 Pythonie. Zawiera następujące narzędzia i moduły:
82 - py.path - jednolite obiekty ścieżek lokalnych i svn
83 - py.apipkg - bezpośrednia kontrola API i leniwego importowania
84 - py.iniconfig - łatwa analiza plików .ini
85 - py.code - dynamiczne generowanie kodu i introspekcji
88 Summary: Documentation for Python py library
89 Summary(pl.UTF-8): Dokumentacja do biblioteki Pythona py
93 Documentation for Python py library.
95 %description apidocs -l pl.UTF-8
96 Dokumentacja do biblioteki Pythona py.
99 %setup -q -n %{module}-%{version}
107 %{__python} -m pytest testing
116 %{__python3} -m pytest testing
122 %{__make} -C doc html
126 rm -rf $RPM_BUILD_ROOT
139 rm -rf $RPM_BUILD_ROOT
143 %defattr(644,root,root,755)
144 %doc AUTHORS CHANGELOG.rst LICENSE README.rst
145 %{py_sitescriptdir}/%{module}
146 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
151 %defattr(644,root,root,755)
152 %doc AUTHORS CHANGELOG.rst LICENSE README.rst
153 %{py3_sitescriptdir}/%{module}
154 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
159 %defattr(644,root,root,755)
160 %doc doc/_build/html/{_modules,_static,announce,*.html,*.js}