]>
Commit | Line | Data |
---|---|---|
1f6eff4f | 1 | # |
c8db3568 | 2 | # Conditional build: |
c8db3568 JP |
3 | %bcond_without python2 # CPython 2.x module |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | %define module ruamel.yaml.clib | |
1f6eff4f JB |
7 | Summary: C version of reader, parser and emitter for ruamel.yaml |
8 | Summary(pl.UTF-8): Wersja C biblioteki do odczytu, analizy i tworzenia YAML-a dla ruamel.yaml | |
c8db3568 JP |
9 | Name: python-%{module} |
10 | Version: 0.2.0 | |
1f6eff4f | 11 | Release: 3 |
c8db3568 JP |
12 | License: MIT |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/ruamel.yaml.clib/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/r/ruamel.yaml.clib/%{module}-%{version}.tar.gz | |
16 | # Source0-md5: d188d050399426dd3ce4dd91a5f06518 | |
17 | URL: https://pypi.org/project/ruamel.yaml.clib/ | |
18 | BuildRequires: rpm-pythonprov | |
19 | BuildRequires: rpmbuild(macros) >= 1.714 | |
20 | %if %{with python2} | |
1f6eff4f JB |
21 | BuildRequires: python-modules >= 1:2.7 |
22 | BuildRequires: python-setuptools >= 28.7.0 | |
c8db3568 JP |
23 | %endif |
24 | %if %{with python3} | |
1f6eff4f JB |
25 | BuildRequires: python3-modules >= 1:3.5 |
26 | BuildRequires: python3-setuptools >= 28.7.0 | |
c8db3568 | 27 | %endif |
1f6eff4f JB |
28 | Requires: python-modules >= 1:2.7 |
29 | # for dir | |
30 | Requires: python-ruamel.base | |
c8db3568 JP |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
32 | ||
33 | %description | |
34 | C version of reader, parser and emitter for ruamel.yaml derived from | |
35 | libyaml. | |
36 | ||
1f6eff4f JB |
37 | %description -l pl.UTF-8 |
38 | Wersja C biblioteki do odczytu, analizy i tworzenia YAML-a dla | |
39 | ruamel.yaml, wywodząca się z libyaml. | |
40 | ||
c8db3568 | 41 | %package -n python3-%{module} |
1f6eff4f JB |
42 | Summary: C version of reader, parser and emitter for ruamel.yaml |
43 | Summary(pl.UTF-8): Wersja C biblioteki do odczytu, analizy i tworzenia YAML-a ruamel.yaml | |
c8db3568 | 44 | Group: Libraries/Python |
1f6eff4f JB |
45 | Requires: python3-modules >= 1:3.5 |
46 | # for dir | |
47 | Requires: python3-ruamel.base | |
c8db3568 JP |
48 | |
49 | %description -n python3-%{module} | |
50 | C version of reader, parser and emitter for ruamel.yaml derived from | |
51 | libyaml. | |
52 | ||
1f6eff4f JB |
53 | %description -n python3-%{module} -l pl.UTF-8 |
54 | Wersja C biblioteki do odczytu, analizy i tworzenia YAML-a dla | |
55 | ruamel.yaml, wywodząca się z libyaml. | |
56 | ||
c8db3568 JP |
57 | %prep |
58 | %setup -q -n %{module}-%{version} | |
59 | ||
60 | %build | |
61 | %if %{with python2} | |
1f6eff4f | 62 | %py_build |
c8db3568 JP |
63 | %endif |
64 | ||
65 | %if %{with python3} | |
1f6eff4f | 66 | %py3_build |
c8db3568 JP |
67 | %endif |
68 | ||
69 | %install | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | %if %{with python2} | |
73 | %py_install | |
74 | ||
75 | %py_postclean | |
76 | %endif | |
77 | ||
78 | %if %{with python3} | |
79 | %py3_install | |
80 | %endif | |
81 | ||
82 | %clean | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
85 | %if %{with python2} | |
86 | %files | |
87 | %defattr(644,root,root,755) | |
1f6eff4f | 88 | %doc LICENSE README.rst |
c8db3568 | 89 | %attr(755,root,root) %{py_sitedir}/_ruamel_yaml.so |
1f6eff4f | 90 | %dir %{py_sitedir}/ruamel/yaml |
c8db3568 | 91 | %{py_sitedir}/ruamel/yaml/clib |
1f6eff4f | 92 | %{py_sitedir}/ruamel.yaml.clib-%{version}-py*.egg-info |
c8db3568 JP |
93 | %endif |
94 | ||
95 | %if %{with python3} | |
96 | %files -n python3-%{module} | |
97 | %defattr(644,root,root,755) | |
1f6eff4f | 98 | %doc LICENSE README.rst |
c8db3568 | 99 | %attr(755,root,root) %{py3_sitedir}/_ruamel_yaml.cpython-*.so |
1f6eff4f | 100 | %dir %{py3_sitedir}/ruamel/yaml |
c8db3568 | 101 | %{py3_sitedir}/ruamel/yaml/clib |
1f6eff4f | 102 | %{py3_sitedir}/ruamel.yaml.clib-%{version}-py*.egg-info |
c8db3568 | 103 | %endif |