Alex Gaynor | 5951f46 | 2014-11-16 09:08:42 -0800 | [diff] [blame] | 1 | # This file is dual licensed under the terms of the Apache License, Version |
| 2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository |
| 3 | # for complete details. |
Alex Gaynor | c37feed | 2014-03-08 08:32:56 -0800 | [diff] [blame] | 4 | |
| 5 | from __future__ import absolute_import, division, print_function |
| 6 | |
Alex Gaynor | f51f2c1 | 2014-01-03 07:33:01 -0800 | [diff] [blame] | 7 | import os |
Terry Chia | 361545d | 2014-07-28 12:06:54 +0800 | [diff] [blame] | 8 | import platform |
Alex Stapleton | a39a319 | 2014-03-14 20:03:12 +0000 | [diff] [blame] | 9 | import subprocess |
Alex Stapleton | 707b008 | 2014-04-20 22:24:41 +0100 | [diff] [blame] | 10 | import sys |
Alex Stapleton | 4b610cc | 2014-03-22 08:49:35 +0000 | [diff] [blame] | 11 | from distutils.command.build import build |
Alex Stapleton | a39a319 | 2014-03-14 20:03:12 +0000 | [diff] [blame] | 12 | |
| 13 | import pkg_resources |
Alex Gaynor | 9a00f05 | 2014-01-02 13:09:34 -0800 | [diff] [blame] | 14 | |
Paul Kehrer | afc1ccd | 2014-03-19 11:49:32 -0400 | [diff] [blame] | 15 | from setuptools import find_packages, setup |
Sascha Peilicke | c549205 | 2014-03-31 17:59:37 +0200 | [diff] [blame] | 16 | from setuptools.command.install import install |
Alex Gaynor | acac6a6 | 2014-03-04 15:24:03 -0800 | [diff] [blame] | 17 | from setuptools.command.test import test |
Donald Stufft | 446a457 | 2013-08-11 17:38:13 -0400 | [diff] [blame] | 18 | |
Paul Kehrer | afc1ccd | 2014-03-19 11:49:32 -0400 | [diff] [blame] | 19 | |
Alex Gaynor | 7630d6c | 2014-01-03 07:34:43 -0800 | [diff] [blame] | 20 | base_dir = os.path.dirname(__file__) |
Donald Stufft | c62a78c | 2014-11-07 19:17:08 -0500 | [diff] [blame] | 21 | src_dir = os.path.join(base_dir, "src") |
| 22 | |
| 23 | # When executing the setup.py, we need to be able to import ourselves, this |
| 24 | # means that we need to add the src/ directory to the sys.path. |
| 25 | sys.path.insert(0, src_dir) |
Alex Gaynor | 7630d6c | 2014-01-03 07:34:43 -0800 | [diff] [blame] | 26 | |
Donald Stufft | 5f12a1b | 2013-08-11 16:37:43 -0400 | [diff] [blame] | 27 | about = {} |
Donald Stufft | c62a78c | 2014-11-07 19:17:08 -0500 | [diff] [blame] | 28 | with open(os.path.join(src_dir, "cryptography", "__about__.py")) as f: |
Alex Gaynor | 7630d6c | 2014-01-03 07:34:43 -0800 | [diff] [blame] | 29 | exec(f.read(), about) |
Donald Stufft | 5f12a1b | 2013-08-11 16:37:43 -0400 | [diff] [blame] | 30 | |
| 31 | |
Alex Stapleton | a39a319 | 2014-03-14 20:03:12 +0000 | [diff] [blame] | 32 | VECTORS_DEPENDENCY = "cryptography_vectors=={0}".format(about['__version__']) |
Donald Stufft | 5f12a1b | 2013-08-11 16:37:43 -0400 | [diff] [blame] | 33 | |
Alex Gaynor | 91f119e | 2014-01-02 13:12:59 -0800 | [diff] [blame] | 34 | requirements = [ |
Paul Kehrer | 71a1621 | 2015-05-18 18:59:25 -0700 | [diff] [blame] | 35 | "idna>=2.0", |
Paul Kehrer | a98f95a | 2014-11-27 09:55:17 -1000 | [diff] [blame] | 36 | "pyasn1", |
Alex Gaynor | 2119f74 | 2015-04-13 09:50:31 -0400 | [diff] [blame] | 37 | "six>=1.4.1", |
| 38 | "setuptools" |
Donald Stufft | 5f12a1b | 2013-08-11 16:37:43 -0400 | [diff] [blame] | 39 | ] |
| 40 | |
Paul Kehrer | 5bea5ca | 2014-12-18 07:42:27 -0600 | [diff] [blame] | 41 | if sys.version_info < (3, 4): |
| 42 | requirements.append("enum34") |
| 43 | |
Paul Kehrer | 31bdf79 | 2015-03-25 14:11:00 -0500 | [diff] [blame] | 44 | if sys.version_info < (3, 3): |
| 45 | requirements.append("ipaddress") |
| 46 | |
Julian Berman | 4cf3811 | 2015-02-24 10:51:53 -0500 | [diff] [blame] | 47 | if platform.python_implementation() != "PyPy": |
Paul Kehrer | 68b3b1e | 2015-05-19 13:05:21 -0700 | [diff] [blame^] | 48 | requirements.append("cffi>=1.1.0") |
Julian Berman | 4cf3811 | 2015-02-24 10:51:53 -0500 | [diff] [blame] | 49 | |
Paul Kehrer | 7ad18bc | 2014-03-26 13:13:38 -0600 | [diff] [blame] | 50 | # If you add a new dep here you probably need to add it in the tox.ini as well |
koobs | ff0dd1e | 2014-02-24 21:55:04 +1100 | [diff] [blame] | 51 | test_requirements = [ |
| 52 | "pytest", |
| 53 | "pretend", |
Alex Stapleton | 0bd20e2 | 2014-03-14 19:58:07 +0000 | [diff] [blame] | 54 | "iso8601", |
koobs | ff0dd1e | 2014-02-24 21:55:04 +1100 | [diff] [blame] | 55 | ] |
| 56 | |
Alex Stapleton | a39a319 | 2014-03-14 20:03:12 +0000 | [diff] [blame] | 57 | # If there's no vectors locally that probably means we are in a tarball and |
| 58 | # need to go and get the matching vectors package from PyPi |
| 59 | if not os.path.exists(os.path.join(base_dir, "vectors/setup.py")): |
| 60 | test_requirements.append(VECTORS_DEPENDENCY) |
| 61 | |
Alex Gaynor | 9a00f05 | 2014-01-02 13:09:34 -0800 | [diff] [blame] | 62 | |
Terry Chia | 361545d | 2014-07-28 12:06:54 +0800 | [diff] [blame] | 63 | def cc_is_available(): |
| 64 | return sys.platform == "darwin" and list(map( |
| 65 | int, platform.mac_ver()[0].split("."))) >= [10, 8, 0] |
| 66 | |
| 67 | |
| 68 | backends = [ |
| 69 | "openssl = cryptography.hazmat.backends.openssl:backend" |
| 70 | ] |
| 71 | |
| 72 | if cc_is_available(): |
| 73 | backends.append( |
| 74 | "commoncrypto = cryptography.hazmat.backends.commoncrypto:backend", |
| 75 | ) |
| 76 | |
| 77 | |
Alex Gaynor | acac6a6 | 2014-03-04 15:24:03 -0800 | [diff] [blame] | 78 | class PyTest(test): |
koobs | ff0dd1e | 2014-02-24 21:55:04 +1100 | [diff] [blame] | 79 | def finalize_options(self): |
Alex Gaynor | 6858cd4 | 2014-03-04 15:33:13 -0800 | [diff] [blame] | 80 | test.finalize_options(self) |
koobs | ff0dd1e | 2014-02-24 21:55:04 +1100 | [diff] [blame] | 81 | self.test_args = [] |
| 82 | self.test_suite = True |
koobs | 0667180 | 2014-02-24 22:33:07 +1100 | [diff] [blame] | 83 | |
Alex Stapleton | a39a319 | 2014-03-14 20:03:12 +0000 | [diff] [blame] | 84 | # This means there's a vectors/ folder with the package in here. |
| 85 | # cd into it, install the vectors package and then refresh sys.path |
| 86 | if VECTORS_DEPENDENCY not in test_requirements: |
Alex Gaynor | d9f9b75 | 2014-07-11 10:18:24 -0700 | [diff] [blame] | 87 | subprocess.check_call( |
| 88 | [sys.executable, "setup.py", "install"], cwd="vectors" |
| 89 | ) |
Alex Stapleton | a39a319 | 2014-03-14 20:03:12 +0000 | [diff] [blame] | 90 | pkg_resources.get_distribution("cryptography_vectors").activate() |
| 91 | |
koobs | ff0dd1e | 2014-02-24 21:55:04 +1100 | [diff] [blame] | 92 | def run_tests(self): |
koobs | 92a4cdb | 2014-02-24 22:13:17 +1100 | [diff] [blame] | 93 | # Import here because in module scope the eggs are not loaded. |
koobs | ff0dd1e | 2014-02-24 21:55:04 +1100 | [diff] [blame] | 94 | import pytest |
Alex Gaynor | 8a58e69 | 2015-02-20 07:58:39 -0800 | [diff] [blame] | 95 | test_args = [os.path.join(base_dir, "tests")] |
| 96 | errno = pytest.main(test_args) |
koobs | ff0dd1e | 2014-02-24 21:55:04 +1100 | [diff] [blame] | 97 | sys.exit(errno) |
| 98 | |
Alex Gaynor | 9a00f05 | 2014-01-02 13:09:34 -0800 | [diff] [blame] | 99 | |
Peter Odding | 51ec05f | 2014-07-12 01:18:35 +0200 | [diff] [blame] | 100 | def keywords_with_side_effects(argv): |
Peter Odding | c9b83f7 | 2014-07-12 00:52:58 +0200 | [diff] [blame] | 101 | """ |
| 102 | Get a dictionary with setup keywords that (can) have side effects. |
| 103 | |
Peter Odding | 51ec05f | 2014-07-12 01:18:35 +0200 | [diff] [blame] | 104 | :param argv: A list of strings with command line arguments. |
| 105 | :returns: A dictionary with keyword arguments for the ``setup()`` function. |
| 106 | |
Peter Odding | c9b83f7 | 2014-07-12 00:52:58 +0200 | [diff] [blame] | 107 | This setup.py script uses the setuptools 'setup_requires' feature because |
| 108 | this is required by the cffi package to compile extension modules. The |
| 109 | purpose of ``keywords_with_side_effects()`` is to avoid triggering the cffi |
Peter Odding | e914456 | 2014-07-12 03:14:55 +0200 | [diff] [blame] | 110 | build process as a result of setup.py invocations that don't need the cffi |
| 111 | module to be built (setup.py serves the dual purpose of exposing package |
| 112 | metadata). |
Peter Odding | c9b83f7 | 2014-07-12 00:52:58 +0200 | [diff] [blame] | 113 | |
Peter Odding | e914456 | 2014-07-12 03:14:55 +0200 | [diff] [blame] | 114 | All of the options listed by ``python setup.py --help`` that print |
| 115 | information should be recognized here. The commands ``clean``, |
| 116 | ``egg_info``, ``register``, ``sdist`` and ``upload`` are also recognized. |
| 117 | Any combination of these options and commands is also supported. |
Peter Odding | c9b83f7 | 2014-07-12 00:52:58 +0200 | [diff] [blame] | 118 | |
Peter Odding | e914456 | 2014-07-12 03:14:55 +0200 | [diff] [blame] | 119 | This function was originally based on the `setup.py script`_ of SciPy (see |
| 120 | also the discussion in `pip issue #25`_). |
Peter Odding | c9b83f7 | 2014-07-12 00:52:58 +0200 | [diff] [blame] | 121 | |
| 122 | .. _pip issue #25: https://github.com/pypa/pip/issues/25 |
Peter Odding | 63ce5df | 2014-07-12 01:56:37 +0200 | [diff] [blame] | 123 | .. _setup.py script: https://github.com/scipy/scipy/blob/master/setup.py |
Peter Odding | c9b83f7 | 2014-07-12 00:52:58 +0200 | [diff] [blame] | 124 | """ |
Peter Odding | e914456 | 2014-07-12 03:14:55 +0200 | [diff] [blame] | 125 | no_setup_requires_arguments = ( |
| 126 | '-h', '--help', |
| 127 | '-n', '--dry-run', |
| 128 | '-q', '--quiet', |
| 129 | '-v', '--verbose', |
| 130 | '-V', '--version', |
| 131 | '--author', |
| 132 | '--author-email', |
| 133 | '--classifiers', |
| 134 | '--contact', |
| 135 | '--contact-email', |
| 136 | '--description', |
Peter Odding | 6c1e9ef | 2014-07-14 15:50:31 +0200 | [diff] [blame] | 137 | '--egg-base', |
Peter Odding | e914456 | 2014-07-12 03:14:55 +0200 | [diff] [blame] | 138 | '--fullname', |
| 139 | '--help-commands', |
| 140 | '--keywords', |
| 141 | '--licence', |
| 142 | '--license', |
| 143 | '--long-description', |
| 144 | '--maintainer', |
| 145 | '--maintainer-email', |
| 146 | '--name', |
| 147 | '--no-user-cfg', |
| 148 | '--obsoletes', |
| 149 | '--platforms', |
| 150 | '--provides', |
| 151 | '--requires', |
| 152 | '--url', |
| 153 | 'clean', |
| 154 | 'egg_info', |
| 155 | 'register', |
| 156 | 'sdist', |
| 157 | 'upload', |
| 158 | ) |
Peter Odding | 97f4530 | 2014-07-14 21:40:35 +0200 | [diff] [blame] | 159 | |
Peter Odding | 6c1e9ef | 2014-07-14 15:50:31 +0200 | [diff] [blame] | 160 | def is_short_option(argument): |
| 161 | """Check whether a command line argument is a short option.""" |
| 162 | return len(argument) >= 2 and argument[0] == '-' and argument[1] != '-' |
Peter Odding | 97f4530 | 2014-07-14 21:40:35 +0200 | [diff] [blame] | 163 | |
Peter Odding | 6c1e9ef | 2014-07-14 15:50:31 +0200 | [diff] [blame] | 164 | def expand_short_options(argument): |
| 165 | """Expand combined short options into canonical short options.""" |
| 166 | return ('-' + char for char in argument[1:]) |
Peter Odding | 97f4530 | 2014-07-14 21:40:35 +0200 | [diff] [blame] | 167 | |
Peter Odding | 6c1e9ef | 2014-07-14 15:50:31 +0200 | [diff] [blame] | 168 | def argument_without_setup_requirements(argv, i): |
| 169 | """Check whether a command line argument needs setup requirements.""" |
| 170 | if argv[i] in no_setup_requires_arguments: |
| 171 | # Simple case: An argument which is either an option or a command |
| 172 | # which doesn't need setup requirements. |
| 173 | return True |
Peter Odding | 97f4530 | 2014-07-14 21:40:35 +0200 | [diff] [blame] | 174 | elif (is_short_option(argv[i]) and |
| 175 | all(option in no_setup_requires_arguments |
| 176 | for option in expand_short_options(argv[i]))): |
Peter Odding | 6c1e9ef | 2014-07-14 15:50:31 +0200 | [diff] [blame] | 177 | # Not so simple case: Combined short options none of which need |
| 178 | # setup requirements. |
| 179 | return True |
Peter Odding | 97f4530 | 2014-07-14 21:40:35 +0200 | [diff] [blame] | 180 | elif argv[i - 1:i] == ['--egg-base']: |
Peter Odding | 6c1e9ef | 2014-07-14 15:50:31 +0200 | [diff] [blame] | 181 | # Tricky case: --egg-info takes an argument which should not make |
| 182 | # us use setup_requires (defeating the purpose of this code). |
| 183 | return True |
| 184 | else: |
| 185 | return False |
Peter Odding | 97f4530 | 2014-07-14 21:40:35 +0200 | [diff] [blame] | 186 | |
| 187 | if all(argument_without_setup_requirements(argv, i) |
| 188 | for i in range(1, len(argv))): |
Peter Odding | 3ae89a5 | 2014-07-12 02:06:56 +0200 | [diff] [blame] | 189 | return { |
| 190 | "cmdclass": { |
Paul Kehrer | 68b3b1e | 2015-05-19 13:05:21 -0700 | [diff] [blame^] | 191 | "build": DummyBuild, |
| 192 | "install": DummyInstall, |
Peter Odding | 3ae89a5 | 2014-07-12 02:06:56 +0200 | [diff] [blame] | 193 | "test": DummyPyTest, |
| 194 | } |
| 195 | } |
Peter Odding | c9b83f7 | 2014-07-12 00:52:58 +0200 | [diff] [blame] | 196 | else: |
Paul Kehrer | 68b3b1e | 2015-05-19 13:05:21 -0700 | [diff] [blame^] | 197 | cffi_modules = [ |
| 198 | "src/_cffi_src/build_openssl.py:ffi", |
| 199 | "src/_cffi_src/build_constant_time.py:ffi", |
| 200 | "src/_cffi_src/build_padding.py:ffi", |
| 201 | ] |
| 202 | if cc_is_available(): |
| 203 | cffi_modules.append("src/_cffi_src/build_commoncrypto.py:ffi") |
| 204 | |
Peter Odding | e327cf1 | 2014-07-12 01:18:50 +0200 | [diff] [blame] | 205 | return { |
| 206 | "setup_requires": requirements, |
| 207 | "cmdclass": { |
Peter Odding | e327cf1 | 2014-07-12 01:18:50 +0200 | [diff] [blame] | 208 | "test": PyTest, |
Paul Kehrer | 68b3b1e | 2015-05-19 13:05:21 -0700 | [diff] [blame^] | 209 | }, |
| 210 | "cffi_modules": cffi_modules |
Peter Odding | e327cf1 | 2014-07-12 01:18:50 +0200 | [diff] [blame] | 211 | } |
Peter Odding | c9b83f7 | 2014-07-12 00:52:58 +0200 | [diff] [blame] | 212 | |
| 213 | |
Peter Odding | 3ae89a5 | 2014-07-12 02:06:56 +0200 | [diff] [blame] | 214 | setup_requires_error = ("Requested setup command that needs 'setup_requires' " |
| 215 | "while command line arguments implied a side effect " |
| 216 | "free command or option.") |
| 217 | |
| 218 | |
Paul Kehrer | 68b3b1e | 2015-05-19 13:05:21 -0700 | [diff] [blame^] | 219 | class DummyBuild(build): |
Peter Odding | 3ae89a5 | 2014-07-12 02:06:56 +0200 | [diff] [blame] | 220 | """ |
| 221 | This class makes it very obvious when ``keywords_with_side_effects()`` has |
| 222 | incorrectly interpreted the command line arguments to ``setup.py build`` as |
| 223 | one of the 'side effect free' commands or options. |
| 224 | """ |
| 225 | |
Peter Odding | dcce080 | 2014-07-12 02:28:13 +0200 | [diff] [blame] | 226 | def run(self): |
Peter Odding | 3ae89a5 | 2014-07-12 02:06:56 +0200 | [diff] [blame] | 227 | raise RuntimeError(setup_requires_error) |
| 228 | |
| 229 | |
Paul Kehrer | 68b3b1e | 2015-05-19 13:05:21 -0700 | [diff] [blame^] | 230 | class DummyInstall(install): |
Peter Odding | 3ae89a5 | 2014-07-12 02:06:56 +0200 | [diff] [blame] | 231 | """ |
| 232 | This class makes it very obvious when ``keywords_with_side_effects()`` has |
| 233 | incorrectly interpreted the command line arguments to ``setup.py install`` |
| 234 | as one of the 'side effect free' commands or options. |
| 235 | """ |
| 236 | |
Peter Odding | dcce080 | 2014-07-12 02:28:13 +0200 | [diff] [blame] | 237 | def run(self): |
Peter Odding | 3ae89a5 | 2014-07-12 02:06:56 +0200 | [diff] [blame] | 238 | raise RuntimeError(setup_requires_error) |
| 239 | |
| 240 | |
Peter Odding | c9861f9 | 2014-07-13 04:17:20 +0200 | [diff] [blame] | 241 | class DummyPyTest(test): |
Peter Odding | 3ae89a5 | 2014-07-12 02:06:56 +0200 | [diff] [blame] | 242 | """ |
| 243 | This class makes it very obvious when ``keywords_with_side_effects()`` has |
| 244 | incorrectly interpreted the command line arguments to ``setup.py test`` as |
| 245 | one of the 'side effect free' commands or options. |
| 246 | """ |
| 247 | |
Peter Odding | 3ae89a5 | 2014-07-12 02:06:56 +0200 | [diff] [blame] | 248 | def run_tests(self): |
| 249 | raise RuntimeError(setup_requires_error) |
| 250 | |
| 251 | |
Alex Gaynor | 7630d6c | 2014-01-03 07:34:43 -0800 | [diff] [blame] | 252 | with open(os.path.join(base_dir, "README.rst")) as f: |
Alex Gaynor | f51f2c1 | 2014-01-03 07:33:01 -0800 | [diff] [blame] | 253 | long_description = f.read() |
| 254 | |
| 255 | |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 256 | setup( |
Donald Stufft | 5f12a1b | 2013-08-11 16:37:43 -0400 | [diff] [blame] | 257 | name=about["__title__"], |
| 258 | version=about["__version__"], |
| 259 | |
| 260 | description=about["__summary__"], |
Alex Gaynor | f51f2c1 | 2014-01-03 07:33:01 -0800 | [diff] [blame] | 261 | long_description=long_description, |
Donald Stufft | 5f12a1b | 2013-08-11 16:37:43 -0400 | [diff] [blame] | 262 | license=about["__license__"], |
| 263 | url=about["__uri__"], |
| 264 | |
| 265 | author=about["__author__"], |
| 266 | author_email=about["__email__"], |
| 267 | |
Christian Heimes | f83ed1d | 2013-08-10 23:28:29 +0200 | [diff] [blame] | 268 | classifiers=[ |
Christian Heimes | f83ed1d | 2013-08-10 23:28:29 +0200 | [diff] [blame] | 269 | "Intended Audience :: Developers", |
| 270 | "License :: OSI Approved :: Apache Software License", |
Alex Gaynor | abe8bc9 | 2014-10-31 19:28:57 -0700 | [diff] [blame] | 271 | "License :: OSI Approved :: BSD License", |
Christian Heimes | f83ed1d | 2013-08-10 23:28:29 +0200 | [diff] [blame] | 272 | "Natural Language :: English", |
| 273 | "Operating System :: MacOS :: MacOS X", |
| 274 | "Operating System :: POSIX", |
| 275 | "Operating System :: POSIX :: BSD", |
| 276 | "Operating System :: POSIX :: Linux", |
| 277 | "Operating System :: Microsoft :: Windows", |
Christian Heimes | f83ed1d | 2013-08-10 23:28:29 +0200 | [diff] [blame] | 278 | "Programming Language :: Python", |
| 279 | "Programming Language :: Python :: 2", |
| 280 | "Programming Language :: Python :: 2.6", |
| 281 | "Programming Language :: Python :: 2.7", |
| 282 | "Programming Language :: Python :: 3", |
Christian Heimes | f83ed1d | 2013-08-10 23:28:29 +0200 | [diff] [blame] | 283 | "Programming Language :: Python :: 3.3", |
Alex Gaynor | 7f8b277 | 2014-03-17 10:22:41 -0700 | [diff] [blame] | 284 | "Programming Language :: Python :: 3.4", |
Christian Heimes | f83ed1d | 2013-08-10 23:28:29 +0200 | [diff] [blame] | 285 | "Programming Language :: Python :: Implementation :: CPython", |
| 286 | "Programming Language :: Python :: Implementation :: PyPy", |
| 287 | "Topic :: Security :: Cryptography", |
| 288 | ], |
Donald Stufft | 5f12a1b | 2013-08-11 16:37:43 -0400 | [diff] [blame] | 289 | |
Donald Stufft | c62a78c | 2014-11-07 19:17:08 -0500 | [diff] [blame] | 290 | package_dir={"": "src"}, |
Paul Kehrer | 68b3b1e | 2015-05-19 13:05:21 -0700 | [diff] [blame^] | 291 | packages=find_packages( |
| 292 | where="src", exclude=["_cffi_src", "_cffi_src.*", "tests", "tests.*"] |
| 293 | ), |
Alex Gaynor | e23dd3a | 2014-08-11 13:51:54 -0700 | [diff] [blame] | 294 | include_package_data=True, |
Donald Stufft | 9ebb8ff | 2013-08-11 17:05:03 -0400 | [diff] [blame] | 295 | |
Alex Gaynor | 91f119e | 2014-01-02 13:12:59 -0800 | [diff] [blame] | 296 | install_requires=requirements, |
koobs | ff0dd1e | 2014-02-24 21:55:04 +1100 | [diff] [blame] | 297 | tests_require=test_requirements, |
Donald Stufft | 5f12a1b | 2013-08-11 16:37:43 -0400 | [diff] [blame] | 298 | |
| 299 | # for cffi |
| 300 | zip_safe=False, |
Paul Kehrer | 68b3b1e | 2015-05-19 13:05:21 -0700 | [diff] [blame^] | 301 | ext_package="cryptography.hazmat.bindings", |
Terry Chia | da5dca8 | 2014-07-27 12:27:52 +0800 | [diff] [blame] | 302 | entry_points={ |
Terry Chia | 361545d | 2014-07-28 12:06:54 +0800 | [diff] [blame] | 303 | "cryptography.backends": backends, |
Peter Odding | c9b83f7 | 2014-07-12 00:52:58 +0200 | [diff] [blame] | 304 | }, |
Peter Odding | 51ec05f | 2014-07-12 01:18:35 +0200 | [diff] [blame] | 305 | **keywords_with_side_effects(sys.argv) |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 306 | ) |