From daaffc0dcdbc47b42877bdc656aab28b908c4f25 Mon Sep 17 00:00:00 2001 From: Haikel Guemar Date: Aug 07 2015 21:14:30 +0000 Subject: Upstream 0.10.0 - Enable python3 subpackage --- diff --git a/.gitignore b/.gitignore index e97839e..35d3a13 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /tablib-0.9.11.20120702git752443f.tar.gz +/tablib-0.10.0.tar.gz diff --git a/python-tablib.spec b/python-tablib.spec index a4007f5..0410cac 100644 --- a/python-tablib.spec +++ b/python-tablib.spec @@ -1,38 +1,23 @@ -%if 0%{?fedora} > 12 || 0%{?rhel} > 6 +%if 0%{?fedora} %global with_python3 1 %endif -# Disable python3 for now since this package is in such a strange state. -%global with_python3 0 - %global modname tablib -%global raw_version 0.9.11 -%global checkout 20120702git752443f Name: python-tablib -Version: %{raw_version}.%{checkout} -Release: 10%{?dist} +Version: 0.10.0 +Release: 1%{?dist} Summary: Format agnostic tabular data library (XLS, JSON, YAML, CSV) -Group: Development/Libraries License: MIT URL: http://github.com/kennethreitz/tablib -Source0: %{modname}-%{version}.tar.gz -# https://github.com/kennethreitz/tablib/pull/68 -Patch0: 0001-Py3-support.patch -Patch1: 0002-Broken-setup.py.patch - +Source0: https://pypi.python.org/packages/source/t/tablib/%{modname}-%{version}.tar.gz BuildArch: noarch - BuildRequires: python2-devel +BuildRequires: python-setuptools Requires: PyYAML -%if 0%{?with_python3} -BuildRequires: python-tools -BuildRequires: python3-devel -%endif - %description Tablib is a format-agnostic tabular dataset library, written in Python. @@ -48,8 +33,10 @@ Output formats supported: %if 0%{?with_python3} %package -n python3-tablib Summary: Format agnostic tabular data library (XLS, JSON, YAML, CSV) -Group: Development/Libraries +BuildRequires: python-tools +BuildRequires: python3-devel +BuildRequires: python3-setuptools Requires: python3-PyYAML %description -n python3-tablib @@ -67,9 +54,7 @@ Output formats supported: %endif %prep -%setup -q -n %{modname} -%patch0 -p1 -b .py3_support -%patch1 -p1 -b .broken_setup_py +%setup -q -n %{modname}-%{version} # Remove shebangs for lib in $(find . -name "*.py"); do @@ -82,24 +67,16 @@ done rm -rf %{py3dir} cp -a . %{py3dir} pushd %{py3dir} -sed -i 's/xlwt/xlwt3/' setup.py -sed -i 's/openpyxl/openpyxl3/' setup.py -sed -i 's/\.yaml/.yaml3/' setup.py - -rm -rf tablib/packages/odf -rm -rf tablib/packages/openpyxl -rm -rf tablib/packages/xlwt -rm -rf tablib/packages/yaml - +sed -i "/\(xlwt\|odf\|xlrd\|openpyxl\|openpyxl\..*\|yaml\)'/d" setup.py find . -name "*.py" | grep -v 3 | xargs 2to3 -w - popd - %endif +sed -i '/tablib.packages.*3/d' setup.py + %build -%{__python} setup.py build +%{__python2} setup.py build %if 0%{?with_python3} pushd %{py3dir} @@ -116,24 +93,29 @@ pushd %{py3dir} popd %endif -%{__python} setup.py install -O1 --skip-build --root=%{buildroot} +%{__python2} setup.py install -O1 --skip-build --root=%{buildroot} %files -%doc README.rst LICENSE AUTHORS HACKING HISTORY.rst NOTICE TODO.rst -%{python_sitelib}/%{modname} -%{python_sitelib}/%{modname}-%{raw_version}* +%license LICENSE +%doc README.rst AUTHORS +%{python2_sitelib}/%{modname} +%{python2_sitelib}/*.egg-info %if 0%{?with_python3} %files -n python3-%{modname} -%doc README.rst LICENSE AUTHORS HACKING HISTORY.rst NOTICE TODO.rst +%license +%doc README.rst AUTHORS %{python3_sitelib}/%{modname} -%{python3_sitelib}/%{modname}-%{raw_version}-* - +%{python3_sitelib}/*.egg-info %endif %changelog +* Wed Aug 05 2015 Haïkel Guémar - 0.10.0-1 +- Upstream 0.10.0 +- Enable python3 subpackage + * Thu Jun 18 2015 Fedora Release Engineering - 0.9.11.20120702git752443f-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index d40453e..d406739 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9cd081ef7715e8b0a19378b0c4eeb4f3 tablib-0.9.11.20120702git752443f.tar.gz +41fb8a731f6ef54812045ef9bf2909c6 tablib-0.10.0.tar.gz