]> git.pld-linux.org Git - SPECS.git/blob - python-texttable.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-texttable.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 %define         module          texttable
7 %define         egg_name        texttable
8 %define         pypi_name       texttable
9 Summary:        Python module to generate a formatted text table, using ASCII characters
10 Name:           python-%{pypi_name}
11 Version:        1.2.1
12 # before STBR, ensure docker-compose is updated:
13 # pythonegg(texttable) < 0.10 is needed by docker-compose-1.19.0-1.noarch
14 Release:        3
15 License:        LGPL v2+
16 Group:          Libraries/Python
17 Source0:        https://files.pythonhosted.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
18 # Source0-md5:  7761da214368903c2409c13f1280cffe
19 URL:            https://pypi.python.org/pypi/texttable/
20 BuildRequires:  rpm-pythonprov
21 BuildRequires:  rpmbuild(macros) >= 1.714
22 %if %{with python2}
23 BuildRequires:  python-modules
24 BuildRequires:  python-setuptools
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-modules
28 BuildRequires:  python3-setuptools
29 %endif
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 Python module to generate a formatted text table, using ASCII
35 characters
36
37 %package -n python3-%{module}
38 Summary:        Python module to generate a formatted text table, using ASCII characters
39 Group:          Libraries/Python
40
41 %description -n python3-%{module}
42 Python module to generate a formatted text table, using ASCII
43 characters
44
45 %prep
46 %setup -q -n %{pypi_name}-%{version}
47
48 %build
49 %if %{with python2}
50 %py_build
51 %endif
52
53 %if %{with python3}
54 %py3_build
55 %endif
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 %if %{with python2}
60 %py_install
61 %py_postclean
62 %endif
63
64 %if %{with python3}
65 %py3_install
66 %endif
67
68 %clean
69 rm -rf $RPM_BUILD_ROOT
70
71 %if %{with python2}
72 %files
73 %defattr(644,root,root,755)
74 %doc README.md
75 %{py_sitescriptdir}/%{module}.py[co]
76 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
77 %endif
78
79 %if %{with python3}
80 %files -n python3-%{module}
81 %defattr(644,root,root,755)
82 %doc README.md
83 %{py3_sitescriptdir}/%{module}.py
84 %{py3_sitescriptdir}/__pycache__/%{module}.*.pyc
85 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
86 %endif
This page took 0.084794 seconds and 3 git commands to generate.