source: orange-bioinformatics/setup.py @ 1585:973f84dca0f2

Revision 1585:973f84dca0f2, 3.0 KB checked in by Ales Erjavec <ales.erjavec@…>, 2 years ago (diff)

Cleanup setup.py script, use setuptools if available.

Line 
1#!/usr/bin/env python
2"""\
3Orange Bioinformatics
4=====================
5
6Orange Bioinformatics is an add-on for Orange data mining
7software package. It extends Orange by providing common functionality
8for basic tasks in bioinformatics.
9"""
10
11DOCLINES = __doc__.split("\n")
12
13try:
14    from setuptools import setup
15    have_setuptools = True
16except ImportError:
17    from distutils.core import setup
18    have_setuptools = False
19
20import os, glob
21
22CLASSIFIERS = """\
23Development Status :: 4 - Beta
24Programming Language :: Python
25License :: OSI Approved :: GNU General Public License (GPL)
26Operating System :: POSIX
27Operating System :: Microsoft :: Windows
28Topic :: Scientific/Engineering :: Visualization
29Topic :: Scientific/Engineering :: Bio-Informatics
30Intended Audience :: Education
31Intended Audience :: Science/Research
32"""
33
34KEYWORDS = """\
35data mining
36machine learning,
37artificial intelligence
38bioinformatics,
39gene ontology
40KEGG
41expression profiles
42"""                     
43
44NAME                = "Orange-Bioinformatics"
45DESCRIPTION         = DOCLINES[0]
46LONG_DESCRIPTION    = "\n".join(DOCLINES[3:])
47URL                 = "http://www.biolab.si/obi/"
48DOWNLOAD            = "https://bitbucket.org/biolab/orange-addon-bioinformatics/downloads"
49LICENSE             = "GNU General Public License (GPL)"
50CLASSIFIERS         = filter(None, CLASSIFIERS.split("\n"))
51AUTHOR              = "Bioinformatics Laboratory, FRI UL"
52AUTHOR_EMAIL        = "orange@fri.uni-lj.si"
53KEYWORDS            = filter(None, KEYWORDS.split('\n'))
54
55MAYOR = 1
56MINOR = 1
57MICRO = 0
58ISRELEASED = False
59
60VERSION = "{0}.{1}a.{2}".format(MAYOR,MINOR, MICRO)
61
62
63# list all documentation files that need to be included
64docFiles = []
65for (dirp, dirns, n) in os.walk('doc'):
66    nr = [n1.replace('\\', '/') for n1 in n]
67    dirn = dirp.replace('\\', '/')[4:]
68    if len(dirn):
69        dirn = dirn + '/'
70    docFiles.extend( [dirn + n1r for n1r in nr if '.svn' not in dirp + '/' + n1r] )
71
72DEST_DIR="Orange/add-ons/Bioinformatics"
73
74
75if os.path.exists("VERSION.txt"):
76    VERSION = open("VERSION.txt", "rb").read()
77
78if have_setuptools:
79    setuptool_args = {"install_requires": ["Orange", "suds"],
80                      "zip_safe": False,
81                     }
82else:
83    setuptool_args = {}
84   
85PACKAGES = [ 'widgets', 'widgets.prototypes', 'doc', '.',
86             'obiKEGG2', 'obiKEGG2.entry' ]
87   
88PACKAGE_DATA = {'widgets': ['icons/*.png'],
89                'doc': docFiles,
90                '.':["addon.xml"] }
91                         
92if __name__ == "__main__":
93    setup(name = NAME,
94          version = VERSION,
95          description = DESCRIPTION,
96          author = AUTHOR,
97          author_email = AUTHOR_EMAIL,
98          url = URL,
99          download_url = DOWNLOAD,
100          packages = PACKAGES,
101          package_data = PACKAGE_DATA,
102          extra_path=("orange-bioinformatics", DEST_DIR),
103          license = LICENSE,
104          keywords = KEYWORDS,
105          classifiers = CLASSIFIERS,
106          long_description = LONG_DESCRIPTION,
107          **setuptool_args)
Note: See TracBrowser for help on using the repository browser.