From b477ea13b628f3301608b682698df18b49474c11 Mon Sep 17 00:00:00 2001 From: Pier Carlo Chiodi Date: Tue, 24 Jan 2017 18:48:11 +0100 Subject: [PATCH] packaging 1 --- pierky/__init__.py | 5 +++++ pierky/p2es/__init__.py | 0 errors.py => pierky/p2es/errors.py | 0 es.py => pierky/p2es/es.py | 0 transformations.py => pierky/p2es/transformations.py | 0 workers.py => pierky/p2es/workers.py | 0 pmacct-to-elasticsearch => scripts/pmacct-to-elasticsearch | 6 +++--- 7 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 pierky/__init__.py create mode 100644 pierky/p2es/__init__.py rename errors.py => pierky/p2es/errors.py (100%) rename es.py => pierky/p2es/es.py (100%) rename transformations.py => pierky/p2es/transformations.py (100%) rename workers.py => pierky/p2es/workers.py (100%) rename pmacct-to-elasticsearch => scripts/pmacct-to-elasticsearch (99%) diff --git a/pierky/__init__.py b/pierky/__init__.py new file mode 100644 index 0000000..d407605 --- /dev/null +++ b/pierky/__init__.py @@ -0,0 +1,5 @@ +try: + __import__('pkg_resources').declare_namespace(__name__) +except ImportError: + from pkgutil import extend_path + __path__ = extend_path(__path__, __name__) diff --git a/pierky/p2es/__init__.py b/pierky/p2es/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/errors.py b/pierky/p2es/errors.py similarity index 100% rename from errors.py rename to pierky/p2es/errors.py diff --git a/es.py b/pierky/p2es/es.py similarity index 100% rename from es.py rename to pierky/p2es/es.py diff --git a/transformations.py b/pierky/p2es/transformations.py similarity index 100% rename from transformations.py rename to pierky/p2es/transformations.py diff --git a/workers.py b/pierky/p2es/workers.py similarity index 100% rename from workers.py rename to pierky/p2es/workers.py diff --git a/pmacct-to-elasticsearch b/scripts/pmacct-to-elasticsearch similarity index 99% rename from pmacct-to-elasticsearch rename to scripts/pmacct-to-elasticsearch index 5777405..9a2a777 100755 --- a/pmacct-to-elasticsearch +++ b/scripts/pmacct-to-elasticsearch @@ -15,9 +15,9 @@ except: import sys -from es import * -from transformations import * -from workers import * +from pierky.p2es.es import * +from pierky.p2es.transformations import * +from pierky.p2es.workers import * APP_NAME = 'pmacct-to-elasticsearch' CURRENT_RELEASE = 'v0.3.0'