hguemar pushed to python-hardware (master). "Fix missing requirements (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Tue May 5 16:10:36 UTC 2015
>From d7af970710757c7d5cf5765b442f7080d2d9cff0 Mon Sep 17 00:00:00 2001
From: Haikel Guemar <hguemar at redhat.com>
Date: Tue, 5 May 2015 15:42:36 +0200
Subject: Fix missing requirements
Add patch from John Trowbridge
diff --git a/0001-Fix-empty-print-statements.patch b/0001-Fix-empty-print-statements.patch
new file mode 100644
index 0000000..9b41079
--- /dev/null
+++ b/0001-Fix-empty-print-statements.patch
@@ -0,0 +1,129 @@
+From 139a0d444ee282c63d8c119eb3cf6837481b5f64 Mon Sep 17 00:00:00 2001
+From: John Trowbridge <trown at redhat.com>
+Date: Thu, 16 Apr 2015 08:41:16 -0400
+Subject: [PATCH] Fix empty print statements
+
+This patch changes all 'print()' statements to 'print("")'.
+Without the empty string, this was printing '()' instead of the
+intended empty line.
+---
+ hardware/cardiff/cardiff.py | 2 +-
+ hardware/cardiff/check.py | 10 +++++-----
+ hardware/cardiff/compare_sets.py | 4 ++--
+ hardware/megacli.py | 6 +++---
+ 4 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/hardware/cardiff/cardiff.py b/hardware/cardiff/cardiff.py
+index c97366a..b339b7b 100755
+--- a/hardware/cardiff/cardiff.py
++++ b/hardware/cardiff/cardiff.py
+@@ -191,7 +191,7 @@ def analyze_data(global_params, pattern, ignore_list, detail, rampup_value=0,
+ compare_performance(bench_values, unique_id, systems_groups, detail,
+ rampup_value, current_dir)
+ print("##########################################")
+- print()
++ print("")
+ return bench_values
+
+
+diff --git a/hardware/cardiff/check.py b/hardware/cardiff/check.py
+index 1a7a642..c084908 100755
+--- a/hardware/cardiff/check.py
++++ b/hardware/cardiff/check.py
+@@ -121,7 +121,7 @@ def print_detail(detail_options, details, df, matched_category):
+ if (utils.print_level & utils.Levels.DETAIL) != utils.Levels.DETAIL:
+ return
+ if len(df.loc[details]) > 0:
+- print()
++ print("")
+ print("%-34s: %-8s: %s" % (matched_category[0],
+ utils.Levels.message[utils.print_level],
+ detail_options['item']))
+@@ -188,7 +188,7 @@ def network_perf(systems, unique_id, group_number, detail_options,
+ matched_category = []
+ for net in df.transpose().columns:
+ if have_net_data is False:
+- print()
++ print("")
+ print("Group %d : Checking network disks perf" % group_number)
+ have_net_data = True
+ consistent = []
+@@ -250,7 +250,7 @@ def logical_disks_perf(systems, unique_id, group_number, detail_options,
+ matched_category = []
+ for disk in df.transpose().columns:
+ if have_disk_data is False:
+- print()
++ print("")
+ print("Group %d : Checking logical disks perf" % group_number)
+ have_disk_data = True
+ consistent = []
+@@ -545,7 +545,7 @@ def cpu_perf(systems, unique_id, group_number, detail_options,
+
+ for cpu in df.transpose().columns:
+ if have_cpu_data is False:
+- print()
++ print("")
+ print("Group %d : Checking CPU perf" % group_number)
+ have_cpu_data = True
+ print_perf(2, 7, df.transpose()[cpu], df, mode, cpu, consistent,
+@@ -645,7 +645,7 @@ def memory_perf(systems, unique_id, group_number, detail_options,
+ df = DataFrame(results)
+ for memory in df.transpose().columns:
+ if have_memory_data is False:
+- print()
++ print("")
+ print("Group %d : Checking Memory perf" % group_number)
+ have_memory_data = True
+
+diff --git a/hardware/cardiff/compare_sets.py b/hardware/cardiff/compare_sets.py
+index 58450a6..1662a35 100755
+--- a/hardware/cardiff/compare_sets.py
++++ b/hardware/cardiff/compare_sets.py
+@@ -60,7 +60,7 @@ def print_systems_groups(systems_groups):
+ print("Group %d (%d Systems)" % (
+ systems_groups.index(system), len(system)))
+ print("-> " + ', '.join(system))
+- print()
++ print("")
+
+
+ def print_groups(global_params, result, title):
+@@ -87,7 +87,7 @@ def print_groups(global_params, result, title):
+ if "output_dir" in global_params.keys():
+ with open("%s.def" % group_name, "w") as fout:
+ pprint.pprint(sorted(eval(element)), fout)
+- print()
++ print("")
+
+ if "output_dir" in global_params.keys():
+ if len(result) > 1:
+diff --git a/hardware/megacli.py b/hardware/megacli.py
+index 647903e..900e292 100644
+--- a/hardware/megacli.py
++++ b/hardware/megacli.py
+@@ -142,19 +142,19 @@ if __name__ == "__main__":
+
+ encs = enc_info(ctrl_num)
+
+- print()
++ print("")
+
+ print('Enclosing:')
+ pprint.pprint(encs)
+
+ for enc in encs:
+ for disk_num in range(enc['NumberOfPhysicalDrives']):
+- print()
++ print("")
+ print('Physical disk', disk_num)
+ pprint.pprint(pdinfo(ctrl_num, enc['DeviceId'], disk_num))
+
+ for ld_num in range(ld_get_num(ctrl_num)):
+- print()
++ print("")
+ print('Logical disk', ld_num)
+ pprint.pprint(ld_get_info(ctrl_num, ld_num))
+
+--
+2.1.0
+
diff --git a/python-hardware.spec b/python-hardware.spec
index 9dc1417..8ca4c40 100644
--- a/python-hardware.spec
+++ b/python-hardware.spec
@@ -1,4 +1,6 @@
%{?!_licensedir:%global license %%doc}
+%{!?upstream_version: %global upstream_version %{version}}
+
%if 0%{?fedora}
%global with_python3 1
%endif
@@ -6,12 +8,14 @@
Name: python-hardware
Summary: Hardware detection and classification utilities
Version: 0.14
-Release: 1%{?dist}
+Release: 2%{?dist}
License: ASL 2.0
Group: Development/Languages
URL: https://pypi.python.org/pypi/hardware
-Source0: https://pypi.python.org/packages/source/h/hardware/hardware-%{version}.tar.gz
+Source0: https://pypi.python.org/packages/source/h/hardware/hardware-%{upstream_version}.tar.gz
+
+Patch0001: 0001-Fix-empty-print-statements.patch
BuildArch: noarch
BuildRequires: python-setuptools
@@ -23,14 +27,18 @@ BuildRequires: python3-pbr
BuildRequires: python-pbr
BuildRequires: python-sphinx
BuildRequires: python-oslo-sphinx
+BuildRequires: git
Requires: python-babel
Requires: python-ipaddr
Requires: python-netaddr
Requires: python-pexpect
+Requires: python-ptyprocess
+Requires: python-pandas
+Requires: python-pbr
%prep
-%autosetup -v -p 1 -n hardware-%{version}
+%autosetup -S git -v -n hardware-%{upstream_version}
rm -rf *.egg-info
%if 0%{?with_python3}
@@ -125,6 +133,10 @@ Documentation for Hardware detection and classification utilities.
%endif # with_python3
%changelog
+* Tue May 05 2015 Haïkel Guémar <hguemar at fedoraproject> - 0.14-2
+- Fix requirements
+- Add a patch to improve output of cardiff from John Trowbridge
+
* Tue Mar 31 2015 Frederic Lepied <frederic.lepied at redhat.com> - 0.14-1
- new version (bug #1196176)
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/python-hardware.git/commit/?h=master&id=d7af970710757c7d5cf5765b442f7080d2d9cff0
More information about the scm-commits
mailing list