| 74 | |
| 75 | |
| 76 | def run_setup(with_binary): |
| 77 | if with_binary: |
| 78 | extensions = dict( |
| 79 | ext_modules=[ |
| 80 | Extension('thrift.protocol.fastbinary', |
| 81 | extra_compile_args=['-std=c++11'], |
| 82 | sources=[ |
| 83 | 'src/ext/module.cpp', |
| 84 | 'src/ext/types.cpp', |
| 85 | 'src/ext/binary.cpp', |
| 86 | 'src/ext/compact.cpp', |
| 87 | ], |
| 88 | depends=[ |
| 89 | 'src/ext/binary.h', |
| 90 | 'src/ext/compact.h', |
| 91 | 'src/ext/endian.h', |
| 92 | 'src/ext/protocol.h', |
| 93 | 'src/ext/protocol.tcc', |
| 94 | 'src/ext/types.h', |
| 95 | ], |
| 96 | include_dirs=include_dirs, |
| 97 | ) |
| 98 | ], |
| 99 | cmdclass=dict(build_ext=ve_build_ext) |
| 100 | ) |
| 101 | else: |
| 102 | extensions = dict() |
| 103 | |
| 104 | ssl_deps = [] |
| 105 | if sys.hexversion < 0x03050000: |
| 106 | ssl_deps.append('backports.ssl_match_hostname>=3.5') |
| 107 | tornado_deps = ['tornado>=6.3.0'] |
| 108 | twisted_deps = ['twisted>=24.3.0', 'zope.interface>=6.1'] |
| 109 | |
| 110 | setup(name='thrift', |
| 111 | version='0.23.0', |
| 112 | description='Python bindings for the Apache Thrift RPC system', |
| 113 | long_description=read_file("README.md"), |
| 114 | long_description_content_type="text/markdown", |
| 115 | author='Apache Thrift Developers', |
| 116 | author_email='dev@thrift.apache.org', |
| 117 | url='http://thrift.apache.org', |
| 118 | license='Apache License 2.0', |
| 119 | extras_require={ |
| 120 | 'ssl': ssl_deps, |
| 121 | 'tornado': tornado_deps, |
| 122 | 'twisted': twisted_deps, |
| 123 | 'all': ssl_deps + tornado_deps + twisted_deps, |
| 124 | }, |
| 125 | packages=[ |
| 126 | 'thrift', |
| 127 | 'thrift.protocol', |
| 128 | 'thrift.transport', |
| 129 | 'thrift.server', |
| 130 | ], |
| 131 | package_dir={'thrift': 'src'}, |
| 132 | classifiers=[ |
| 133 | 'Development Status :: 5 - Production/Stable', |