Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 548 lines (482 sloc) 16.726 kb
22df84e Updated setup.py for GenBank
chapmanb authored
1 """Distutils based setup script for Biopython.
2
3 This uses Distutils (http://python.org/sigs/distutils-sig/) the standard
4 python mechanism for installing packages. For the easiest installation
5 just type the command:
6
7 python setup.py install
8
9 For more in-depth instructions, see the installation section of the
10 biopython manual, linked to from:
11
b7761b6 Fixes to imported EUtils to get it working happily with Bio:
chapmanb authored
12 http://www.biopython.org/documentation/
22df84e Updated setup.py for GenBank
chapmanb authored
13
14 Or for more details about the options available from distutils, look at
15 the 'Installing Python Modules' distutils documentation, available from:
16
17 http://python.org/sigs/distutils-sig/doc/
18
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
19 Or, if all else fails, feel free to write to the biopython list at
20 biopython@biopython.org and ask for help.
21 """
f726249 merged Andrew's Seq package with the tree
jchang authored
22 import sys
96a6095 Upgrade setup.py for SubsMat
chapmanb authored
23 import os
7db13b0 Updated to check for dependencies and print out warnings and to insta…
chapmanb authored
24
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
25 # Make sure I have the right Python version.
c2c11a9 Biopython now works with Python >= 2.3
idoerg authored
26 if sys.version_info[:2] < (2, 3):
27 print "Biopython requires Python 2.3 or better. Python %d.%d detected" % \
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
28 sys.version_info[:2]
29 sys.exit(-1)
30
31 from distutils.core import setup
32 from distutils.core import Command
33 from distutils.command.install import install
b9fe0cc the EUtils dtd's were not being installed correctly, when the
jchang authored
34 from distutils.command.install_data import install_data
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
35 from distutils.command.build_py import build_py
a8ae40f now installs Martel and doesn't complain about it
jchang authored
36 from distutils.command.build_ext import build_ext
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
37 from distutils.extension import Extension
a573247 Even more kludgy fix for c++ compiling with setup.py -- this time it …
chapmanb authored
38 from distutils import sysconfig
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
39
40 def get_yes_or_no(question, default):
41 if default:
42 option_str = "(Y/n)"
43 default_str = 'y'
44 else:
45 option_str = "(y/N)"
46 default_str = 'n'
47
48 while 1:
49 print "%s %s " % (question, option_str),
50 response = raw_input().lower()
51 if not response:
52 response = default_str
53 if response[0] in ['y', 'n']:
54 break
55 print "Please answer y or n."
56 return response[0] == 'y'
57
a8ae40f now installs Martel and doesn't complain about it
jchang authored
58 _CHECKED = None
59 def check_dependencies_once():
60 # Call check_dependencies, but cache the result for subsequent
61 # calls.
62 global _CHECKED
63 if _CHECKED is None:
64 _CHECKED = check_dependencies()
65 return _CHECKED
66
67 def check_dependencies():
68 """Return whether the installation should continue."""
69 # There should be some way for the user to tell specify not to
70 # check dependencies. For example, it probably should not if
71 # the user specified "-q". However, I'm not sure where
72 # distutils stores that information. Also, install has a
73 # --force option that gets saved in self.user_options. It
74 # means overwrite previous installations. If the user has
75 # forced an installation, should we also ignore dependencies?
1003c5c @peterjc Make mxTextTools optional (like ReportLab and Numeric), so that Biopy…
peterjc authored
76
77 #This is a list of tuples, containing:
78 # - package name, string
79 # - is packaged installed, boolean
80 # - is packaged required, boolean
81 # - package website, string
a8ae40f now installs Martel and doesn't complain about it
jchang authored
82 dependencies = [
1003c5c @peterjc Make mxTextTools optional (like ReportLab and Numeric), so that Biopy…
peterjc authored
83 ("mxTextTools", is_mxTextTools_installed, 0,
31236fa Fixed bad link for mxTextTools kindly pointed out by Marc Colosimo
chapmanb authored
84 "http://www.egenix.com/files/python/eGenix-mx-Extensions.html"),
a8ae40f now installs Martel and doesn't complain about it
jchang authored
85 ("Numerical Python", is_Numpy_installed, 0,
86 "http://numpy.sourceforge.net/"),
87 ("Reportlab", is_reportlab_installed, 0,
b6580cd Fixed spelling error "is you are unsure" ==> "if you are unsure"
mdehoon authored
88 "http://www.reportlab.org/downloads.html"),
a8ae40f now installs Martel and doesn't complain about it
jchang authored
89 ]
90
91 for name, is_installed_fn, is_required, url in dependencies:
92 if is_installed_fn():
93 continue
94
95 print "*** %s *** is either not installed or out of date." % name
96 if is_required:
97
98 print """
99 This package is required for many Biopython features. Please install
100 it before you install Biopython."""
101 default = 0
102 else:
103 print """
104 This package is optional, which means it is only used in a few
b6580cd Fixed spelling error "is you are unsure" ==> "if you are unsure"
mdehoon authored
105 specialized modules in Biopython. You probably don't need this if you
a8ae40f now installs Martel and doesn't complain about it
jchang authored
106 are unsure. You can ignore this requirement, and install it later if
107 you see ImportErrors."""
108 default = 1
109 print "You can find %s at %s." % (name, url)
110 print
5c9fef2 Modified setup.py to try and fix Martel/mxTextTools issues from bug 1…
chapmanb authored
111 # exit automatically if required packages not installed
593e65e Added Affymetrix package from Harry Zuzan
chapmanb authored
112 if not(default):
113 sys.exit(-1)
a8ae40f now installs Martel and doesn't complain about it
jchang authored
114
115 if not get_yes_or_no(
116 "Do you want to continue this installation?", default):
117 return 0
5a0a5b6 Patch from K. Arun on the mailing list. Ask the user if KDTree (C++) …
mdehoon authored
118
119
120 # Compile KDTree ? Not compiled by default
121 print "\n*** Bio.KDTree *** NOT built by default "
122 kdtree_msg = """
123 The Bio.PDB.NeighborSearch module depends on the Bio.KDTree module,
124 which in turn, depends on C++ code that does not compile cleanly on
125 all platforms. Hence, Bio.KDTree is not built by default.
126
127 Would you like to build Bio.KDTree ?"""
128
129 if get_yes_or_no (kdtree_msg, 0):
130 NUMPY_PACKAGES.append("Bio.KDTree")
131 NUMPY_EXTENSIONS.append(
132 CplusplusExtension('Bio.KDTree._CKDTree',
133 ["Bio/KDTree/KDTree.cpp",
134 "Bio/KDTree/KDTree.swig.cpp"],
135 libraries=["stdc++"],
136 language="c++"))
137
138
a8ae40f now installs Martel and doesn't complain about it
jchang authored
139 return 1
140
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
141 class install_biopython(install):
7db13b0 Updated to check for dependencies and print out warnings and to insta…
chapmanb authored
142 """Override the standard install to check for dependencies.
143
144 This will just run the normal install, and then print warning messages
145 if packages are missing.
b7761b6 Fixes to imported EUtils to get it working happily with Bio:
chapmanb authored
146
7db13b0 Updated to check for dependencies and print out warnings and to insta…
chapmanb authored
147 """
148 def run(self):
a8ae40f now installs Martel and doesn't complain about it
jchang authored
149 if check_dependencies_once():
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
150 # Run the normal install.
151 install.run(self)
7db13b0 Updated to check for dependencies and print out warnings and to insta…
chapmanb authored
152
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
153 class build_py_biopython(build_py):
154 def run(self):
a8ae40f now installs Martel and doesn't complain about it
jchang authored
155 if not check_dependencies_once():
156 return
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
157 # Check to see if Martel is installed. If not, then install
158 # it automatically.
159 if not is_Martel_installed():
160 self.packages.append("Martel")
593e65e Added Affymetrix package from Harry Zuzan
chapmanb authored
161 # Add software that requires Numpy to be installed.
a8ae40f now installs Martel and doesn't complain about it
jchang authored
162 if is_Numpy_installed():
593e65e Added Affymetrix package from Harry Zuzan
chapmanb authored
163 self.packages.extend(NUMPY_PACKAGES)
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
164 build_py.run(self)
fc90717 Whew, final thing to add! Added code for displaying pretty pictures u…
chapmanb authored
165
a573247 Even more kludgy fix for c++ compiling with setup.py -- this time it …
chapmanb authored
166 class CplusplusExtension(Extension):
167 """Hack-y wrapper around Extension to support C++ and Python2.2.
168
169 Python2.3 defines an extension attribute, which can be used in
170 'build_extension' to work around problems Python has with always
171 using the C++ compiler to compile C++ code.
172
173 This should be able to be removed once we move to requiring Python 2.3 or
174 better.
175 """
176 def __init__(self, *args, **kw):
930f619 Update setup.py to try and fix mingw32 compile problem. Fix typo in Affy
chapmanb authored
177 # fix the language -- 2.2 doesn't have languages
a573247 Even more kludgy fix for c++ compiling with setup.py -- this time it …
chapmanb authored
178 if sys.version_info[1] < 3:
179 try:
180 self.language = kw['language']
181 del kw['language']
182 except KeyError:
183 pass
184 Extension.__init__(self, *args, **kw)
185
a8ae40f now installs Martel and doesn't complain about it
jchang authored
186 class build_ext_biopython(build_ext):
187 def run(self):
188 if not check_dependencies_once():
189 return
a573247 Even more kludgy fix for c++ compiling with setup.py -- this time it …
chapmanb authored
190 # add software that requires NumPy to install
a8ae40f now installs Martel and doesn't complain about it
jchang authored
191 if is_Numpy_installed():
593e65e Added Affymetrix package from Harry Zuzan
chapmanb authored
192 self.extensions.extend(NUMPY_EXTENSIONS)
a8ae40f now installs Martel and doesn't complain about it
jchang authored
193 build_ext.run(self)
194
a151e5c workaround for bug in distutils that prevents one from compiling both…
grouse authored
195 def build_extensions(self):
dac04da Fix to try and make things work on Microsoft Visual C++
chapmanb authored
196 # Unix C compiler plus others
197 if hasattr(self.compiler, "compiler_so"):
198 self._original_compiler_so = self.compiler.compiler_so
199 # MSVC -- others?
200 else:
201 self._original_compiler_so = self.compiler.cc
a151e5c workaround for bug in distutils that prevents one from compiling both…
grouse authored
202
203 build_ext.build_extensions(self)
204
205 def build_extension(self, ext):
a573247 Even more kludgy fix for c++ compiling with setup.py -- this time it …
chapmanb authored
206 """Work around distutils bug which uses the C compiler for C++ code.
207 """
f4f6cd3 Turn off C++ compilation on mingw32 where it just doesn't work right …
chapmanb authored
208 # build this extension by default
209 build = 1
a573247 Even more kludgy fix for c++ compiling with setup.py -- this time it …
chapmanb authored
210 if hasattr(ext, "language") and ext.language == "c++":
1a4e813 Mingw can now build C++ code for the Windows installer.
mdehoon authored
211 # C++ didn't build in the past with msvc
212 # mingw32 seems fine now
213 if self.compiler.compiler_type=="msvc":
f4f6cd3 Turn off C++ compilation on mingw32 where it just doesn't work right …
chapmanb authored
214 build = 0
215 # fix for distutils where C++ is not handled well. This includes
216 # Python 2.2.x -- need to find the C++ compiler
930f619 Update setup.py to try and fix mingw32 compile problem. Fix typo in Affy
chapmanb authored
217 cxx = None
c6c0628 Hopefully final fix to skip compilation of C++ for mingw32 and msvc
chapmanb authored
218 if (sys.version_info[1] < 3) and build: # Python 2.2
930f619 Update setup.py to try and fix mingw32 compile problem. Fix typo in Affy
chapmanb authored
219 cxx = sysconfig.get_config_vars("CXX")
220 if os.environ.has_key("CXX"):
221 cxx = os.environ["CXX"]
222 # set the C++ compiler if it doesn't exist in distutils
223 if cxx:
224 self.compiler.set_executable("compiler", cxx)
225 self.compiler.set_executable("compiler_so", cxx)
23b62a9 A few more fixes for 2.2 versions -- now make sure to set the linker_…
chapmanb authored
226 self.compiler.set_executable("linker_so",
930f619 Update setup.py to try and fix mingw32 compile problem. Fix typo in Affy
chapmanb authored
227 cxx + ["-shared"])
a151e5c workaround for bug in distutils that prevents one from compiling both…
grouse authored
228 else:
229 self.compiler.compiler_so = self._original_compiler_so
230
f4f6cd3 Turn off C++ compilation on mingw32 where it just doesn't work right …
chapmanb authored
231 # C++ extensions just plain won't build on some platforms
232 if build:
233 build_ext.build_extension(self, ext)
a151e5c workaround for bug in distutils that prevents one from compiling both…
grouse authored
234
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
235 class test_biopython(Command):
b50486d Allow setup.py to be able to run tests with python setup.py test
chapmanb authored
236 """Run all of the tests for the package.
237
238 This is a automatic test run class to make distutils kind of act like
239 perl. With this you can do:
240
241 python setup.py build
242 python setup.py install
243 python setup.py test
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
244
b50486d Allow setup.py to be able to run tests with python setup.py test
chapmanb authored
245 """
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
246 description = "Automatically run the test suite for Biopython."
1d16b65 The modification to setup.py gives the option of --no-gui for the com…
lasher authored
247
248 user_options = [
249 # provide the option to run tests in no-gui mode
250 ('no-gui', None, "Do not run in GUI mode")
251 ]
252
253 def initialize_options(self):
254 self.no_gui = None
255
256 def finalize_options(self):
b50486d Allow setup.py to be able to run tests with python setup.py test
chapmanb authored
257 pass
1d16b65 The modification to setup.py gives the option of --no-gui for the com…
lasher authored
258
b50486d Allow setup.py to be able to run tests with python setup.py test
chapmanb authored
259 def run(self):
260 this_dir = os.getcwd()
261
262 # change to the test dir and run the tests
263 os.chdir("Tests")
b720e3d In Python 2.3.2, the current directory '' is not included in the path.
grouse authored
264 sys.path.insert(0, '')
b50486d Allow setup.py to be able to run tests with python setup.py test
chapmanb authored
265 import run_tests
1d16b65 The modification to setup.py gives the option of --no-gui for the com…
lasher authored
266 if self.no_gui:
267 run_tests.main(['--no-gui'])
268 else:
269 run_tests.main([])
b50486d Allow setup.py to be able to run tests with python setup.py test
chapmanb authored
270
271 # change back to the current directory
272 os.chdir(this_dir)
273
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
274 def can_import(module_name):
275 """can_import(module_name) -> module or None"""
276 try:
277 return __import__(module_name)
278 except ImportError:
279 return None
280 raise AssertionError, "how did I get here?"
281
282 def is_Martel_installed():
283 old_path = sys.path[:]
284
285 # First, check the version of the Martel that's bundled with
286 # Biopython.
287 sys.path.insert(0, '') # Make sure I'm importing the current one.
288 m = can_import("Martel")
289 sys.path = old_path
290 if m:
291 bundled_martel_version = m.__version__
292 else:
293 bundled_martel_version = None
294 del sys.modules["Martel"] # Delete the old version of Martel.
295
296 # Now try and import a Martel that's not bundled with Biopython.
297 # To do that, I need to delete all the references to the current
298 # path from sys.path.
299 i = 0
300 while i < len(sys.path):
7adf843 Added fix to Martel check code which keeps is_Martel_Installed from r…
chapmanb authored
301 if sys.path[i] in ['', '.', os.getcwd()]:
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
302 del sys.path[i]
303 else:
304 i += 1
305 m = can_import("Martel")
306 sys.path = old_path
307 if m:
308 old_martel_version = m.__version__
309 else:
310 old_martel_version = None
311
312 installed = 0
ff3d016 Install Martel if the Biopython version is the same or newer -- preve…
chapmanb authored
313 # If the bundled one is the older, then ignore it
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
314 if old_martel_version and bundled_martel_version and \
ff3d016 Install Martel if the Biopython version is the same or newer -- preve…
chapmanb authored
315 bundled_martel_version < old_martel_version:
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
316 installed = 1
317 return installed
318
319 def is_mxTextTools_installed():
320 if can_import("TextTools"):
321 return 1
322 return can_import("mx.TextTools")
323
324 def is_Numpy_installed():
325 return can_import("Numeric")
326
327 def is_reportlab_installed():
328 return can_import("reportlab")
329
7db13b0 Updated to check for dependencies and print out warnings and to insta…
chapmanb authored
330 # --- set up the packages we are going to install
331 # standard biopython packages
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
332 PACKAGES = [
333 'Bio',
334 'Bio.Ais',
335 'Bio.Align',
193e993 initial checking of Bartek Wilczynski's AlignAce module
jchang authored
336 'Bio.AlignAce',
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
337 'Bio.Alphabet',
338 'Bio.Application',
339 'Bio.Blast',
340 'Bio.builders',
341 'Bio.builders.Search',
342 'Bio.builders.SeqRecord',
0cd0e9c Modified Files:
idoerg authored
343 'Bio.CAPS',
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
344 'Bio.CDD',
76ce5ca Added Compass parsing code contributed by James Casbon.
chapmanb authored
345 'Bio.Compass',
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
346 'Bio.Clustalw',
347 'Bio.config',
348 'Bio.Crystal',
349 'Bio.Data',
350 'Bio.dbdefs',
351 'Bio.ECell',
352 'Bio.Emboss',
353 'Bio.Encodings',
354 'Bio.Enzyme',
355 'Bio.expressions',
356 'Bio.expressions.blast',
357 'Bio.expressions.embl',
358 'Bio.expressions.swissprot',
b7761b6 Fixes to imported EUtils to get it working happily with Bio:
chapmanb authored
359 'Bio.EUtils',
360 'Bio.EUtils.DTDs',
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
361 'Bio.Fasta',
362 'Bio.formatdefs',
363 'Bio.FSSP',
364 'Bio.GA',
365 'Bio.GA.Crossover',
366 'Bio.GA.Mutation',
367 'Bio.GA.Repair',
368 'Bio.GA.Selection',
369 'Bio.GenBank',
370 'Bio.Geo',
371 'Bio.GFF',
372 'Bio.Gobase',
373 'Bio.Graphics',
374 'Bio.HMM',
375 'Bio.IntelliGenetics',
376 'Bio.InterPro',
377 'Bio.KEGG',
378 'Bio.KEGG.Compound',
379 'Bio.KEGG.Enzyme',
380 'Bio.KEGG.Map',
1c9b14b Added LocusLink back in to the install since tests pass
chapmanb authored
381 'Bio.LocusLink',
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
382 'Bio.Medline',
08d88f3 Add Bio.MEME to the packages to be installed.
mdehoon authored
383 'Bio.MEME',
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
384 'Bio.MetaTool',
385 'Bio.Mindy',
386 'Bio.MultiProc',
387 'Bio.NBRF',
388 'Bio.Ndb',
389 'Bio.NeuralNetwork',
390 'Bio.NeuralNetwork.BackPropagation',
391 'Bio.NeuralNetwork.Gene',
c2c11a9 Biopython now works with Python >= 2.3
idoerg authored
392 'Bio.Nexus',
7bcfbce Adding NMR files kindly contributed by Bob Bussell
chapmanb authored
393 'Bio.NMR',
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
394 'Bio.Parsers',
395 'Bio.Pathway',
396 'Bio.Pathway.Rep',
397 'Bio.PDB',
983daba Add Bio.PDB.mmCIF (but not MMFIFlex) as a module to make sure that
mdehoon authored
398 'Bio.PDB.mmCIF',
4f07b8a Added Bio.PopGen module by Tiago Antao.
mdehoon authored
399 'Bio.PopGen',
400 'Bio.PopGen.Async',
401 'Bio.PopGen.FDist',
402 'Bio.PopGen.GenePop',
96f01d5 2375: Activating SimCoal on Biopython setup
tiagoantao authored
403 'Bio.PopGen.SimCoal',
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
404 'Bio.Prosite',
405 'Bio.Rebase',
05f9ba2 Added Restriction enzyme package contributed by Frederic Sohm. This i…
chapmanb authored
406 'Bio.Restriction',
407 'Bio.Restriction._Update',
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
408 'Bio.Saf',
409 'Bio.SCOP',
410 'Bio.SeqIO',
411 'Bio.SeqUtils',
2214cae Added Sequencing directory to packages
chapmanb authored
412 'Bio.Sequencing',
7738632 Added Bio.Statistics.
mdehoon authored
413 'Bio.Statistics',
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
414 'Bio.SubsMat',
415 'Bio.SVDSuperimposer',
416 'Bio.SwissProt',
417 'Bio.UniGene',
418 'Bio.writers',
419 'Bio.writers.SeqRecord',
3a5d550 Adding Bio.Wise to the distribution
grouse authored
420 'Bio.Wise',
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
421 'Bio.WWW',
422 ]
423
593e65e Added Affymetrix package from Harry Zuzan
chapmanb authored
424 # packages that require Numeric Python
425 NUMPY_PACKAGES = [
426 'Bio.Affy',
427 'Bio.Cluster',
428 ]
429
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
430 EXTENSIONS = [
431 Extension('Bio.clistfns',
432 ['Bio/clistfnsmodule.c']
433 ),
434 Extension('Bio.cmathfns',
435 ['Bio/cmathfnsmodule.c',
436 'Bio/csupport.c'],
437 include_dirs=["Bio"]
438 ),
439 Extension('Bio.cstringfns',
440 ['Bio/cstringfnsmodule.c']
441 ),
442 Extension('Bio.cdistance',
443 ['Bio/cdistancemodule.c',
444 'Bio/csupport.c'],
445 include_dirs=["Bio"]
446 ),
447 Extension('Bio.cpairwise2',
448 ['Bio/cpairwise2module.c',
449 'Bio/csupport.c'],
450 include_dirs=["Bio"]
451 ),
452 Extension('Bio.trie',
453 ['Bio/triemodule.c',
454 'Bio/trie.c'],
455 include_dirs=["Bio"]
456 ),
457 Extension('Bio.cMarkovModel',
458 ['Bio/cMarkovModelmodule.c',
459 'Bio/csupport.c'],
460 include_dirs=["Bio"]
461 ),
969dae8 Uncommented mmCIF module because of problems if GNU's Flex is missing
nisse authored
462 # Extension('Bio.PDB.mmCIF.MMCIFlex',
463 # ['Bio/PDB/mmCIF/lex.yy.c',
464 # 'Bio/PDB/mmCIF/MMCIFlexmodule.c'],
465 # include_dirs=["Bio"],
466 # libraries=["fl"]
467 # ),
2800c6c *** empty log message ***
idoerg authored
468 Extension('Bio.Nexus.cnexus',
c2c11a9 Biopython now works with Python >= 2.3
idoerg authored
469 ['Bio/Nexus/cnexus.c']
470 ),
05f9ba2 Added Restriction enzyme package contributed by Frederic Sohm. This i…
chapmanb authored
471 Extension('Bio.Restriction.DNAUtils',
472 ['Bio/Restriction/DNAUtils.c']
473 ),
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
474 ]
475
593e65e Added Affymetrix package from Harry Zuzan
chapmanb authored
476 # extensions that require numeric python
477 NUMPY_EXTENSIONS = [
478 Extension('Bio.Cluster.cluster',
479 ['Bio/Cluster/clustermodule.c',
2ae6620 Bio.Cluster no longer uses ranlib.
mdehoon authored
480 'Bio/Cluster/cluster.c'],
593e65e Added Affymetrix package from Harry Zuzan
chapmanb authored
481 include_dirs=["Bio/Cluster"]
482 ),
c686839 The CEL file parser in Bio/Affy/celmodule.cc was replaced by a scanne…
mdehoon authored
483 # CplusplusExtension('Bio.Affy._cel', # The file parser in celmodule.cc was
484 # ['Bio/Affy/celmodule.cc'], # replaced by a scanner/consumer in
485 # language="c++" # CelFile.py, using Biopython's
486 # ), # parser framework
593e65e Added Affymetrix package from Harry Zuzan
chapmanb authored
487 ]
488
9283de6 fixed installation of Bio/EUtils/DTDs
jchang authored
489 DATA_FILES=[
b9fe0cc the EUtils dtd's were not being installed correctly, when the
jchang authored
490 "Bio/EUtils/DTDs/*.dtd",
96f01d5 2375: Activating SimCoal on Biopython setup
tiagoantao authored
491 "Bio/PopGen/SimCoal/data/*par"
9283de6 fixed installation of Bio/EUtils/DTDs
jchang authored
492 ]
493
b9fe0cc the EUtils dtd's were not being installed correctly, when the
jchang authored
494 # EUtils contains dtd files that need to be installed in the same
495 # directory as the python modules. Distutils doesn't have a simple
496 # way of handling this, and we need to subclass install_data. This
497 # code is adapted from the mx.TextTools distribution.
498
499 class install_data_biopython(install_data):
500 def finalize_options(self):
501 if self.install_dir is None:
502 installobj = self.distribution.get_command_obj('install')
503 self.install_dir = installobj.install_platlib
504 install_data.finalize_options(self)
505
506 def run (self):
507 import glob
508 if not self.dry_run:
509 self.mkpath(self.install_dir)
510 data_files = self.get_inputs()
511 for entry in data_files:
512 if type(entry) is not type(""):
513 raise ValueError, "data_files must be strings"
514 # Unix- to platform-convention conversion
515 entry = os.sep.join(entry.split("/"))
516 filenames = glob.glob(entry)
517 for filename in filenames:
518 dst = os.path.join(self.install_dir, filename)
519 dstdir = os.path.split(dst)[0]
520 if not self.dry_run:
521 self.mkpath(dstdir)
522 outfile = self.copy_file(filename, dst)[0]
523 else:
524 outfile = dst
525 self.outfiles.append(outfile)
9283de6 fixed installation of Bio/EUtils/DTDs
jchang authored
526
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
527
528 # Install BioSQL.
529 PACKAGES.append("BioSQL")
530
531 setup(
532 name='biopython',
b2ac1f4 Version number 1.44 for the upcoming release.
mdehoon authored
533 version='1.44',
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
534 author='The Biopython Consortium',
535 author_email='biopython@biopython.org',
536 url='http://www.biopython.org/',
537 cmdclass={
538 "install" : install_biopython,
539 "build_py" : build_py_biopython,
a8ae40f now installs Martel and doesn't complain about it
jchang authored
540 "build_ext" : build_ext_biopython,
b9fe0cc the EUtils dtd's were not being installed correctly, when the
jchang authored
541 "install_data" : install_data_biopython,
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
542 "test" : test_biopython,
543 },
544 packages=PACKAGES,
545 ext_modules=EXTENSIONS,
9283de6 fixed installation of Bio/EUtils/DTDs
jchang authored
546 data_files=DATA_FILES,
fdcb82e added code so that it now checks for dependencies before biopython is
jchang authored
547 )
Something went wrong with that request. Please try again.