]> git.pld-linux.org Git - packages/python-py.git/blob - python-py.spec
- release 3 (by relup.sh)
[packages/python-py.git] / python-py.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # HTML documentation build
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  py
8 Summary:        Library with cross-python path, ini-parsing, io, code, log facilities
9 Summary(pl.UTF-8):      Biblioteka wspierająca obsługę ścieżek, ini, we/wy, kodowania i logowania w wielu Pythonach
10 Name:           python-%{module}
11 Version:        1.4.28
12 Release:        3
13 License:        MIT
14 Group:          Development/Languages/Python
15 Source0:        https://pypi.python.org/packages/source/p/py/py-%{version}.tar.gz
16 # Source0-md5:  30b807e1fe1b886578c47337d424a083
17 Source1:        http://docs.python.org/objects.inv?/python-objects.inv
18 # Source1-md5:  3d3c0b594b2e91d559418c107d973633
19 Patch0:         %{name}-offline.patch
20 URL:            https://pypi.python.org/pypi/py
21 %if %{with python2}
22 BuildRequires:  python-devel >= 1:2.5
23 BuildRequires:  python-setuptools >= 7.0
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-devel >= 1:3.2
27 BuildRequires:  python3-modules >= 1:3.2
28 BuildRequires:  python3-setuptools >= 7.0
29 %endif
30 BuildRequires:  rpm-pythonprov
31 BuildRequires:  rpmbuild(macros) >= 1.219
32 %{?with_doc:BuildRequires:      sphinx-pdg >= 1.0}
33 %{?with_doc:BuildRequires:      python-devel-tools}
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 The py lib is a Python development support library featuring the
38 following tools and modules:
39  - py.path: uniform local and svn path objects
40  - py.apipkg: explicit API control and lazy-importing
41  - py.iniconfig: easy parsing of .ini files
42  - py.code: dynamic code generation and introspection
43
44 %description -l pl.UTF-8
45 Biblioteka py to biblioteka wpierająca tworzenie oprogramowania w
46 Pythonie. Zawiera następujące narzędzia i moduły:
47  - py.path - jednolite obiekty ścieżek lokalnych i svn
48  - py.apipkg - bezpośrednia kontrola API i leniwego importowania
49  - py.iniconfig - łatwa analiza plików .ini
50  - py.code - dynamiczne generowanie kodu i introspekcji
51
52 %package -n python3-py
53 Summary:        Library with cross-python path, ini-parsing, io, code, log facilities
54 Summary(pl.UTF-8):      Biblioteka wspierająca obsługę ścieżek, ini, we/wy, kodowania i logowania w wielu Pythonach
55 Group:          Development/Languages/Python
56
57 %description -n python3-py
58 The py lib is a Python development support library featuring the
59 following tools and modules:
60 - py.path: uniform local and svn path objects
61 - py.apipkg: explicit API control and lazy-importing
62 - py.iniconfig: easy parsing of .ini files
63 - py.code: dynamic code generation and introspection
64
65 %description -n python3-py -l pl.UTF-8
66 Biblioteka py to biblioteka wpierająca tworzenie oprogramowania w
67 Pythonie. Zawiera następujące narzędzia i moduły:
68  - py.path - jednolite obiekty ścieżek lokalnych i svn
69  - py.apipkg - bezpośrednia kontrola API i leniwego importowania
70  - py.iniconfig - łatwa analiza plików .ini
71  - py.code - dynamiczne generowanie kodu i introspekcji
72
73 %prep
74 %setup -q -n %{module}-%{version}
75 %patch0 -p1
76
77 cp -p %{SOURCE1} doc
78
79 %build
80 %if %{with python2}
81 %py_build \
82         --build-base build-2
83 %endif
84
85 %if %{with python3}
86 %py3_build \
87         --build-base build-3
88 %endif
89
90 %if %{with doc}
91 PYTHONPATH=$(pwd) \
92 %{__make} -C doc html
93 %endif
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97
98 %if %{with python2}
99 %py_install
100
101 %py_postclean
102 %endif
103
104 %if %{with python3}
105 %{__python3} -- setup.py \
106         build --build-base build-3 \
107         install \
108         --root=$RPM_BUILD_ROOT \
109         --optimize=2
110
111 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/py/test.py
112 %endif
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %if %{with python2}
118 %files
119 %defattr(644,root,root,755)
120 %doc CHANGELOG LICENSE README.txt %{?with_doc:doc/_build/html}
121 %{py_sitescriptdir}/%{module}
122 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
123 %endif
124
125 %if %{with python3}
126 %files -n python3-py
127 %defattr(644,root,root,755)
128 %doc CHANGELOG LICENSE README.txt %{?with_doc:doc/_build/html}
129 %{py3_sitescriptdir}/%{module}
130 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
131 %endif
This page took 0.115927 seconds and 3 git commands to generate.