Skip to content

HTTPS clone URL

Subversion checkout URL

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