911091c
%{?python_enable_dependency_generator}
f299e13
%global pypi_name csvkit
7a656d8
%global project_owner wireservice
f299e13
%global github_name csvkit
f299e13
%global desc csvkit is a suite of utilities for converting to and working with CSV, the king \
f299e13
of tabular file formats.
f299e13
f299e13
f299e13
Name:           python-%{pypi_name}
d1c181e
Version:        1.0.7
d0dba92
Release:        3%{?dist}
7a656d8
Summary:        Suite of utilities for converting to and working with CSV
f299e13
f299e13
License:        MIT
f299e13
URL:            https://pypi.python.org/pypi/%{pypi_name}
f9838d9
Source0:        https://github.com/wireservice/csvkit/archive/%{version}/csvkit-%{version}.tar.gz
f299e13
f299e13
BuildArch:      noarch
f299e13
f299e13
%description
f299e13
%{desc}
f299e13
f299e13
f299e13
%package -n     python3-%{pypi_name}
7a656d8
Summary:        %{summary}
b9c8be9
BuildRequires: make
f299e13
BuildRequires:  python3-devel
911091c
BuildRequires:  python3-setuptools
7a656d8
BuildRequires:  %{py3_dist nose}
911091c
BuildRequires:  %{py3_dist agate} >= 1.6.1
911091c
BuildRequires:  %{py3_dist agate-excel} >= 0.2.2
2590ea4
BuildRequires:  %{py3_dist agate-dbf} >= 0.2
911091c
BuildRequires:  %{py3_dist agate-sql} >= 0.5.3
7a656d8
BuildRequires:  %{py3_dist six} >= 1.6.1
f299e13
%{?python_provide:%python_provide python3-%{pypi_name}}
f299e13
f299e13
%description -n python3-%{pypi_name}
f299e13
%{desc}
f299e13
f299e13
f299e13
%package doc
f299e13
BuildRequires:  python-sphinx-doc
3f50e9d
BuildRequires:  python3-sphinx_rtd_theme
7a656d8
Summary:        %{summary}
f299e13
f299e13
%description doc
f299e13
%{desc}
f299e13
f299e13
Documentation package
f299e13
f299e13
%prep
7a656d8
%setup -q -n %{github_name}-%{version}
f299e13
rm -rf *.egg-info
f299e13
# Fix non-executable-script
f299e13
find csvkit -name \*.py -type f | xargs sed -i '1{\@^#!/usr/bin/env python@d}'
f299e13
f299e13
f299e13
%build
f299e13
%py3_build
f299e13
f299e13
cd docs
f299e13
make html
f299e13
make man
f299e13
f299e13
f299e13
%install
f299e13
%py3_install
f299e13
f299e13
mkdir -p %{buildroot}%{_mandir}/man1
f299e13
for file in docs/_build/man/*.1; do
f299e13
    install -p -m0644 ${file} %{buildroot}%{_mandir}/man1/
f299e13
done
f299e13
f299e13
# Remove useful files in doc
f299e13
rm docs/_build/html/.buildinfo
f299e13
f299e13
# Correct permissions in doc
f299e13
chmod -x examples/realdata/census_2000/VROUTFSJ.TXt
f299e13
f299e13
f299e13
%check
d1c181e
# This tests fails because of local error.
d1c181e
nosetests-%{python3_version} tests -v --exclude=test_convert_dbf
f299e13
3f50e9d
%files -n python3-%{pypi_name}
f299e13
%license COPYING
7a656d8
%doc README.rst CHANGELOG.rst AUTHORS.rst
f299e13
%{_bindir}/*
f299e13
%{_mandir}/man1/*
f299e13
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
f299e13
%{python3_sitelib}/%{pypi_name}/
f299e13
78fb4e9
f299e13
%files doc
f299e13
%license COPYING
7a656d8
%doc README.rst CHANGELOG.rst AUTHORS.rst docs/_build/html examples
f299e13
78fb4e9
f299e13
%changelog
d0dba92
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.7-3
d0dba92
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
d0dba92
f822521
* Thu Jun 30 2022 Julien Enselme <jujens@jujens.eu> - 1.0.7-2
f822521
- Rebuilt for Python 3.11
f822521
f822521
* Sat Jun 18 2022 Julien Enselme <jujens@jujens.eu> - 1.0.7-1
d1c181e
- Update to 1.0.7
d1c181e
75e70fa
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-11
75e70fa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
75e70fa
c335f82
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-10
c335f82
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
c335f82
a655692
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.0.4-9
a655692
- Rebuilt for Python 3.10
a655692
eddb374
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-8
eddb374
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
eddb374
bab35ae
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-7
bab35ae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
bab35ae
b2bdaad
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0.4-6
b2bdaad
- Rebuilt for Python 3.9
b2bdaad
bb26799
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-5
bb26799
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
bb26799
143f0fe
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.4-4
143f0fe
- Rebuilt for Python 3.8
143f0fe
cc5e56e
* Thu Aug 01 2019 Julien Enselme <jujens@jujens.eu> - 1.0.4-3
cc5e56e
- Fix tests for mass rebuild.
cc5e56e
d682d69
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-2
d682d69
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
d682d69
f9838d9
* Sat Mar 23 2019 Julien Enselme <jujens@jujens.eu> - 1.0.4-1
f9838d9
- Update to 1.0.4
f9838d9
f4ead51
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-6
f4ead51
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
f4ead51
911091c
* Sat Dec 29 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.0.3-5
911091c
- Enable python dependency generator
911091c
3f50e9d
* Fri Dec 28 2018 Julien Enselme <jujens@jujens.eu> - 1.0.3-4
3f50e9d
- Remove Python 2 subpackage.
3f50e9d
fa208e9
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-3
fa208e9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
fa208e9
1fcdda5
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0.3-2
1fcdda5
- Rebuilt for Python 3.7
1fcdda5
d3caf42
* Mon Mar 12 2018 Julien Enselme <jujens@jujens.eu> - 1.0.3-1
d3caf42
- Update to 1.0.3
d3caf42
0a1bdfc
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-4
0a1bdfc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
0a1bdfc
eb73fe8
* Mon Jan 29 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.0.2-3
eb73fe8
- Update Python 2 dependency declarations to new packaging standards
eb73fe8
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
eb73fe8
a75f9c4
* Tue Jan 16 2018 Julien Enselme <jujens@jujens.eu> - 1.0.2-2
a75f9c4
- Add missing dependency
a75f9c4
7a656d8
* Sun  Oct 15 2017 Julien Enselme <jujens@jujens.eu> - 1.0.2-1
7a656d8
- Update to 1.0.2
7a656d8
- Use the %%{summary} macro
7a656d8
- Use the %%py2_dist and %%py3_dist macros
7a656d8
- Use the version instead of git tag to fetch the source on github
7a656d8
1ac67e5
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-11.gitbf18815
1ac67e5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
1ac67e5
4ed1b7f
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-10.gitbf18815
4ed1b7f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
4ed1b7f
78fb4e9
* Mon Dec 26 2016 Julien Enselme <jujens@jujens.eu> - 0.9.1-9.gitbf18815
78fb4e9
- Fix XLSX reader
78fb4e9
8ebe977
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.9.1-8.gitbf18815
8ebe977
- Rebuild for Python 3.6
8ebe977
2935179
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-7.gitbf18815
2935179
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
2935179
d99dc78
* Mon Jul 11 2016 Julien Enselme <jujens@jujens.eu> - 0.9.1-6.gitbf18815
d99dc78
- Correct typo in comment
d99dc78
f299e13
* Sat Feb 6 2016 Julien Enselme <jujens@jujens.eu> - 0.9.1-5.gitbf18815
f299e13
- Correct some rpmlint warnings
f299e13
f299e13
* Sun Jan 24 2016 Julien Enselme <jujens@jujens.eu> - 0.9.1-4.gitbf18815
f299e13
- Correct build on rawhide.
f299e13
f299e13
* Sun Jan 24 2016 Julien Enselme <jujens@jujens.eu> - 0.9.1-3.gitbf18815
f299e13
- Move unversionned binaries to python2 subpackage.
f299e13
f299e13
* Wed Nov 25 2015 Julien Enselme <jujens@jujens.eu> - 0.9.1-2.gitbf18815
f299e13
- Add python-enum34 to the Requires for python 2 subpackage
f299e13
f299e13
* Mon Nov 9 2015 Julien Enselme <jujens@jujens.eu> - 0.9.1-1.gitbf18815
f299e13
- Inital package