[3] | 1 | #!/usr/bin/env python |
---|
| 2 | |
---|
[96] | 3 | # Copyright (c) Ralph Meijer. |
---|
[3] | 4 | # See LICENSE for details. |
---|
| 5 | |
---|
| 6 | from setuptools import setup |
---|
| 7 | |
---|
[175] | 8 | # Make sure 'twisted' doesn't appear in top_level.txt |
---|
| 9 | |
---|
| 10 | try: |
---|
| 11 | from setuptools.command import egg_info |
---|
| 12 | egg_info.write_toplevel_names |
---|
| 13 | except (ImportError, AttributeError): |
---|
| 14 | pass |
---|
| 15 | else: |
---|
| 16 | def _top_level_package(name): |
---|
| 17 | return name.split('.', 1)[0] |
---|
| 18 | |
---|
| 19 | def _hacked_write_toplevel_names(cmd, basename, filename): |
---|
| 20 | pkgs = dict.fromkeys( |
---|
| 21 | [_top_level_package(k) |
---|
| 22 | for k in cmd.distribution.iter_distribution_names() |
---|
| 23 | if _top_level_package(k) != "twisted" |
---|
| 24 | ] |
---|
| 25 | ) |
---|
| 26 | cmd.write_file("top-level names", filename, '\n'.join(pkgs) + '\n') |
---|
| 27 | |
---|
| 28 | egg_info.write_toplevel_names = _hacked_write_toplevel_names |
---|
| 29 | |
---|
[228] | 30 | with open('README.rst', 'r') as f: |
---|
| 31 | long_description = f.read() |
---|
[210] | 32 | |
---|
[3] | 33 | setup(name='wokkel', |
---|
| 34 | description='Twisted Jabber support library', |
---|
[228] | 35 | long_description = long_description, |
---|
[3] | 36 | author='Ralph Meijer', |
---|
| 37 | author_email='ralphm@ik.nu', |
---|
| 38 | maintainer_email='ralphm@ik.nu', |
---|
[228] | 39 | url='https://wokkel.ik.nu/', |
---|
[3] | 40 | license='MIT', |
---|
| 41 | platforms='any', |
---|
[228] | 42 | classifiers=[ |
---|
| 43 | 'Programming Language :: Python :: 2.7', |
---|
| 44 | 'Programming Language :: Python :: 3', |
---|
| 45 | 'Programming Language :: Python :: 3.3', |
---|
| 46 | 'Programming Language :: Python :: 3.4', |
---|
| 47 | 'Programming Language :: Python :: 3.5' |
---|
| 48 | ], |
---|
[3] | 49 | packages=[ |
---|
| 50 | 'wokkel', |
---|
[19] | 51 | 'wokkel.test', |
---|
[91] | 52 | 'twisted.plugins', |
---|
[3] | 53 | ], |
---|
[91] | 54 | package_data={'twisted.plugins': ['twisted/plugins/server.py']}, |
---|
[163] | 55 | zip_safe=False, |
---|
[228] | 56 | setup_requires=[ |
---|
| 57 | 'incremental', |
---|
| 58 | ], |
---|
| 59 | use_incremental=True, |
---|
[163] | 60 | install_requires=[ |
---|
[228] | 61 | 'incremental', |
---|
[163] | 62 | 'python-dateutil', |
---|
| 63 | ], |
---|
[228] | 64 | extras_require={ |
---|
| 65 | ":python_version<'3'": 'Twisted[tls]>=15.5.0', |
---|
| 66 | ":python_version>'3'": 'Twisted[tls]>=16.4.0', |
---|
| 67 | }, |
---|
[3] | 68 | ) |
---|