From 64bf8420d2563aa1ad23acb10266b1a38dbfc3ea Mon Sep 17 00:00:00 2001 From: magnusdv Date: Fri, 11 Dec 2015 13:48:42 +0100 Subject: [PATCH] prepare pip --- MANIFEST.in | 1 + filtus/Filtus.py | 11 +++-------- setup.py | 8 ++++---- 3 files changed, 8 insertions(+), 12 deletions(-) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..64ad321 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include README.md LICENSE diff --git a/filtus/Filtus.py b/filtus/Filtus.py index 42bef39..b43508a 100644 --- a/filtus/Filtus.py +++ b/filtus/Filtus.py @@ -38,6 +38,7 @@ print 'plot import error' PLOT_error = e +SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) class FiltusGUI(object): def __init__(self, parent): @@ -45,14 +46,8 @@ def __init__(self, parent): self.version = VERSION parent.title("FILTUS " + self.version) - if os.path.isdir("man"): - self.manualdir = os.path.abspath("man") - self.datadir = os.path.abspath("data") - elif os.path.isdir("../man"): - self.manualdir = os.path.abspath("../man") - self.datadir = os.path.abspath("../data") - else: - self.manualdir, self.datadir = None, None + self.manualdir = os.path.join(SCRIPT_DIR, "man") + self.datadir = os.path.join(SCRIPT_DIR, "data") self.busyManager = BusyManager(parent) self.windowingsystem = parent.tk.call('tk', 'windowingsystem') diff --git a/setup.py b/setup.py index 68101b1..6d92f67 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ 'author_email': 'magnusdv@medisin.uio.no', 'license': 'GPL-2', 'url': 'https://github.com/magnusdv/filtus', - 'download_url': 'https://github.com/magnusdv/filtus/tarball/v1.0.0', + #'download_url': 'https://github.com/magnusdv/filtus/tarball/v1.0.0', 'install_requires': [ 'matplotlib', 'pmw' @@ -40,9 +40,9 @@ }, 'package_data': { 'filtus': [ - 'man', - 'data', - 'testfiles' + 'man/*/*', + 'data/*', + 'testfiles/*' ] } }