From 0dc815392428a921d0234f51d0ff710a60354a7f Mon Sep 17 00:00:00 2001 From: magnusdv Date: Fri, 11 Dec 2015 13:14:31 +0100 Subject: [PATCH] prepare pip package --- filtus/Filtus.py | 27 ++++++++++++++------------ requirements.txt | 2 ++ setup.cfg | 2 ++ setup.py | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 69 insertions(+), 12 deletions(-) create mode 100644 requirements.txt create mode 100644 setup.cfg create mode 100644 setup.py diff --git a/filtus/Filtus.py b/filtus/Filtus.py index 5ffe9da..42bef39 100644 --- a/filtus/Filtus.py +++ b/filtus/Filtus.py @@ -658,13 +658,12 @@ def notbusy(self): self.widgets = {} self.isBusy = False -root = Pmw.initialise() -filtus = FiltusGUI(root) -#root.mainloop() # moved to bottom of file +def main(): + root = Pmw.initialise() + filtus = FiltusGUI(root) + #root.mainloop() # moved to bottom of file -if __name__ == "__main__": - printVF = FiltusAnalysis._printVF test_csv = ["example_files\\test%d.csv" %i for i in (1,2)] test_vcf = "example_files\\vcf_test.vcf" @@ -838,12 +837,16 @@ def test_plink(): print 'all tests passed' else: locals()[sys.argv[1]]() + + try: + root.mainloop() + except KeyboardInterrupt: + root.destroy() + except Exception as e: + print e + root.destroy() + +if __name__ == "__main__": + main() -try: - root.mainloop() -except KeyboardInterrupt: - root.destroy() -except Exception as e: - print e - root.destroy() \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..56d7262 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +matplotlib==1.5.0 +pmw==2.0.1 \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..b88034e --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[metadata] +description-file = README.md diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..68101b1 --- /dev/null +++ b/setup.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python + +try: + from setuptools import setup +except ImportError: + from distutils.core import setup + +config = { + 'name': 'filtus', + 'version': '1.0.0', + 'description': 'Analysis of exome variant files', + 'long_description': open('README.md').read(), + 'author': 'Magnus Dehli Vigeland', + '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', + 'install_requires': [ + 'matplotlib', + 'pmw' + ], + 'packages': [ + 'filtus' + ], + 'classifiers': [ + 'Programming Language :: Python :: 2.7', + 'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)' + ], + 'keywords': [ + 'exome', + 'variant filtering', + 'vcf', + 'de novo', + 'autozygosity mapping' + ], + 'entry_points': { + 'console_scripts': [ + 'filtus = filtus.Filtus:main' + ] + }, + 'package_data': { + 'filtus': [ + 'man', + 'data', + 'testfiles' + ] + } +} + +setup(**config)