2 %bcond_with tests # unit tests
3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 %define module ruamel.yaml.clib
7 Summary: C version of reader, parser and emitter for ruamel.yaml derived from libyaml
12 Group: Libraries/Python
13 #Source0Download: https://pypi.org/simple/ruamel.yaml.clib/
14 Source0: https://files.pythonhosted.org/packages/source/r/ruamel.yaml.clib/%{module}-%{version}.tar.gz
15 # Source0-md5: d188d050399426dd3ce4dd91a5f06518
16 URL: https://pypi.org/project/ruamel.yaml.clib/
17 BuildRequires: rpm-pythonprov
18 BuildRequires: rpmbuild(macros) >= 1.714
20 BuildRequires: python-modules
21 BuildRequires: python-setuptools
24 BuildRequires: python3-modules
25 BuildRequires: python3-setuptools
27 Requires: python-modules
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 C version of reader, parser and emitter for ruamel.yaml derived from
34 %package -n python3-%{module}
35 Summary: C version of reader, parser and emitter for ruamel.yaml derived from libyaml
36 Group: Libraries/Python
37 Requires: python3-modules
39 %description -n python3-%{module}
40 C version of reader, parser and emitter for ruamel.yaml derived from
44 %setup -q -n %{module}-%{version}
48 %py_build %{?with_tests:test}
52 %py3_build %{?with_tests:test}
56 rm -rf $RPM_BUILD_ROOT
69 rm -rf $RPM_BUILD_ROOT
73 %defattr(644,root,root,755)
75 %attr(755,root,root) %{py_sitedir}/_ruamel_yaml.so
76 %{py_sitedir}/ruamel/yaml/clib
77 %{py_sitedir}/%{module}-%{version}-py*.egg-info
81 %files -n python3-%{module}
82 %defattr(644,root,root,755)
84 %attr(755,root,root) %{py3_sitedir}/_ruamel_yaml.cpython-*.so
85 %{py3_sitedir}/ruamel/yaml/clib
86 %{py3_sitedir}/%{module}-%{version}-py*.egg-info