]> git.pld-linux.org Git - packages/python-docopt.git/blame - python-docopt.spec
rebuild with python 3.10
[packages/python-docopt.git] / python-docopt.spec
CommitLineData
d0fc539f
JR
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module docopt
8Summary: Pythonic argument parser, that will make you smile
00ba8915 9Summary(pl.UTF-8): Przyjemny pythonowy parser argumentów
d0fc539f
JR
10Name: python-%{module}
11Version: 0.6.2
8044432c 12Release: 12
d0fc539f
JR
13License: MIT
14Group: Libraries/Python
00ba8915
JB
15#Source0Download: https://pypi.org/simple/docopt/
16Source0: https://files.pythonhosted.org/packages/source/d/docopt/%{module}-%{version}.tar.gz
d0fc539f
JR
17# Source0-md5: 4bc74561b37fad5d3e7d037f82a4c3b1
18URL: http://docopt.org/
d0fc539f 19%if %{with python2}
00ba8915
JB
20BuildRequires: python-modules >= 1:2.5
21BuildRequires: python-setuptools
d0fc539f
JR
22%endif
23%if %{with python3}
00ba8915
JB
24BuildRequires: python3-modules >= 1:3.2
25BuildRequires: python3-setuptools
d0fc539f 26%endif
00ba8915
JB
27BuildRequires: rpm-pythonprov
28BuildRequires: rpmbuild(macros) >= 1.714
29BuildRequires: sed >= 4.0
30Requires: python-modules >= 1:2.5
d0fc539f
JR
31BuildArch: noarch
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35docopt creates beautiful command-line interfaces.
36
00ba8915
JB
37%description -l pl.UTF-8
38docopt tworzy ładne interfejsy linii poleceń.
39
d0fc539f
JR
40%package -n python3-%{module}
41Summary: Pythonic argument parser, that will make you smile
00ba8915 42Summary(pl.UTF-8): Przyjemny pythonowy parser argumentów
d0fc539f 43Group: Libraries/Python
00ba8915 44Requires: python3-modules >= 1:3.2
d0fc539f
JR
45
46%description -n python3-%{module}
47docopt creates beautiful command-line interfaces.
48
00ba8915
JB
49%description -n python3-%{module} -l pl.UTF-8
50docopt tworzy ładne interfejsy linii poleceń.
51
d0fc539f
JR
52%prep
53%setup -q -n %{module}-%{version}
54
d0fc539f
JR
55%build
56%if %{with python2}
00ba8915 57%py_build
d0fc539f
JR
58%endif
59
60%if %{with python3}
00ba8915 61%py3_build
d0fc539f
JR
62%endif
63
64%install
65rm -rf $RPM_BUILD_ROOT
66
67%if %{with python2}
26555c57 68%py_install
d0fc539f
JR
69
70%py_postclean
71%endif
72
73%if %{with python3}
26555c57 74%py3_install
d0fc539f
JR
75%endif
76
d0fc539f
JR
77%if %{with python2}
78install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
79cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
00ba8915 80%{__sed} -i -e '1s,/usr/bin/env python,%{__python},' $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/git/git.py
d0fc539f
JR
81%endif
82%if %{with python3}
83install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
84cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
00ba8915 85%{__sed} -i -e '1s,/usr/bin/env python,%{__python},' $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}/git/git.py
d0fc539f
JR
86%endif
87
88%clean
89rm -rf $RPM_BUILD_ROOT
90
91%if %{with python2}
92%files
93%defattr(644,root,root,755)
00ba8915
JB
94%doc LICENSE-MIT README.rst
95%{py_sitescriptdir}/docopt.py[co]
96%{py_sitescriptdir}/docopt-%{version}-py*.egg-info
d0fc539f
JR
97%{_examplesdir}/%{name}-%{version}
98%endif
99
100%if %{with python3}
101%files -n python3-%{module}
102%defattr(644,root,root,755)
00ba8915
JB
103%doc LICENSE-MIT README.rst
104%{py3_sitescriptdir}/__pycache__/docopt.cpython-*.py[co]
105%{py3_sitescriptdir}/docopt.py
106%{py3_sitescriptdir}/docopt-%{version}-py*.egg-info
d0fc539f
JR
107%{_examplesdir}/python3-%{module}-%{version}
108%endif
This page took 0.106325 seconds and 4 git commands to generate.