3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
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}
12 # before STBR, ensure docker-compose is updated:
13 # pythonegg(texttable) < 0.10 is needed by docker-compose-1.19.0-1.noarch
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
23 BuildRequires: python-modules
24 BuildRequires: python-setuptools
27 BuildRequires: python3-modules
28 BuildRequires: python3-setuptools
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 Python module to generate a formatted text table, using ASCII
37 %package -n python3-%{module}
38 Summary: Python module to generate a formatted text table, using ASCII characters
39 Group: Libraries/Python
41 %description -n python3-%{module}
42 Python module to generate a formatted text table, using ASCII
46 %setup -q -n %{pypi_name}-%{version}
58 rm -rf $RPM_BUILD_ROOT
69 rm -rf $RPM_BUILD_ROOT
73 %defattr(644,root,root,755)
75 %{py_sitescriptdir}/%{module}.py[co]
76 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
80 %files -n python3-%{module}
81 %defattr(644,root,root,755)
83 %{py3_sitescriptdir}/%{module}.py
84 %{py3_sitescriptdir}/__pycache__/%{module}.*.pyc
85 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info