Hello community,

here is the log from the commit of package speedtest-cli for openSUSE:Factory 
checked in at 2017-11-27 22:17:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/speedtest-cli (Old)
 and      /work/SRC/openSUSE:Factory/.speedtest-cli.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "speedtest-cli"

Mon Nov 27 22:17:56 2017 rev:8 rq:545762 version:1.0.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/speedtest-cli/speedtest-cli.changes      
2017-10-07 17:51:04.214236570 +0200
+++ /work/SRC/openSUSE:Factory/.speedtest-cli.new/speedtest-cli.changes 
2017-11-27 22:17:59.735539629 +0100
@@ -1,0 +2,6 @@
+Sun Nov 26 21:18:49 UTC 2017 - [email protected]
+
+- Update to version 1.0.7:
+  * Support using --csv-delimiter with --csv-header
+
+-------------------------------------------------------------------

Old:
----
  speedtest-cli-1.0.6.tar.gz

New:
----
  speedtest-cli-1.0.7.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ speedtest-cli.spec ++++++
--- /var/tmp/diff_new_pack.Gnsy3Q/_old  2017-11-27 22:18:00.263520465 +0100
+++ /var/tmp/diff_new_pack.Gnsy3Q/_new  2017-11-27 22:18:00.267520320 +0100
@@ -18,14 +18,15 @@
 
 %define oname   speedtest_cli
 Name:           speedtest-cli
-Version:        1.0.6
+Version:        1.0.7
 Release:        0
 Summary:        Command line interface for testing internet bandwidth
 License:        Apache-2.0
 Group:          System/Benchmark
 Url:            https://github.com/sivel/speedtest-cli
 Source0:        
https://github.com/sivel/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
-BuildRequires:  python3-devel
+BuildRequires:  python-rpm-macros
+BuildRequires:  python3-base
 BuildRequires:  python3-setuptools
 Requires:       python3-setuptools
 BuildArch:      noarch
@@ -38,12 +39,14 @@
 %setup -q
 
 %build
-python3 setup.py build
+%python3_build
 
 %install
-python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
-install -D -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
-ln -s %{_mandir}/man1/%{name}.1 %{buildroot}%{_mandir}/man1/speedtest.1
+%python3_install
+install -Dpm 0644 %{name}.1 \
+  %{buildroot}%{_mandir}/man1/%{name}.1
+ln -s %{_mandir}/man1/%{name}.1 \
+  %{buildroot}%{_mandir}/man1/speedtest.1
 
 %files
 %doc LICENSE README.rst
@@ -51,10 +54,6 @@
 %{_bindir}/%{name}
 %{_mandir}/man1/speedtest.1%{ext_man}
 %{_mandir}/man1/%{name}.1%{ext_man}
-%{python3_sitelib}/%{oname}.py
-%{python3_sitelib}/speedtest.py
-%{python3_sitelib}/__pycache__/%{oname}.cpython-*.pyc
-%{python3_sitelib}/__pycache__/speedtest.cpython-*.pyc
-%{python3_sitelib}/%{oname}-%{version}-py%{py3_ver}.egg-info
+%{python3_sitelib}/*
 
 %changelog

++++++ speedtest-cli-1.0.6.tar.gz -> speedtest-cli-1.0.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/speedtest-cli-1.0.6/speedtest.py 
new/speedtest-cli-1.0.7/speedtest.py
--- old/speedtest-cli-1.0.6/speedtest.py        2017-04-25 18:49:26.000000000 
+0200
+++ new/speedtest-cli-1.0.7/speedtest.py        2017-10-16 16:28:35.000000000 
+0200
@@ -36,7 +36,7 @@
     gzip = None
     GZIP_BASE = object
 
-__version__ = '1.0.6'
+__version__ = '1.0.7'
 
 
 class FakeShutdownEvent(object):
@@ -1212,11 +1212,15 @@
     sys.exit(0)
 
 
-def csv_header():
+def csv_header(delimiter=','):
     """Print the CSV Headers"""
 
-    print_('Server ID,Sponsor,Server Name,Timestamp,Distance,Ping,Download,'
-           'Upload')
+    row = ['Server ID', 'Sponsor', 'Server Name', 'Timestamp', 'Distance',
+           'Ping', 'Download', 'Upload']
+    out = StringIO()
+    writer = csv.writer(out, delimiter=delimiter, lineterminator='')
+    writer.writerow([to_utf8(v) for v in row])
+    print_(out.getvalue())
     sys.exit(0)
 
 
@@ -1349,12 +1353,12 @@
         raise SpeedtestCLIError('Cannot supply both --no-download and '
                                 '--no-upload')
 
-    if args.csv_header:
-        csv_header()
-
     if len(args.csv_delimiter) != 1:
         raise SpeedtestCLIError('--csv-delimiter must be a single character')
 
+    if args.csv_header:
+        csv_header(args.csv_delimiter)
+
     validate_optional_args(args)
 
     socket.setdefaulttimeout(args.timeout)


Reply via email to