Changeset 1585:973f84dca0f2 in orange-bioinformatics for setup.py


Ignore:
Timestamp:
03/05/12 14:41:56 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Tags:
1.1a
Message:

Cleanup setup.py script, use setuptools if available.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • setup.py

    r1575 r1585  
    1 from distutils.core import setup 
     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 
    220import 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 
    362 
    463# list all documentation files that need to be included 
     
    1170    docFiles.extend( [dirn + n1r for n1r in nr if '.svn' not in dirp + '/' + n1r] ) 
    1271 
    13 destDir="Orange/add-ons/Bioinformatics" 
     72DEST_DIR="Orange/add-ons/Bioinformatics" 
    1473 
     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                           
    1592if __name__ == "__main__": 
    16     setup(name = "Orange-Bioinformatics", 
    17           version = "1.0.0b", 
    18           description = "Bioinformatics Add-On for Orange", 
    19           author = "Bioinformatics Laboratory, FRI UL", 
    20           author_email = "orange@fri.uni-lj.si", 
    21           url = "http://www.biolab.si/obi/", 
    22           download_url = "https://bitbucket.org/biolab/orange-addon-bioinformatics", 
    23           packages = [ 'widgets', 'widgets.prototypes', 'doc', '.', 
    24                       'obiKEGG2', 'obiKEGG2.entry' ], 
    25           package_data = {'widgets': ['icons/*.png'], 
    26                           'doc': docFiles, 
    27                           '.':["addon.xml"] }, 
    28           extra_path=("orange-bioinformatics", destDir), 
    29           license = "GNU General Public License (GPL)", 
    30           keywords = ["data mining", "machine learning", 
    31                       "artificial intelligence", "bioinformatics", 
    32                       "gene ontology", "KEGG", "expression profiles"], 
    33           classifiers = ["Development Status :: 4 - Beta", 
    34                      "Programming Language :: Python", 
    35                      "License :: OSI Approved :: GNU General Public License (GPL)", 
    36                      "Operating System :: POSIX", 
    37                      "Operating System :: Microsoft :: Windows", 
    38                      "Topic :: Scientific/Engineering :: Visualization", 
    39                      "Topic :: Scientific/Engineering :: Bio-Informatics", 
    40                      "Intended Audience :: Education", 
    41                      "Intended Audience :: Science/Research" 
    42                      ], 
    43           long_description="""\ 
    44 Orange Bioinformatics 
    45 ===================== 
    46  
    47 Orange Bioinformatics is an add-on for Orange data mining  
    48 software package. It extends Orange by providing common functionality 
    49 for basic tasks in bioinformatics. 
    50  
    51 """) 
     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 TracChangeset for help on using the changeset viewer.