6 Pygr is an open source software project used to develop graph database
7 interfaces for the popular Python language, with a strong emphasis
8 on bioinformatics applications ranging from genome-wide analysis of
9 alternative splicing patterns, to comparative genomics queries of
10 multi-genome alignment data.
16 from setuptools
import setup
, Extension
18 print 'Setuptools not imported, falling back to distutils'
19 from distutils
.core
import setup
, Extension
23 print( '*** error %s' % msg
)
29 PYGR_VERSION
= pygr
.__version
__
31 if sys
.version_info
< (2, 3):
32 error( 'pygr requires python 2.3 or higher' )
35 Development Status :: 5 - Production/Stable
36 Operating System :: MacOS :: MacOS X
37 Operating System :: Microsoft :: Windows :: Windows NT/2000
38 Operating System :: OS Independent
39 Operating System :: POSIX
40 Operating System :: POSIX :: Linux
41 Operating System :: Unix
42 Programming Language :: Python
43 Topic :: Scientific/Engineering
44 Topic :: Scientific/Engineering :: Bio-Informatics
47 # split into lines and filter empty ones
48 CLASSIFIERS
= filter(None, CLASSIFIERS
.splitlines() )
50 # Setuptools should handle all this automatically
51 if sys
.modules
.has_key('setuptools'):
54 pkg_resources
.require('Pyrex>=0.9.8')
56 except pkg_resources
.DistributionNotFound
:
60 # if pyrex is not present try compiling the C files
62 from Pyrex
.Compiler
.Version
import version
as PYREX_VERSION
63 from Pyrex
.Distutils
import build_ext
64 if PYREX_VERSION
< "0.9.8":
65 error ( "pyrex version >=0.9.8 required, found %s" % PYREX_VERSION
)
67 cmdclass
= { 'build_ext': build_ext
}
68 except ImportError, exc
:
73 seqfmt_src
= [ os
.path
.join('pygr', 'seqfmt.%s' % ext
) ]
74 cdict_src
= [ os
.path
.join('pygr', 'cgraph.c'),
75 os
.path
.join('pygr', 'cdict.%s' % ext
) ]
76 nested_src
= [ os
.path
.join('pygr', 'intervaldb.c'),
77 os
.path
.join('pygr', 'cnestedlist.%s' % ext
),
78 os
.path
.join('pygr', 'apps', 'maf2nclist.c') ]
83 version
= PYGR_VERSION
,
84 description
= 'Pygr, a Python graph-database toolkit oriented primarily on bioinformatics applications',
85 long_description
= __doc__
,
86 author
= "Christopher Lee",
87 author_email
='leec@chem.ucla.edu',
88 url
= 'http://code.google.com/p/pygr/',
89 license
= 'New BSD License',
90 classifiers
= CLASSIFIERS
,
92 packages
= [ 'pygr', 'pygr.apps' ],
95 Extension( 'pygr.seqfmt', seqfmt_src
),
96 Extension( 'pygr.cdict', cdict_src
),
97 Extension( 'pygr.cnestedlist', nested_src
),
103 if __name__
== '__main__':