From b8ff8fc7554ccbc00ddba25e41e00ffc78ecd961 Mon Sep 17 00:00:00 2001 From: Dominika Krejčí Date: Sep 07 2016 10:50:28 +0000 Subject: add Python 3 and update the version --- diff --git a/.gitignore b/.gitignore index 27dcd7c..a4ff0e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /texttable-0.8.1.tar.gz +/texttable-0.8.4.tar.gz diff --git a/python-texttable.spec b/python-texttable.spec index e822c22..e1085a8 100644 --- a/python-texttable.spec +++ b/python-texttable.spec @@ -1,92 +1,77 @@ -%if 0%{?fedora} > 12 -%global with_python3 1 -%else -%{!?python_sitearch: %global python_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} -%endif +%global srcname texttable -# python3 not currently supported upstream, leaving macros in preparation -# for upstream support in the future. -%global with_python3 0 - -%global upstream_name texttable - -Name: python-%{upstream_name} -Version: 0.8.1 -Release: 7%{?dist} +Name: python-%{srcname} +Version: 0.8.4 +Release: 1%{?dist} Summary: Python module to generate a formatted text table, using ASCII characters - Group: Development/Libraries License: LGPLv2+ -URL: http://foutaise.org/code/ -Source0: https://pypi.python.org/packages/source/t/texttable/texttable-0.8.1.tar.gz +URL: https://github.com/foutaise/%{srcname}/ +Source0: https://files.pythonhosted.org/packages/source/t/%{srcname}/%{srcname}-%{version}.tar.gz -Patch0: texttable-0.8.1-remove-main-from-lib.patch +BuildArch: noarch -BuildRequires: python-devel python-setuptools -BuildArch: noarch +%description +Python module to generate a formatted text table, using ASCII characters. -%if 0%{?with_python3} -BuildRequires: python3-devel python3-setuptools -# For /usr/bin/2to3 -BuildRequires: python-tools -%endif # if with_python3 +%package -n python2-%{srcname} +Summary: %{summary} +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-tools +%{?python_provide:%python_provide python2-%{srcname}} -%description -Python module to generate a formatted text table, using ASCII characters +%description -n python2-%{srcname} +Python 2 module to generate a formatted text table, using ASCII characters. -%if 0%{?with_python3} -%package -n python3-%{upstream_name} -Summary: Python module to generate a formatted text table, using ASCII characters -Group: Development/Languages -%description -n python3-%{upstream_name} -Python module to generate a formatted text table, using ASCII characters -%endif #if with_python3 +%package -n python3-%{srcname} +Summary: %{summary} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-tools +%{?python_provide:%python_provide python3-%{srcname}} -%prep -%setup -q -n %{upstream_name}-%{version} +%description -n python3-%{srcname} +Python 3 module to generate a formatted text table, using ASCII characters. -%patch0 -p0 -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -2to3 --write --nobackups %{py3dir} -%endif # with_python3 +%prep +%setup -q -n %{srcname}-%{version} -%build -CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build -%if 0%{?with_python3} -pushd %{py3dir} -CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build -popd -%endif # with_python3 +%build +%py2_build +%py3_build %install rm -rf $RPM_BUILD_ROOT -%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +%py2_install +%py3_install + -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT -popd -%endif # with_python3 +%files -n python2-%{srcname} +%doc PKG-INFO README.md +%license LICENSE +%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info +%{python2_sitelib}/%{srcname}.py* -%files -%doc PKG-INFO -%{python2_sitelib}/texttable* +%files -n python3-%{srcname} +%doc PKG-INFO README.md +%license LICENSE +%{python3_sitelib}/%{srcname}.py +%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info +%{python3_sitelib}/__pycache__/%{srcname}.cpython-%{python3_version_nodots}.* -%if 0%{?with_python3} -%files -n python3-%{upstream_name} -%doc PKG-INFO -%{python3_sitelib}/texttable* -%endif # with_python3 %changelog +* Mon Jul 25 2016 Dominika Krejci - 0.8.4-1 +- Add Python 3 +- Update to 0.8.4 + * Tue Jul 19 2016 Fedora Release Engineering - 0.8.1-7 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages diff --git a/sources b/sources index 6218ff4..1697339 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4fe37704f16ecf424b91e122defedd7e texttable-0.8.1.tar.gz +6335edbe1bb4edacce7c2f76195f6212 texttable-0.8.4.tar.gz