From aaa41561beb1115cc9c67b0deecca076f7e0d6f0 Mon Sep 17 00:00:00 2001 From: "Dr. Peter Poeml" Date: Wed, 10 May 2006 14:21:51 +0000 Subject: [PATCH] - reorganize source to build a python module - add setup.py - add osc-wrapper.py as a wrapper script, so the module can be used when installed in the system as well as in the uninstalled source directory --- osc.README => README | 0 osc-wrapper.py | 7 +++++++ osc/__init__.py | 1 + osc.py => osc/commandline.py | 0 osclib.py => osc/core.py | 0 othermethods.py => osc/othermethods.py | 0 setup.py | 17 +++++++++++++++++ 7 files changed, 25 insertions(+) rename osc.README => README (100%) create mode 100644 osc-wrapper.py create mode 100644 osc/__init__.py rename osc.py => osc/commandline.py (100%) rename osclib.py => osc/core.py (100%) rename othermethods.py => osc/othermethods.py (100%) create mode 100755 setup.py diff --git a/osc.README b/README similarity index 100% rename from osc.README rename to README diff --git a/osc-wrapper.py b/osc-wrapper.py new file mode 100644 index 00000000..2544946e --- /dev/null +++ b/osc-wrapper.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python +from osc import commandline +from osc.core import init_basicauth + +init_basicauth() +commandline.main() + diff --git a/osc/__init__.py b/osc/__init__.py new file mode 100644 index 00000000..38488de5 --- /dev/null +++ b/osc/__init__.py @@ -0,0 +1 @@ +__all__ = ['core', 'commandline', 'othermethods'] diff --git a/osc.py b/osc/commandline.py similarity index 100% rename from osc.py rename to osc/commandline.py diff --git a/osclib.py b/osc/core.py similarity index 100% rename from osclib.py rename to osc/core.py diff --git a/othermethods.py b/osc/othermethods.py similarity index 100% rename from othermethods.py rename to osc/othermethods.py diff --git a/setup.py b/setup.py new file mode 100755 index 00000000..c54ff857 --- /dev/null +++ b/setup.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +from distutils.core import setup + +setup(name='osc', + version='0.2', + description='opensuse commander', + author='Peter Poeml', + author_email='poeml@suse.de', + license='GPL', + url='https://forgesvn1.novell.com/svn/opensuse/trunk/buildservice/src/clientlib/python/osc/', + + packages=['osc'], + scripts=['osc_hotshot.py', 'osc-wrapper.py'], + + ) +