3 %bcond_with doc # build doc
4 %bcond_without tests # do not perform "make test"
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 Summary: Library to enforce positional or key-word arguments
9 Name: python-positional
13 Group: Libraries/Python
14 Source0: https://files.pythonhosted.org/packages/source/p/positional/positional-%{version}.tar.gz
15 # Source0-md5: 4afcffd8e2ba733fd7a50f137a2ee893
16 URL: https://pypi.python.org/pypi/positional
17 BuildRequires: rpm-pythonprov
18 BuildRequires: rpmbuild(macros) >= 1.714
20 BuildRequires: python-pbr
21 BuildRequires: python-setuptools
24 BuildRequires: python3-pbr
25 BuildRequires: python3-setuptools
27 Requires: python-modules
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 positional provides a decorator which enforces only some args may be
33 passed positionally. The idea and some of the code was taken from the
34 oauth2 client of the google-api client.
36 %package -n python3-positional
37 Summary: Library to enforce positional or key-word arguments
38 Group: Libraries/Python
39 Requires: python3-modules
41 %description -n python3-positional
42 positional provides a decorator which enforces only some args may be
43 passed positionally. The idea and some of the code was taken from the
44 oauth2 client of the google-api client.
47 %setup -q -n positional-%{version}
51 %py_build %{?with_tests:test}
52 rm -rf .testrepository
56 %py3_build %{?with_tests:test}
62 rm -rf _build/html/_sources
66 rm -rf $RPM_BUILD_ROOT
71 # when files are installed in other way that standard 'setup.py
72 # they need to be (re-)compiled
73 # change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
74 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
75 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
85 rm -rf $RPM_BUILD_ROOT
89 %defattr(644,root,root,755)
90 %doc AUTHORS ChangeLog README.rst
91 %{py_sitescriptdir}/positional
92 %{py_sitescriptdir}/positional-%{version}-py*.egg-info
96 %files -n python3-positional
97 %defattr(644,root,root,755)
98 %doc AUTHORS ChangeLog README.rst
99 %{py3_sitescriptdir}/positional
100 %{py3_sitescriptdir}/positional-%{version}-py*.egg-info
105 %defattr(644,root,root,755)
106 %doc docs/_build/html/*