From dc261e341992658555e3823ed086b9a72fc09dfd Mon Sep 17 00:00:00 2001 From: Stephen Soltesz Date: Mon, 11 Feb 2013 18:28:59 -0500 Subject: [PATCH] update bwlimit import path, and preserve bwlimit.py for compatibility with legacy deployments --- bin/bwlimit | 2 +- plnode-utils-lxc.spec | 2 +- plnode-utils-vs.spec | 4 +++- setup.py | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/bwlimit b/bin/bwlimit index 0630377..5c3d8de 100755 --- a/bin/bwlimit +++ b/bin/bwlimit @@ -1,6 +1,6 @@ #!/usr/bin/python -import bwlimit +from plnode import bwlimit if __name__ == '__main__': bwlimit.main() diff --git a/plnode-utils-lxc.spec b/plnode-utils-lxc.spec index 83e933e..c9619ea 100644 --- a/plnode-utils-lxc.spec +++ b/plnode-utils-lxc.spec @@ -1,6 +1,6 @@ %define name plnode-utils %define version 0.2 -%define taglevel 1 +%define taglevel 2 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}} diff --git a/plnode-utils-vs.spec b/plnode-utils-vs.spec index ad5817d..d946422 100644 --- a/plnode-utils-vs.spec +++ b/plnode-utils-vs.spec @@ -1,6 +1,6 @@ %define name plnode-utils %define version 0.2 -%define taglevel 1 +%define taglevel 2 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}} @@ -33,6 +33,8 @@ This python package provides utilities like bwlimit, used in various places on a # xxx fixme # this is where we chose which flavour of bwlimit gets shipped cp plnode/bwlimit_vs.py plnode/bwlimit.py +# for backwards compatibilty until legacy packages import from plnode +cp plnode/bwlimit_vs.py bwlimit.py /usr/bin/python setup.py build %install diff --git a/setup.py b/setup.py index 60de75e..89d77fb 100755 --- a/setup.py +++ b/setup.py @@ -11,5 +11,5 @@ scripts = [ "bin/bwlimit" ] # for now we only have bwlimit.py and its flavour is selected in the main specfile # that copies the right bwlimit_xxx.py into bwlimit.py setup(name='plnode', - py_modules = [ 'plnode.bwlimit' ] , + py_modules = [ 'plnode.bwlimit', 'bwlimit' ] , scripts = scripts) -- 2.43.0