summaryrefslogtreecommitdiff
path: root/python-unicodecsv.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python-unicodecsv.spec')
-rw-r--r--python-unicodecsv.spec49
1 files changed, 49 insertions, 0 deletions
diff --git a/python-unicodecsv.spec b/python-unicodecsv.spec
new file mode 100644
index 0000000..85e74b5
--- /dev/null
+++ b/python-unicodecsv.spec
@@ -0,0 +1,49 @@
+%{?scl:%scl_package python-unicodecsv}
+%{!?scl:%global pkg_name %{name}}
+
+Name: %{?scl_prefix}python-unicodecsv
+Version: 0.14.1
+Release: 1%{?dist}
+Summary: Python2's stdlib csv module is nice, but it doesn't support unicode. This module is a drop-in replacement which *does*.
+
+License: BSD License
+URL: https://github.com/jdunck/python-unicodecsv
+Source0: https://pypi.python.org/packages/6f/a4/691ab63b17505a26096608cc309960b5a6bdf39e4ba1a793d5f9b1a53270/unicodecsv-0.14.1.tar.gz
+
+BuildArch: noarch
+
+BuildRequires: %{?scl_prefix}python-devel
+BuildRequires: %{?scl_prefix}python-setuptools
+
+%{?scl:Requires: %{scl}-runtime}
+%{?scl:BuildRequires: %{scl}-runtime}
+
+%description
+Python2's stdlib csv module is nice, but it doesn't support unicode. This module is a drop-in replacement which *does*.
+
+%prep
+%autosetup -n unicodecsv-%{version} -p1
+
+%build
+rm -Rf requirements.txt test-requirements.txt *.egg-info
+%{?scl:scl enable %{scl} - << \EOF}
+PBR_VERSION=%{version} %{__python3} setup.py build
+%{?scl:EOF}
+
+%install
+%{?scl:scl enable %{scl} - << \EOF}
+PBR_VERSION=%{version} %{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+%{?scl:EOF}
+
+%check
+%{?scl:scl enable %{scl} - << \EOF}
+%{__python3} -c "import unicodecsv"
+%{?scl:EOF}
+
+%files
+%defattr(644,root,root,755)
+%{python3_sitelib}/*
+
+%changelog
+* Fri Aug 25 2017 Tristan Cacqueray <tdecacqu@redhat.com> - 0.14.1-1
+- Initial packaging