]> git.pld-linux.org Git - SPECS.git/blob - python-py.spec
SPECS updated Sat 31 Jul 21:27:02 CEST 2021
[SPECS.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 %bcond_with     tests   # unit tests [fail with pytest 3.0?]
7
8 %define         module  py
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}
12 Version:        1.10.0
13 Release:        3
14 License:        MIT
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/
20 %if %{with python2}
21 BuildRequires:  python-devel >= 1:2.7
22 BuildRequires:  python-setuptools >= 7.0
23 BuildRequires:  python-setuptools_scm
24 %if %{with tests}
25 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
26 BuildRequires:  glibc-localedb-all
27 %endif
28 BuildRequires:  python-pytest >= 2.9.0
29 %endif
30 %endif
31 %if %{with python3}
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
36 %if %{with tests}
37 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
38 BuildRequires:  glibc-localedb-all
39 %endif
40 BuildRequires:  python3-pytest >= 2.9.0
41 %endif
42 %endif
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}
47 BuildArch:      noarch
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %description
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
57
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
65
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
70
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
78
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
86
87 %package apidocs
88 Summary:        Documentation for Python py library
89 Summary(pl.UTF-8):      Dokumentacja do biblioteki Pythona py
90 Group:          Documentation
91
92 %description apidocs
93 Documentation for Python py library.
94
95 %description apidocs -l pl.UTF-8
96 Dokumentacja do biblioteki Pythona py.
97
98 %prep
99 %setup -q -n %{module}-%{version}
100
101 %build
102 %if %{with python2}
103 %py_build
104
105 %if %{with tests}
106 LC_ALL=C.UTF-8 \
107 %{__python} -m pytest testing
108 %endif
109 %endif
110
111 %if %{with python3}
112 %py3_build
113
114 %if %{with tests}
115 LC_ALL=C.UTF-8 \
116 %{__python3} -m pytest testing
117 %endif
118 %endif
119
120 %if %{with doc}
121 PYTHONPATH=$(pwd) \
122 %{__make} -C doc html
123 %endif
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127
128 %if %{with python2}
129 %py_install
130
131 %py_postclean
132 %endif
133
134 %if %{with python3}
135 %py3_install
136 %endif
137
138 %clean
139 rm -rf $RPM_BUILD_ROOT
140
141 %if %{with python2}
142 %files
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
147 %endif
148
149 %if %{with python3}
150 %files -n python3-py
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
155 %endif
156
157 %if %{with doc}
158 %files apidocs
159 %defattr(644,root,root,755)
160 %doc doc/_build/html/{_modules,_static,announce,*.html,*.js}
161 %endif
This page took 0.595653 seconds and 3 git commands to generate.