]> git.pld-linux.org Git - packages/python-py.git/blob - python-py.spec
- release 2 (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.26
12 Release:        2
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:  30c3fd92a53f1a5ed6f3591c1fe75c0e
17 Source1:        http://docs.python.org/objects.inv?/python-objects.inv
18 # Source1-md5:  3d3c0b594b2e91d559418c107d973633
19 Patch0:         %{name}-offline.patch
20 URL:            http://pylib.org/
21 %if %{with python2}
22 BuildRequires:  python-devel >= 1:2.5
23 BuildRequires:  python-distribute
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-devel >= 1:3.2
27 BuildRequires:  python3-modules >= 1:3.2
28 BuildRequires:  python3-distribute
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 %{__python} setup.py build \
82         --build-base build-2
83 %endif
84
85 %if %{with python3}
86 %{__python3} setup.py 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 %{__python} setup.py \
100         build --build-base build-2 \
101         install \
102         --root=$RPM_BUILD_ROOT \
103         --optimize=2
104
105 %py_postclean
106 %endif
107
108 %if %{with python3}
109 %{__python3} -- setup.py \
110         build --build-base build-3 \
111         install \
112         --root=$RPM_BUILD_ROOT \
113         --optimize=2
114
115 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/py/test.py
116 %endif
117
118 %clean
119 rm -rf $RPM_BUILD_ROOT
120
121 %if %{with python2}
122 %files
123 %defattr(644,root,root,755)
124 %doc CHANGELOG LICENSE README.txt %{?with_doc:doc/_build/html}
125 %{py_sitescriptdir}/%{module}
126 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
127 %endif
128
129 %if %{with python3}
130 %files -n python3-py
131 %defattr(644,root,root,755)
132 %doc CHANGELOG LICENSE README.txt %{?with_doc:doc/_build/html}
133 %{py3_sitescriptdir}/%{module}
134 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
135 %endif
This page took 0.173891 seconds and 3 git commands to generate.