]>
Commit | Line | Data |
---|---|---|
13e61da0 | 1 | # |
fbdd132f JK |
2 | # TODO: |
3 | # - the name should be python-yaml (used via 'import yaml') | |
4 | # | |
13e61da0 | 5 | %define module PyYAML |
6 | %define module_dir yaml | |
7 | # | |
8 | Summary: YAML parser and emitter module for Python | |
18a8bdfe | 9 | Summary(pl.UTF-8): Analizator i generator formatu YAML dla języka Python |
13e61da0 | 10 | Name: python-%{module} |
d8c168b1 | 11 | Version: 3.10 |
c2377d17 | 12 | Release: 2 |
13e61da0 | 13 | License: MIT |
14 | Group: Libraries/Python | |
15 | Source0: http://pyyaml.org/download/pyyaml/%{module}-%{version}.tar.gz | |
d8c168b1 | 16 | # Source0-md5: 74c94a383886519e9e7b3dd1ee540247 |
13e61da0 | 17 | URL: http://pyyaml.org/ |
51c8cbd4 | 18 | BuildRequires: python-devel |
19 | BuildRequires: rpm-pythonprov | |
13e61da0 | 20 | BuildRequires: rpmbuild(macros) >= 1.219 |
334d8e32 | 21 | BuildRequires: yaml-devel |
cae94bd0 | 22 | %pyrequires_eq python-modules |
13e61da0 | 23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %description | |
26 | YAML is a data serialization format designed for human readability and | |
bd46405f | 27 | interaction with scripting languages. PyYAML is a YAML parser and |
13e61da0 | 28 | emitter for Python. |
29 | ||
30 | PyYAML features a complete YAML 1.1 parser, Unicode support, pickle | |
bd46405f | 31 | support, capable extension API, and sensible error messages. PyYAML |
cae94bd0 JB |
32 | supports standard YAML tags and provides Python-specific tags that |
33 | allow to represent an arbitrary Python object. | |
13e61da0 | 34 | |
cae94bd0 JB |
35 | PyYAML is applicable for a broad range of tasks from complex |
36 | configuration files to object serialization and persistance. | |
13e61da0 | 37 | |
38 | %description -l pl.UTF-8 | |
804a2d56 MB |
39 | YAML jest formatem serializacji danych czytelnym dla człowieka, |
40 | zaprojektowanym do interakcji w językach skryptowych. PyYAML jest | |
41 | analizatorem i generatorem tego formatu dla języka Python. | |
13e61da0 | 42 | |
d8c168b1 | 43 | PyYAML posiada obsługę pełnej analizy YAML 1.1, Unicode, serializację |
44 | poprzez piklowanie, rozszerzalne API oraz zrozumiałe komunikaty | |
45 | błędów. Obsługuje standardowe znaczniki YAML i dostarcza nowe, | |
46 | specyficzne dla języka Python, pozwalające na reprezentację jego | |
47 | obiektów. | |
13e61da0 | 48 | |
d8c168b1 | 49 | PyYAML może być użyty w szerokiej gamie zastosowań, od złożonych |
50 | plików konfiguracyjnych po serializację i przechowywanie obiektów. | |
13e61da0 | 51 | |
52 | %prep | |
53 | %setup -q -n %{module}-%{version} | |
54 | ||
55 | %build | |
d8c168b1 | 56 | %{__python} setup.py --with-libyaml build |
57 | ||
13e61da0 | 58 | |
59 | %install | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
62 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
63 | ||
36aa1d8f | 64 | %{__python} setup.py install \ |
13e61da0 | 65 | --optimize=2 \ |
66 | --root=$RPM_BUILD_ROOT | |
67 | ||
68 | %py_postclean | |
69 | install examples/yaml-highlight/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
70 | ||
71 | %clean | |
72 | rm -rf $RPM_BUILD_ROOT | |
73 | ||
74 | %files | |
75 | %defattr(644,root,root,755) | |
76 | %doc README | |
bd46405f | 77 | %dir %{py_sitedir}/%{module_dir} |
334d8e32 | 78 | %attr(755,root,root) %{py_sitedir}/_yaml.so |
bd46405f | 79 | %{py_sitedir}/%{module_dir}/*.py[co] |
51c8cbd4 | 80 | %if "%{py_ver}" > "2.4" |
bd46405f | 81 | %{py_sitedir}/*.egg-info |
51c8cbd4 | 82 | %endif |
13e61da0 | 83 | %{_examplesdir}/%{name}-%{version} |