diff options
author | Andy Grover <agrover@redhat.com> | 2014-12-02 16:46:59 -0800 |
---|---|---|
committer | Andy Grover <agrover@redhat.com> | 2014-12-02 16:46:59 -0800 |
commit | c1cc01aaf7d6e1c650845a94c6e52eb5b1c185b0 (patch) | |
tree | 378c50db7ce739f3ee38d56611c0efdbe8b74af8 | |
parent | 2b25dcbb52603eed7e43e184e8e3e1fa0d32655b (diff) | |
download | rtslib-fb-c1cc01aaf7d6e1c650845a94c6e52eb5b1c185b0.tar.gz |
Change to exporting under 'rtslib' and 'rtslib_fb" pkg names
We should move off of 'rtslib' because we are incompatible with the
original package using this name. Export as 'rtslib_fb', and add a
warning to switch to importing by the new package name if using the old
import name.
Signed-off-by: Andy Grover <agrover@redhat.com>
-rw-r--r-- | rtslib/__init__.py | 5 | ||||
-rwxr-xr-x | scripts/targetctl | 2 | ||||
-rwxr-xr-x | setup.py | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/rtslib/__init__.py b/rtslib/__init__.py index 72d3067..5b6dfd6 100644 --- a/rtslib/__init__.py +++ b/rtslib/__init__.py @@ -16,6 +16,11 @@ License for the specific language governing permissions and limitations under the License. ''' +if __name__ == "rtslib": + from warnings import warn + warn("'rtslib' package name for rtslib-fb is deprecated, please" + + " instead import 'rtslib_fb'", UserWarning, stacklevel=2) + from root import RTSRoot from utils import RTSLibError, RTSLibBrokenLink, RTSLibNotInCFS diff --git a/scripts/targetctl b/scripts/targetctl index cc4eb99..9d02b91 100755 --- a/scripts/targetctl +++ b/scripts/targetctl @@ -24,7 +24,7 @@ under the License. from __future__ import print_function -from rtslib import RTSRoot +from rtslib_fb import RTSRoot import os import sys @@ -26,7 +26,8 @@ setup ( maintainer = 'Andy Grover', maintainer_email = 'agrover@redhat.com', url = 'http://github.com/agrover/rtslib-fb', - packages = ['rtslib'], + packages = ['rtslib_fb', 'rtslib'], + package_dir = {'rtslib_fb': 'rtslib'}, scripts = ['scripts/targetctl'], use_2to3 = True, ) |