]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blob - src/allmydata/_auto_deps.py
bump 'mock' dependency to >=0.8.0, to get the .call object
[tahoe-lafs/tahoe-lafs.git] / src / allmydata / _auto_deps.py
1 # Note: please minimize imports in this file. In particular, do not import
2 # any module from Tahoe-LAFS or its dependencies, and do not import any
3 # modules at all at global level. That includes setuptools and pkg_resources.
4 # It is ok to import modules from the Python Standard Library if they are
5 # always available, or the import is protected by try...except ImportError.
6
7 install_requires = [
8     # we require newer versions of setuptools (actually
9     # zetuptoolz) to build, but can handle older versions to run
10     "setuptools >= 0.6c6",
11
12     "zfec >= 1.1.0",
13
14     # Feisty has simplejson 1.4
15     "simplejson >= 1.4",
16
17     # zope.interface 3.6.3 and 3.6.4 are incompatible with Nevow (#1435).
18     "zope.interface <= 3.6.2, >= 3.6.5",
19
20     # * On Windows we need at least Twisted 9.0 to avoid an indirect
21     #   dependency on pywin32.
22     # * On Linux we need at least Twisted 10.1.0 for inotify support used by
23     #   the drop-upload frontend.
24     # * We also need Twisted 10.1 for the FTP frontend in order for Twisted's
25     #   FTP server to support asynchronous close.
26     # * When the cloud backend lands, it will depend on Twisted 10.2.0 which
27     #   includes the fix to https://twistedmatrix.com/trac/ticket/411
28     # * The SFTP frontend depends on Twisted 11.0.0 to fix the SSH server
29     #   rekeying bug http://twistedmatrix.com/trac/ticket/4395
30     #
31     "Twisted >= 11.0.0",
32
33     # * foolscap < 0.5.1 had a performance bug which spent O(N**2) CPU for
34     #   transferring large mutable files of size N.
35     # * foolscap < 0.6 is incompatible with Twisted 10.2.0.
36     # * foolscap 0.6.1 quiets a DeprecationWarning.
37     # * foolscap < 0.6.3 is incompatible with Twisted-11.1.0 and newer. Since
38     #   current Twisted is 12.0, any build which needs twisted will grab a
39     #   version that requires foolscap>=0.6.3
40     # * pyOpenSSL is required by foolscap for it (foolscap) to provide secure
41     #   connections. Foolscap doesn't reliably declare this dependency in a
42     #   machine-readable way, so we need to declare a dependency on pyOpenSSL
43     #   ourselves. Tahoe-LAFS doesn't *really* depend directly on pyOpenSSL,
44     #   so if something changes in the relationship between foolscap and
45     #   pyOpenSSL, such as foolscap requiring a specific version of
46     #   pyOpenSSL, or foolscap switching from pyOpenSSL to a different crypto
47     #   library, we need to update this declaration here.
48     #
49     "foolscap >= 0.6.3",
50     "pyOpenSSL",
51
52     "Nevow >= 0.6.0",
53
54     # Needed for SFTP. pyasn1 is needed by twisted.conch in Twisted >= 9.0.
55     # pycrypto 2.2 doesn't work due to https://bugs.launchpad.net/pycrypto/+bug/620253
56     # pycrypto 2.4 doesn't work due to https://bugs.launchpad.net/pycrypto/+bug/881130
57     "pycrypto == 2.1.0, == 2.3, >= 2.4.1",
58     "pyasn1 >= 0.0.8a",
59
60     # http://www.voidspace.org.uk/python/mock/ , 0.8.0 provides "call"
61     "mock >= 0.8.0",
62
63     # pycryptopp-0.6.0 includes ed25519
64     "pycryptopp >= 0.6.0",
65
66     # Will be needed to test web apps, but not yet. See #1001.
67     #"windmill >= 1.3",
68 ]
69
70 # Includes some indirect dependencies, but does not include allmydata.
71 # These are in the order they should be listed by --version, etc.
72 package_imports = [
73     # package name      module name
74     ('foolscap',        'foolscap'),
75     ('pycryptopp',      'pycryptopp'),
76     ('zfec',            'zfec'),
77     ('Twisted',         'twisted'),
78     ('Nevow',           'nevow'),
79     ('zope.interface',  'zope.interface'),
80     ('python',          None),
81     ('platform',        None),
82     ('pyOpenSSL',       'OpenSSL'),
83     ('simplejson',      'simplejson'),
84     ('pycrypto',        'Crypto'),
85     ('pyasn1',          'pyasn1'),
86     ('mock',            'mock'),
87 ]
88
89 def require_more():
90     import sys
91
92     # Don't try to get the version number of setuptools in frozen builds, because
93     # that triggers 'site' processing that causes failures. Note that frozen
94     # builds still (unfortunately) import pkg_resources in .tac files, so the
95     # entry for setuptools in install_requires above isn't conditional.
96     if not hasattr(sys, 'frozen'):
97         package_imports.append(('setuptools', 'setuptools'))
98
99 require_more()
100
101
102 # These are suppressed globally:
103
104 global_deprecation_messages = [
105     "BaseException.message has been deprecated as of Python 2.6",
106     "twisted.internet.interfaces.IFinishableConsumer was deprecated in Twisted 11.1.0: Please use IConsumer (and IConsumer.unregisterProducer) instead.",
107 ]
108
109 # These are suppressed while importing dependencies:
110
111 deprecation_messages = [
112     "the sha module is deprecated; use the hashlib module instead",
113     "object.__new__\(\) takes no parameters",
114     "The popen2 module is deprecated.  Use the subprocess module.",
115     "the md5 module is deprecated; use hashlib instead",
116     "twisted.web.error.NoResource is deprecated since Twisted 9.0.  See twisted.web.resource.NoResource.",
117     "the sets module is deprecated",
118 ]
119
120 user_warning_messages = [
121     "Hashing uninitialized InterfaceClass instance",
122     "Reliable disconnection notification requires pywin32 215 or later",
123 ]
124
125 runtime_warning_messages = [
126     "Not using mpz_powm_sec.  You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.",
127 ]
128
129 warning_imports = [
130     'nevow',
131     'twisted.persisted.sob',
132     'twisted.python.filepath',
133     'Crypto.Hash.SHA',
134 ]