]> git.pld-linux.org Git - SPECS.git/blob - python-ago.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / python-ago.spec
1 #
2 # Conditional build:
3 %bcond_without  python2         # Python 2.x module
4 %bcond_without  python3         # Python 3.x module
5 #
6 %define module  ago
7 #
8 Summary:        Makes customizable human readable timedeltas
9 Summary(pl.UTF-8):      Konfigurowalne, czytelne dla człowieka różnice czasu
10 Name:           python-ago
11 Version:        0.0.6
12 Release:        12
13 License:        Public Domain
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/ago/
16 Source0:        https://files.pythonhosted.org/packages/source/a/ago/ago-%{version}.tar.gz
17 # Source0-md5:  e2fdc21fb922b4fc21ec19c6eac6bd46
18 Patch0:         ago-python3.patch
19 URL:            https://bitbucket.org/russellballestrini/ago/overview
20 %if %{with python2}
21 BuildRequires:  python-devel
22 BuildRequires:  python-modules
23 BuildRequires:  python-setuptools
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-2to3
27 BuildRequires:  python3-devel
28 BuildRequires:  python3-modules
29 BuildRequires:  python3-setuptools
30 %endif
31 BuildRequires:  rpm-pythonprov
32 BuildRequires:  rpmbuild(macros) >= 1.714
33 Requires:       python-modules
34 BuildArch:      noarch
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 Makes customizable human readable timedeltas.
39
40 %description -l pl.UTF-8
41 Konfigurowalne, czytelne dla człowieka różnice czasu.
42
43 %package -n python3-%{module}
44 Summary:        Makes customizable human readable timedeltas
45 Summary(pl.UTF-8):      Konfigurowalne, czytelne dla człowieka różnice czasu
46 Group:          Libraries/Python
47 Requires:       python3-modules
48
49 %description -n python3-%{module}
50 Makes customizable human readable timedeltas.
51
52 %description -n python3-%{module} -l pl.UTF-8
53 Konfigurowalne, czytelne dla człowieka różnice czasu.
54
55 %prep
56 %setup -q -n ago-%{version}
57 %patch0 -p1
58
59 %build
60 %if %{with python2}
61 %py_build
62 %endif
63
64 %if %{with python3}
65 %py3_build
66 %endif
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70
71 %if %{with python2}
72 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
73 %py_install
74 %endif
75
76 %if %{with python3}
77 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
78 %py3_install
79 %endif
80
81 %clean
82 rm -rf $RPM_BUILD_ROOT
83
84 %if %{with python2}
85 %files
86 %defattr(644,root,root,755)
87 %doc PKG-INFO README.rst
88 %{_examplesdir}/python-%{module}-%{version}
89 %{py_sitescriptdir}/%{module}.py*
90 %{py_sitescriptdir}/*egg-info
91 %endif
92
93 %if %{with python3}
94 %files -n python3-%{module}
95 %defattr(644,root,root,755)
96 %doc PKG-INFO README.rst
97 %{_examplesdir}/python3-%{module}-%{version}
98 %{py3_sitescriptdir}/%{module}.py*
99 %{py3_sitescriptdir}/__pycache__/ago.cpython-*.py*
100 %{py3_sitescriptdir}/*egg-info
101 %endif
This page took 0.143099 seconds and 3 git commands to generate.