]> git.pld-linux.org Git - packages/python-py.git/blame - python-py.spec
- updated to 1.8.1
[packages/python-py.git] / python-py.spec
CommitLineData
2f514ebb 1#
628c8e46
JB
2# Conditional build:
3%bcond_without doc # HTML documentation build
ca45e258 4%bcond_without python2 # CPython 2.x module
8e9dea4c 5%bcond_without python3 # CPython 3.x module
7dfde63c 6%bcond_with tests # unit tests [fail with pytest 3.0?]
8e9dea4c 7
2f514ebb 8%define module py
628c8e46
JB
9Summary: Library with cross-python path, ini-parsing, io, code, log facilities
10Summary(pl.UTF-8): Biblioteka wspierająca obsługę ścieżek, ini, we/wy, kodowania i logowania w wielu Pythonach
2f514ebb 11Name: python-%{module}
581622f0
JB
12Version: 1.8.1
13Release: 1
628c8e46 14License: MIT
2f514ebb 15Group: Development/Languages/Python
7dfde63c 16#Source0Download: https://pypi.org/simple/py/
5edc3003 17Source0: https://files.pythonhosted.org/packages/source/p/py/py-%{version}.tar.gz
581622f0 18# Source0-md5: 42c67de84b07ac9cc867b8b70843a45b
7dfde63c 19URL: https://pypi.org/project/py/
ca45e258 20%if %{with python2}
7dfde63c 21BuildRequires: python-devel >= 1:2.7
5d86414d 22BuildRequires: python-setuptools >= 7.0
7dfde63c
JB
23BuildRequires: python-setuptools_scm
24%if %{with tests}
25%if %(locale -a | grep -q '^C\.utf8$'; echo $?)
26BuildRequires: glibc-localedb-all
27%endif
28BuildRequires: python-pytest >= 2.9.0
29%endif
ca45e258
JB
30%endif
31%if %{with python3}
7dfde63c
JB
32BuildRequires: python3-devel >= 1:3.4
33BuildRequires: python3-modules >= 1:3.4
5d86414d 34BuildRequires: python3-setuptools >= 7.0
7dfde63c
JB
35BuildRequires: python3-setuptools_scm
36%if %{with tests}
37%if %(locale -a | grep -q '^C\.utf8$'; echo $?)
38BuildRequires: glibc-localedb-all
39%endif
40BuildRequires: python3-pytest >= 2.9.0
41%endif
ca45e258 42%endif
4b858531 43BuildRequires: rpm-pythonprov
2e3dd66c 44BuildRequires: rpmbuild(macros) >= 1.710
628c8e46 45%{?with_doc:BuildRequires: sphinx-pdg >= 1.0}
87d7dbd0 46%{?with_doc:BuildRequires: python-devel-tools}
2f514ebb 47BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49%description
628c8e46
JB
50The py lib is a Python development support library featuring the
51following tools and modules:
8e9dea4c
ER
52 - py.path: uniform local and svn path objects
53 - py.apipkg: explicit API control and lazy-importing
54 - py.iniconfig: easy parsing of .ini files
628c8e46 55 - py.code: dynamic code generation and introspection
2f514ebb 56
4b858531 57%description -l pl.UTF-8
628c8e46
JB
58Biblioteka py to biblioteka wpierająca tworzenie oprogramowania w
59Pythonie. Zawiera następujące narzędzia i moduły:
60 - py.path - jednolite obiekty ścieżek lokalnych i svn
61 - py.apipkg - bezpośrednia kontrola API i leniwego importowania
62 - py.iniconfig - łatwa analiza plików .ini
63 - py.code - dynamiczne generowanie kodu i introspekcji
4b858531 64
8e9dea4c
ER
65%package -n python3-py
66Summary: Library with cross-python path, ini-parsing, io, code, log facilities
e50d971d 67Summary(pl.UTF-8): Biblioteka wspierająca obsługę ścieżek, ini, we/wy, kodowania i logowania w wielu Pythonach
8e9dea4c 68Group: Development/Languages/Python
8e9dea4c
ER
69
70%description -n python3-py
71The py lib is a Python development support library featuring the
72following tools and modules:
73- py.path: uniform local and svn path objects
74- py.apipkg: explicit API control and lazy-importing
75- py.iniconfig: easy parsing of .ini files
76- py.code: dynamic code generation and introspection
e50d971d
JB
77
78%description -n python3-py -l pl.UTF-8
79Biblioteka py to biblioteka wpierająca tworzenie oprogramowania w
80Pythonie. Zawiera następujące narzędzia i moduły:
81 - py.path - jednolite obiekty ścieżek lokalnych i svn
82 - py.apipkg - bezpośrednia kontrola API i leniwego importowania
83 - py.iniconfig - łatwa analiza plików .ini
84 - py.code - dynamiczne generowanie kodu i introspekcji
8e9dea4c 85
5edc3003
JB
86%package apidocs
87Summary: Documentation for Python py library
88Summary(pl.UTF-8): Dokumentacja do biblioteki Pythona py
89Group: Documentation
90
91%description apidocs
92Documentation for Python py library.
93
94%description apidocs -l pl.UTF-8
95Dokumentacja do biblioteki Pythona py.
96
2f514ebb 97%prep
98%setup -q -n %{module}-%{version}
99
100%build
ca45e258 101%if %{with python2}
16339572 102%py_build
7dfde63c
JB
103
104%if %{with tests}
105LC_ALL=C.UTF-8 \
106%{__python} -m pytest testing
107%endif
ca45e258 108%endif
2f514ebb 109
8e9dea4c 110%if %{with python3}
16339572 111%py3_build
7dfde63c
JB
112
113%if %{with tests}
114LC_ALL=C.UTF-8 \
115%{__python3} -m pytest testing
116%endif
8e9dea4c
ER
117%endif
118
628c8e46
JB
119%if %{with doc}
120PYTHONPATH=$(pwd) \
121%{__make} -C doc html
122%endif
123
2f514ebb 124%install
125rm -rf $RPM_BUILD_ROOT
ca45e258
JB
126
127%if %{with python2}
438626b1 128%py_install
2f514ebb 129
130%py_postclean
ca45e258 131%endif
2f514ebb 132
8e9dea4c 133%if %{with python3}
16339572 134%py3_install
8e9dea4c
ER
135%endif
136
2f514ebb 137%clean
138rm -rf $RPM_BUILD_ROOT
139
ca45e258 140%if %{with python2}
2f514ebb 141%files
142%defattr(644,root,root,755)
5edc3003 143%doc AUTHORS CHANGELOG LICENSE README.rst
8e9dea4c
ER
144%{py_sitescriptdir}/%{module}
145%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
ca45e258 146%endif
8e9dea4c
ER
147
148%if %{with python3}
149%files -n python3-py
150%defattr(644,root,root,755)
5edc3003 151%doc AUTHORS CHANGELOG LICENSE README.rst
8e9dea4c
ER
152%{py3_sitescriptdir}/%{module}
153%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
154%endif
5edc3003
JB
155
156%if %{with doc}
157%files apidocs
158%defattr(644,root,root,755)
159%doc doc/_build/html/{_modules,_static,announce,*.html,*.js}
160%endif
This page took 0.413256 seconds and 4 git commands to generate.