| 1 | #!/usr/bin/env python
|
|---|
| 2 | # -*- coding: utf-8 -*-
|
|---|
| 3 | #
|
|---|
| 4 | # Copyright (C) 2006-2015 Edgewall Software
|
|---|
| 5 | # All rights reserved.
|
|---|
| 6 | #
|
|---|
| 7 | # This software is licensed as described in the file COPYING, which
|
|---|
| 8 | # you should have received as part of this distribution. The terms
|
|---|
| 9 | # are also available at http://trac.edgewall.com/license.html.
|
|---|
| 10 | #
|
|---|
| 11 | # This software consists of voluntary contributions made by many
|
|---|
| 12 | # individuals. For the exact contribution history, see the revision
|
|---|
| 13 | # history and logs, available at http://projects.edgewall.com/trac/.
|
|---|
| 14 |
|
|---|
| 15 | import sys
|
|---|
| 16 | from setuptools import setup, find_packages
|
|---|
| 17 |
|
|---|
| 18 | PACKAGE = 'TracSpamFilter'
|
|---|
| 19 | VERSION = '1.0.12'
|
|---|
| 20 |
|
|---|
| 21 | extra = {}
|
|---|
| 22 | try:
|
|---|
| 23 | from trac.util.dist import get_l10n_cmdclass
|
|---|
| 24 | cmdclass = get_l10n_cmdclass()
|
|---|
| 25 | if cmdclass:
|
|---|
| 26 | extra['cmdclass'] = cmdclass
|
|---|
| 27 | extractors = [
|
|---|
| 28 | ('**.py', 'trac.dist:extract_python', None),
|
|---|
| 29 | ('**/templates/**.html', 'genshi', None)
|
|---|
| 30 | ]
|
|---|
| 31 | extra['message_extractors'] = {
|
|---|
| 32 | 'tracspamfilter': extractors,
|
|---|
| 33 | }
|
|---|
| 34 | except ImportError:
|
|---|
| 35 | pass
|
|---|
| 36 |
|
|---|
| 37 | setup(
|
|---|
| 38 | name=PACKAGE,
|
|---|
| 39 | version=VERSION,
|
|---|
| 40 | description='Plugin for spam filtering',
|
|---|
| 41 | author="Edgewall Software",
|
|---|
| 42 | author_email="info@edgewall.com",
|
|---|
| 43 | url='https://trac.edgewall.org/wiki/SpamFilter',
|
|---|
| 44 | download_url='https://trac.edgewall.org/wiki/SpamFilter',
|
|---|
| 45 | license='BSD',
|
|---|
| 46 | classifiers=[
|
|---|
| 47 | 'Framework :: Trac',
|
|---|
| 48 | 'License :: OSI Approved :: BSD License',
|
|---|
| 49 | ],
|
|---|
| 50 | keywords='trac plugin',
|
|---|
| 51 |
|
|---|
| 52 | packages=find_packages(exclude=['*.tests*']),
|
|---|
| 53 | package_data={'tracspamfilter': [
|
|---|
| 54 | 'templates/*',
|
|---|
| 55 | 'htdocs/*',
|
|---|
| 56 | 'fonts/*',
|
|---|
| 57 | 'locale/*/LC_MESSAGES/*.mo'
|
|---|
| 58 | ]},
|
|---|
| 59 | install_requires=['Trac'],
|
|---|
| 60 | extras_require={
|
|---|
| 61 | 'dns': ['dnspython>=1.3.5'],
|
|---|
| 62 | 'spambayes': ['spambayes'],
|
|---|
| 63 | 'pillow': ['pillow'],
|
|---|
| 64 | 'json': ['simplejson' if sys.version_info < (2, 6) else ''],
|
|---|
| 65 | 'account': ['TracAccountManager >= 0.4'],
|
|---|
| 66 | 'oauth': ['oauth2'],
|
|---|
| 67 | 'httplib2': ['httplib2']
|
|---|
| 68 | },
|
|---|
| 69 | entry_points="""
|
|---|
| 70 | [trac.plugins]
|
|---|
| 71 | spamfilter = tracspamfilter.api
|
|---|
| 72 | spamfilter.filtersystem = tracspamfilter.filtersystem
|
|---|
| 73 | spamfilter.admin = tracspamfilter.admin
|
|---|
| 74 | spamfilter.adminusers = tracspamfilter.adminusers
|
|---|
| 75 | spamfilter.adminreport = tracspamfilter.adminreport
|
|---|
| 76 | spamfilter.adapters = tracspamfilter.adapters
|
|---|
| 77 | spamfilter.report = tracspamfilter.report
|
|---|
| 78 | spamfilter.accountadapter = tracspamfilter.accountadapter[account]
|
|---|
| 79 | spamfilter.registration = tracspamfilter.filters.registration[account]
|
|---|
| 80 | spamfilter.akismet = tracspamfilter.filters.akismet
|
|---|
| 81 | spamfilter.stopforumspam = tracspamfilter.filters.stopforumspam
|
|---|
| 82 | spamfilter.botscout = tracspamfilter.filters.botscout
|
|---|
| 83 | spamfilter.fspamlist = tracspamfilter.filters.fspamlist
|
|---|
| 84 | spamfilter.blogspam = tracspamfilter.filters.blogspam[json]
|
|---|
| 85 | spamfilter.bayes = tracspamfilter.filters.bayes[spambayes]
|
|---|
| 86 | spamfilter.extlinks = tracspamfilter.filters.extlinks
|
|---|
| 87 | spamfilter.httpbl = tracspamfilter.filters.httpbl[dns]
|
|---|
| 88 | spamfilter.ip_blacklist = tracspamfilter.filters.ip_blacklist[dns]
|
|---|
| 89 | spamfilter.url_blacklist = tracspamfilter.filters.url_blacklist[dns]
|
|---|
| 90 | spamfilter.ip_throttle = tracspamfilter.filters.ip_throttle
|
|---|
| 91 | spamfilter.regex = tracspamfilter.filters.regex
|
|---|
| 92 | spamfilter.trapfield = tracspamfilter.filters.trapfield
|
|---|
| 93 | spamfilter.ip_regex = tracspamfilter.filters.ip_regex
|
|---|
| 94 | spamfilter.session = tracspamfilter.filters.session
|
|---|
| 95 | spamfilter.captcha = tracspamfilter.captcha.api
|
|---|
| 96 | spamfilter.captcha.admin = tracspamfilter.captcha.admin
|
|---|
| 97 | spamfilter.captcha.image = tracspamfilter.captcha.image[pillow]
|
|---|
| 98 | spamfilter.captcha.expression = tracspamfilter.captcha.expression
|
|---|
| 99 | spamfilter.captcha.rand = tracspamfilter.captcha.rand
|
|---|
| 100 | spamfilter.captcha.recaptcha = tracspamfilter.captcha.recaptcha
|
|---|
| 101 | spamfilter.captcha.recaptcha2 = tracspamfilter.captcha.recaptcha2[json]
|
|---|
| 102 | spamfilter.captcha.keycaptcha = tracspamfilter.captcha.keycaptcha
|
|---|
| 103 | """,
|
|---|
| 104 | test_suite='tracspamfilter.tests.test_suite',
|
|---|
| 105 | zip_safe=False,
|
|---|
| 106 | **extra
|
|---|
| 107 | )
|
|---|