]> git.pld-linux.org Git - packages/python-PyYAML.git/blame - python-PyYAML.spec
- release 7 (by relup.sh)
[packages/python-PyYAML.git] / python-PyYAML.spec
CommitLineData
13e61da0 1#
fbdd132f
JK
2# TODO:
3# - the name should be python-yaml (used via 'import yaml')
4#
2b919d02
MK
5
6%bcond_without python2 # CPython 2.x module
7%bcond_without python3 # CPython 3.x module
8
13e61da0 9%define module PyYAML
10%define module_dir yaml
11#
90897fb0
JB
12Summary: YAML parser and emitter module for Python 2
13Summary(pl.UTF-8): Analizator i generator formatu YAML dla języka Python 2
13e61da0 14Name: python-%{module}
2b919d02 15Version: 3.11
fc605b92 16Release: 7
13e61da0 17License: MIT
18Group: Libraries/Python
19Source0: http://pyyaml.org/download/pyyaml/%{module}-%{version}.tar.gz
2b919d02 20# Source0-md5: f50e08ef0fe55178479d3a618efe21db
13e61da0 21URL: http://pyyaml.org/
2b919d02
MK
22BuildRequires: yaml-devel
23%if %{with python2}
51c8cbd4 24BuildRequires: python-devel
25BuildRequires: rpm-pythonprov
d665513c 26BuildRequires: rpmbuild(macros) >= 1.710
2b919d02
MK
27Requires: python-modules
28%endif
29%if %{with python3}
90897fb0 30BuildRequires: python3-devel >= 1:3.2
2b919d02
MK
31BuildRequires: python3-modules
32%endif
13e61da0 33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36YAML is a data serialization format designed for human readability and
bd46405f 37interaction with scripting languages. PyYAML is a YAML parser and
13e61da0 38emitter for Python.
39
40PyYAML features a complete YAML 1.1 parser, Unicode support, pickle
bd46405f 41support, capable extension API, and sensible error messages. PyYAML
cae94bd0
JB
42supports standard YAML tags and provides Python-specific tags that
43allow to represent an arbitrary Python object.
13e61da0 44
cae94bd0
JB
45PyYAML is applicable for a broad range of tasks from complex
46configuration files to object serialization and persistance.
13e61da0 47
48%description -l pl.UTF-8
804a2d56
MB
49YAML jest formatem serializacji danych czytelnym dla człowieka,
50zaprojektowanym do interakcji w językach skryptowych. PyYAML jest
51analizatorem i generatorem tego formatu dla języka Python.
13e61da0 52
d8c168b1 53PyYAML posiada obsługę pełnej analizy YAML 1.1, Unicode, serializację
54poprzez piklowanie, rozszerzalne API oraz zrozumiałe komunikaty
55błędów. Obsługuje standardowe znaczniki YAML i dostarcza nowe,
56specyficzne dla języka Python, pozwalające na reprezentację jego
57obiektów.
13e61da0 58
d8c168b1 59PyYAML może być użyty w szerokiej gamie zastosowań, od złożonych
60plików konfiguracyjnych po serializację i przechowywanie obiektów.
13e61da0 61
90897fb0
JB
62%package -n python3-%{module}
63Summary: YAML parser and emitter module for Python 3
64Summary(pl.UTF-8): Analizator i generator formatu YAML dla języka Python 3
65Group: Libraries/Python
66
67%description -n python3-%{module}
68PyYAML features a complete YAML 1.1 parser, Unicode support, pickle
69support, capable extension API, and sensible error messages. PyYAML
70supports standard YAML tags and provides Python-specific tags that
71allow to represent an arbitrary Python object.
72
73%description -n python3-%{module} -l pl.UTF-8
74PyYAML posiada obsługę pełnej analizy YAML 1.1, Unicode, serializację
75poprzez piklowanie, rozszerzalne API oraz zrozumiałe komunikaty
76błędów. Obsługuje standardowe znaczniki YAML i dostarcza nowe,
77specyficzne dla języka Python, pozwalające na reprezentację jego
78obiektów.
79
13e61da0 80%prep
81%setup -q -n %{module}-%{version}
82
83%build
2b919d02
MK
84%if %{with python2}
85CC="%{__cc}" \
86CFLAGS="%{rpmcflags}" \
87%{__python} setup.py --with-libyaml build --build-base build-2 %{?with_tests:test}
88%endif
89%if %{with python3}
90CC="%{__cc}" \
91CFLAGS="%{rpmcflags}" \
92%{__python3} setup.py --with-libyaml build --build-base build-3 %{?with_tests:test}
93%endif
13e61da0 94
95%install
96rm -rf $RPM_BUILD_ROOT
2b919d02 97%if %{with python2}
c9228ae5 98%py_install
13e61da0 99%py_postclean
2b919d02
MK
100%endif
101%if %{with python3}
c9228ae5 102%py3_install
2b919d02
MK
103%endif
104%py_postclean
90897fb0 105
2b919d02
MK
106install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
107cp -p examples/yaml-highlight/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
13e61da0 108
109%clean
110rm -rf $RPM_BUILD_ROOT
111
2b919d02 112%if %{with python2}
13e61da0 113%files
114%defattr(644,root,root,755)
115%doc README
bd46405f 116%dir %{py_sitedir}/%{module_dir}
334d8e32 117%attr(755,root,root) %{py_sitedir}/_yaml.so
bd46405f 118%{py_sitedir}/%{module_dir}/*.py[co]
51c8cbd4 119%if "%{py_ver}" > "2.4"
90897fb0 120%{py_sitedir}/PyYAML-%{version}-py*.egg-info
51c8cbd4 121%endif
13e61da0 122%{_examplesdir}/%{name}-%{version}
2b919d02
MK
123%endif
124
125%if %{with python3}
126%files -n python3-%{module}
127%defattr(644,root,root,755)
128%doc README
129%dir %{py3_sitedir}/%{module_dir}
130%{py3_sitedir}/%{module_dir}/*.py
90897fb0 131%{py3_sitedir}/%{module_dir}/__pycache__
3d56cc9a 132%attr(755,root,root) %{py3_sitedir}/_yaml.cpython-*.so
90897fb0 133%{py3_sitedir}/PyYAML-%{version}-py*.egg-info
2b919d02 134%endif
This page took 0.11605 seconds and 4 git commands to generate.