David Sommerseth
2013-12-04 20:47:31 UTC
This removes the dependency of tuna in the oscilloscope package and
prepares the ground for packaging oscilloscope separately later on.
Signed-off-by: David Sommerseth <davids at redhat.com>
---
MANIFEST | 7 ++++--
oscilloscope-cmd.py | 2 +-
tuna/oscilloscope.py => oscilloscope/__init__.py | 0
rpm/SPECS/tuna.spec | 9 +++++--
setup-oscilloscope.py | 31 ++++++++++++++++++++++++
5 files changed, 44 insertions(+), 5 deletions(-)
rename tuna/oscilloscope.py => oscilloscope/__init__.py (100%)
create mode 100644 setup-oscilloscope.py
diff --git a/MANIFEST b/MANIFEST
index 95ae7c5..16b6cad 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,10 +1,8 @@
help/kthreads/
-oscilloscope-cmd.py
tuna-cmd.py
tuna/__init__.py
tuna/help.py
tuna/sysfs.py
-tuna/oscilloscope.py
tuna/tuna.py
tuna/config.py
tuna/tuna_gui.py
@@ -28,3 +26,8 @@ ChangeLog
docs/oscilloscope+tuna.html
docs/oscilloscope+tuna.pdf
docs/tuna.8
+etc/
+org.tuna.policy
+setup-oscilloscope.py
+oscilloscope-cmd.py
+oscilloscope/
diff --git a/oscilloscope-cmd.py b/oscilloscope-cmd.py
index c6de41f..3d5ae5b 100755
--- a/oscilloscope-cmd.py
+++ b/oscilloscope-cmd.py
@@ -21,7 +21,7 @@
# USA
import getopt, sys, gtk
-from tuna import oscilloscope
+import oscilloscope
def usage():
print '''Usage: oscilloscope [OPTIONS]
diff --git a/tuna/oscilloscope.py b/oscilloscope/__init__.py
similarity index 100%
rename from tuna/oscilloscope.py
rename to oscilloscope/__init__.py
diff --git a/rpm/SPECS/tuna.spec b/rpm/SPECS/tuna.spec
index 9393df6..f82e667 100644
--- a/rpm/SPECS/tuna.spec
+++ b/rpm/SPECS/tuna.spec
@@ -3,7 +3,7 @@
Name: tuna
Version: 0.11.1
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
Summary: Application tuning GUI & command line utility
Group: Applications/System
@@ -33,7 +33,6 @@ Group: Applications/System
Requires: python-matplotlib
Requires: numpy
Requires: pygtk2
-Requires: tuna = %{version}-%{release}
%description -n oscilloscope
Plots stream of values read from standard input on the screen together with
@@ -48,10 +47,12 @@ priority is changed, be it using tuna or plain chrt & taskset.
%build
%{__python} setup.py build
+%{__python} setup-oscilloscope.py build
%install
rm -rf %{buildroot}
%{__python} setup.py install --skip-build --root %{buildroot}
+%{__python} setup-oscilloscope.py install --skip-build --root %{buildroot}
mkdir -p %{buildroot}/%{_sysconfdir}/tuna/
mkdir -p %{buildroot}/{%{_bindir},%{_datadir}/tuna/help/kthreads,%{_mandir}/man8}
mkdir -p %{buildroot}/%{_datadir}/polkit-1/actions/
@@ -93,10 +94,14 @@ rm -rf %{buildroot}
%files -n oscilloscope
%defattr(-,root,root,-)
%{_bindir}/oscilloscope
+%{python_sitelib}/oscilloscope/
%doc docs/oscilloscope+tuna.html
%doc docs/oscilloscope+tuna.pdf
%changelog
+* Wed Dec 4 2013 David Sommerseth <davids at redhat.com> - 0.11.1-2
+- Removing tuna dependency in oscilloscope, repacking it as a separate module
+
* Fri Feb 1 2013 Arnaldo Carvalho de Melo <acme at redhat.com> - 0.10.4-1
- New upstream release
diff --git a/setup-oscilloscope.py b/setup-oscilloscope.py
new file mode 100644
index 0000000..730c14f
--- /dev/null
+++ b/setup-oscilloscope.py
@@ -0,0 +1,31 @@
+#!/usr/bin/python
+from distutils.sysconfig import get_python_lib
+from distutils.core import setup
+from os.path import isfile, join
+import glob
+import os
+
+#if isfile("MANIFEST"):
+# os.unlink("MANIFEST")
+
+# Get PYTHONLIB with no prefix so --prefix installs work.
+PYTHONLIB = join(get_python_lib(standard_lib=1, prefix=''), 'site-packages')
+
+setup(name="oscilloscope",
+ version = "0.11.1",
+ description = "Application tuning GUI",
+ author = "Arnaldo Carvalho de Melo",
+ author_email = "acme at redhat.com",
+ url = "http://userweb.kernel.org/tuna",
+ license = "GPLv2",
+ long_description =
+"""\
+Plots stream of values read from standard input on the screen together with
+statistics and a histogram.
+
+Allows to instantly see how a signal generator, such as cyclictest, signaltest
+or even ping, reacts when, for instance, its scheduling policy or real time
+priority is changed, be it using tuna or plain chrt & taskset.
+""",
+ packages = ["oscilloscope"],
+ )
prepares the ground for packaging oscilloscope separately later on.
Signed-off-by: David Sommerseth <davids at redhat.com>
---
MANIFEST | 7 ++++--
oscilloscope-cmd.py | 2 +-
tuna/oscilloscope.py => oscilloscope/__init__.py | 0
rpm/SPECS/tuna.spec | 9 +++++--
setup-oscilloscope.py | 31 ++++++++++++++++++++++++
5 files changed, 44 insertions(+), 5 deletions(-)
rename tuna/oscilloscope.py => oscilloscope/__init__.py (100%)
create mode 100644 setup-oscilloscope.py
diff --git a/MANIFEST b/MANIFEST
index 95ae7c5..16b6cad 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,10 +1,8 @@
help/kthreads/
-oscilloscope-cmd.py
tuna-cmd.py
tuna/__init__.py
tuna/help.py
tuna/sysfs.py
-tuna/oscilloscope.py
tuna/tuna.py
tuna/config.py
tuna/tuna_gui.py
@@ -28,3 +26,8 @@ ChangeLog
docs/oscilloscope+tuna.html
docs/oscilloscope+tuna.pdf
docs/tuna.8
+etc/
+org.tuna.policy
+setup-oscilloscope.py
+oscilloscope-cmd.py
+oscilloscope/
diff --git a/oscilloscope-cmd.py b/oscilloscope-cmd.py
index c6de41f..3d5ae5b 100755
--- a/oscilloscope-cmd.py
+++ b/oscilloscope-cmd.py
@@ -21,7 +21,7 @@
# USA
import getopt, sys, gtk
-from tuna import oscilloscope
+import oscilloscope
def usage():
print '''Usage: oscilloscope [OPTIONS]
diff --git a/tuna/oscilloscope.py b/oscilloscope/__init__.py
similarity index 100%
rename from tuna/oscilloscope.py
rename to oscilloscope/__init__.py
diff --git a/rpm/SPECS/tuna.spec b/rpm/SPECS/tuna.spec
index 9393df6..f82e667 100644
--- a/rpm/SPECS/tuna.spec
+++ b/rpm/SPECS/tuna.spec
@@ -3,7 +3,7 @@
Name: tuna
Version: 0.11.1
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
Summary: Application tuning GUI & command line utility
Group: Applications/System
@@ -33,7 +33,6 @@ Group: Applications/System
Requires: python-matplotlib
Requires: numpy
Requires: pygtk2
-Requires: tuna = %{version}-%{release}
%description -n oscilloscope
Plots stream of values read from standard input on the screen together with
@@ -48,10 +47,12 @@ priority is changed, be it using tuna or plain chrt & taskset.
%build
%{__python} setup.py build
+%{__python} setup-oscilloscope.py build
%install
rm -rf %{buildroot}
%{__python} setup.py install --skip-build --root %{buildroot}
+%{__python} setup-oscilloscope.py install --skip-build --root %{buildroot}
mkdir -p %{buildroot}/%{_sysconfdir}/tuna/
mkdir -p %{buildroot}/{%{_bindir},%{_datadir}/tuna/help/kthreads,%{_mandir}/man8}
mkdir -p %{buildroot}/%{_datadir}/polkit-1/actions/
@@ -93,10 +94,14 @@ rm -rf %{buildroot}
%files -n oscilloscope
%defattr(-,root,root,-)
%{_bindir}/oscilloscope
+%{python_sitelib}/oscilloscope/
%doc docs/oscilloscope+tuna.html
%doc docs/oscilloscope+tuna.pdf
%changelog
+* Wed Dec 4 2013 David Sommerseth <davids at redhat.com> - 0.11.1-2
+- Removing tuna dependency in oscilloscope, repacking it as a separate module
+
* Fri Feb 1 2013 Arnaldo Carvalho de Melo <acme at redhat.com> - 0.10.4-1
- New upstream release
diff --git a/setup-oscilloscope.py b/setup-oscilloscope.py
new file mode 100644
index 0000000..730c14f
--- /dev/null
+++ b/setup-oscilloscope.py
@@ -0,0 +1,31 @@
+#!/usr/bin/python
+from distutils.sysconfig import get_python_lib
+from distutils.core import setup
+from os.path import isfile, join
+import glob
+import os
+
+#if isfile("MANIFEST"):
+# os.unlink("MANIFEST")
+
+# Get PYTHONLIB with no prefix so --prefix installs work.
+PYTHONLIB = join(get_python_lib(standard_lib=1, prefix=''), 'site-packages')
+
+setup(name="oscilloscope",
+ version = "0.11.1",
+ description = "Application tuning GUI",
+ author = "Arnaldo Carvalho de Melo",
+ author_email = "acme at redhat.com",
+ url = "http://userweb.kernel.org/tuna",
+ license = "GPLv2",
+ long_description =
+"""\
+Plots stream of values read from standard input on the screen together with
+statistics and a histogram.
+
+Allows to instantly see how a signal generator, such as cyclictest, signaltest
+or even ping, reacts when, for instance, its scheduling policy or real time
+priority is changed, be it using tuna or plain chrt & taskset.
+""",
+ packages = ["oscilloscope"],
+ )
--
1.8.3.1
1.8.3.1