]> git.pld-linux.org Git - packages/python-positional.git/blame - python-positional.spec
- release 2 (by relup.sh)
[packages/python-positional.git] / python-positional.spec
CommitLineData
fab2a203
JK
1#
2# Conditional build:
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
7
8Summary: Library to enforce positional or key-word arguments
9Name: python-positional
2031a809 10Version: 1.2.1
215d3ca8 11Release: 2
fab2a203
JK
12License: Apache
13Group: Libraries/Python
2031a809
JR
14Source0: https://files.pythonhosted.org/packages/source/p/positional/positional-%{version}.tar.gz
15# Source0-md5: 4afcffd8e2ba733fd7a50f137a2ee893
fab2a203
JK
16URL: https://pypi.python.org/pypi/positional
17BuildRequires: rpm-pythonprov
18BuildRequires: rpmbuild(macros) >= 1.714
19%if %{with python2}
20BuildRequires: python-pbr
21BuildRequires: python-setuptools
22%endif
23%if %{with python3}
24BuildRequires: python3-pbr
25BuildRequires: python3-setuptools
26%endif
27Requires: python-modules
28BuildArch: noarch
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32positional provides a decorator which enforces only some args may be
33passed positionally. The idea and some of the code was taken from the
34oauth2 client of the google-api client.
35
36%package -n python3-positional
37Summary: Library to enforce positional or key-word arguments
38Group: Libraries/Python
39Requires: python3-modules
40
41%description -n python3-positional
42positional provides a decorator which enforces only some args may be
43passed positionally. The idea and some of the code was taken from the
44oauth2 client of the google-api client.
45
46%prep
47%setup -q -n positional-%{version}
48
49%build
50%if %{with python2}
51%py_build %{?with_tests:test}
52rm -rf .testrepository
53%endif
54
55%if %{with python3}
56%py3_build %{?with_tests:test}
57%endif
58
59%if %{with doc}
60cd doc
61%{__make} -j1 html
62rm -rf _build/html/_sources
63%endif
64
65%install
66rm -rf $RPM_BUILD_ROOT
67
68%if %{with python2}
69%py_install
70
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}
76
77%py_postclean
78%endif
79
80%if %{with python3}
81%py3_install
82%endif
83
84%clean
85rm -rf $RPM_BUILD_ROOT
86
87%if %{with python2}
88%files
89%defattr(644,root,root,755)
90%doc AUTHORS ChangeLog README.rst
91%{py_sitescriptdir}/positional
92%{py_sitescriptdir}/positional-%{version}-py*.egg-info
93%endif
94
95%if %{with python3}
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
101%endif
102
103%if %{with doc}
104%files apidocs
105%defattr(644,root,root,755)
106%doc docs/_build/html/*
107%endif
This page took 0.12741 seconds and 4 git commands to generate.