summaryrefslogtreecommitdiff
path: root/python-unicodecsv.spec
blob: 85e74b52b0d53b7599a7172238f72d8410ddf076 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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