diff --git a/__init__.py b/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/bin/elivepatch b/bin/elivepatch deleted file mode 100644 index b14f84c..0000000 --- a/bin/elivepatch +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# (c) 2017, Alice Ferrazzi -# Distributed under the terms of the GNU General Public License v2 or later - -__version__ = "0.0.1" - -#=============================================================================== -# -# Dependencies -# -#------------------------------------------------------------------------------- -from elivepatch_client.argsparser import ArgsParser -from elivepatch_client.cli import Main -#import pdb; pdb.set_trace() -import os - -#=============================================================================== -# -# MAIN -# -#------------------------------------------------------------------------------- - -root = None -try: - root = os.environ['ROOT'] -except KeyError: - pass - -main = Main(ArgsParser()) -try: - main() -except KeyboardInterrupt: - print('Interrupt received, exiting...') diff --git a/requirements.txt b/requirements.txt index 3ec39b4..5568549 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ GitPython -requests \ No newline at end of file +requests diff --git a/setup.py b/setup.py index 5decf87..b6ac69c 100644 --- a/setup.py +++ b/setup.py @@ -26,6 +26,8 @@ author='Alice Ferrazzi', author_email='alice.ferrazzi@gmail.com', license='GNU GPLv2+', - packages=['elivepatch_client'], - scripts=['bin/elivepatch'], + packages=find_packages("src"), + package_dir={"": "src"}, + install_requires=["GitPython", "requests"], + entry_points={"console_scripts": ["elivepatch-client = elivepatch_client.__main__:main"]}, ) diff --git a/elivepatch_client/__init__.py b/src/elivepatch_client/__init__.py similarity index 100% rename from elivepatch_client/__init__.py rename to src/elivepatch_client/__init__.py diff --git a/src/elivepatch_client/__main__.py b/src/elivepatch_client/__main__.py new file mode 100644 index 0000000..ac56ee1 --- /dev/null +++ b/src/elivepatch_client/__main__.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# (c) 2017, Alice Ferrazzi +# Distributed under the terms of the GNU General Public License v2 or later + +__version__ = '0.1' +__author__ = 'Alice Ferrazzi' +__license__ = 'GNU GPLv2+' + +#=============================================================================== +# +# MAIN +# +#------------------------------------------------------------------------------- +def main(): + from .argsparser import ArgsParser + from .cli import Main + #import pdb; pdb.set_trace() + import os + + root = None + try: + root = os.environ['ROOT'] + except KeyError: + pass + + main = Main(ArgsParser()) + try: + main() + except KeyboardInterrupt: + print('Interrupt received, exiting...') + + +if __name__ == "__main__": + main() + diff --git a/elivepatch_client/argsparser.py b/src/elivepatch_client/argsparser.py similarity index 100% rename from elivepatch_client/argsparser.py rename to src/elivepatch_client/argsparser.py diff --git a/elivepatch_client/checkers.py b/src/elivepatch_client/checkers.py similarity index 100% rename from elivepatch_client/checkers.py rename to src/elivepatch_client/checkers.py diff --git a/elivepatch_client/cli.py b/src/elivepatch_client/cli.py similarity index 100% rename from elivepatch_client/cli.py rename to src/elivepatch_client/cli.py diff --git a/elivepatch_client/log.py b/src/elivepatch_client/log.py similarity index 100% rename from elivepatch_client/log.py rename to src/elivepatch_client/log.py diff --git a/elivepatch_client/patch.py b/src/elivepatch_client/patch.py similarity index 100% rename from elivepatch_client/patch.py rename to src/elivepatch_client/patch.py diff --git a/elivepatch_client/restful.py b/src/elivepatch_client/restful.py similarity index 100% rename from elivepatch_client/restful.py rename to src/elivepatch_client/restful.py diff --git a/elivepatch_client/security.py b/src/elivepatch_client/security.py similarity index 100% rename from elivepatch_client/security.py rename to src/elivepatch_client/security.py diff --git a/elivepatch_client/version.py b/src/elivepatch_client/version.py similarity index 100% rename from elivepatch_client/version.py rename to src/elivepatch_client/version.py