Change structure of timeout events
[reddit.git] / r2 / setup.py
blobabc5700d0e5d8a09aad87a43ebf55dd1285e3f3e
1 #!/usr/bin/env python
2 # The contents of this file are subject to the Common Public Attribution
3 # License Version 1.0. (the "License"); you may not use this file except in
4 # compliance with the License. You may obtain a copy of the License at
5 # http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
6 # License Version 1.1, but Sections 14 and 15 have been added to cover use of
7 # software over a computer network and provide for limited attribution for the
8 # Original Developer. In addition, Exhibit A has been modified to be consistent
9 # with Exhibit B.
11 # Software distributed under the License is distributed on an "AS IS" basis,
12 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
13 # the specific language governing rights and limitations under the License.
15 # The Original Code is reddit.
17 # The Original Developer is the Initial Developer. The Initial Developer of
18 # the Original Code is reddit Inc.
20 # All portions of the code written by reddit are Copyright (c) 2006-2015 reddit
21 # Inc. All Rights Reserved.
22 ###############################################################################
24 import os
25 import fnmatch
26 import sys
27 from setuptools import setup, find_packages, Extension
30 commands = {}
33 try:
34 from Cython.Build import cythonize
35 except ImportError:
36 print "Cannot find Cython. Skipping Cython build."
37 pyx_extensions = []
38 else:
39 pyx_files = []
40 for root, directories, files in os.walk('.'):
41 for f in fnmatch.filter(files, '*.pyx'):
42 pyx_files.append(os.path.join(root, f))
43 pyx_extensions = cythonize(pyx_files)
46 setup(
47 name="r2",
48 version="",
49 install_requires=[
50 "Pylons",
51 "Routes",
52 "mako>=0.5",
53 "boto >= 2.0",
54 "pytz",
55 "pycrypto",
56 "Babel>=1.0",
57 "cython>=0.14",
58 "SQLAlchemy",
59 "BeautifulSoup",
60 "chardet",
61 "psycopg2",
62 "pycassa>=1.7.0",
63 "pycaptcha",
64 "amqplib",
65 "py-bcrypt",
66 "snudown>=1.1.0",
67 "l2cs>=2.0.2",
68 "lxml",
69 "kazoo",
70 "stripe",
71 "requests",
72 "tinycss2",
73 "unidecode",
74 "PyYAML",
75 "Pillow",
76 "pylibmc==1.2.2",
77 "webob",
78 "webtest",
80 # Extra dependencies that aren't needed for running the app.
81 # * https://pythonhosted.org/setuptools/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies
82 # * https://github.com/pypa/sampleproject/blob/300f04dc44df51492deb859ac98ba521d2c7a17a/setup.py#L71-L77
83 extras_require={
84 'test': ['mock', 'nose'],
86 dependency_links=[
87 "https://github.com/reddit/snudown/archive/v1.1.3.tar.gz#egg=snudown-1.1.3",
88 "https://s3.amazonaws.com/code.reddit.com/pycaptcha-0.4.tar.gz#egg=pycaptcha-0.4",
90 packages=find_packages(exclude=["ez_setup"]),
91 cmdclass=commands,
92 ext_modules=pyx_extensions + [
93 Extension(
94 "Cfilters",
95 sources=[
96 "r2/lib/c/filters.c",
100 entry_points="""
101 [paste.app_factory]
102 main=r2:make_app
103 [paste.paster_command]
104 run = r2.commands:RunCommand
105 shell = pylons.commands:ShellCommand
106 [paste.filter_app_factory]
107 gzip = r2.lib.gzipper:make_gzip_middleware
108 [r2.provider.media]
109 s3 = r2.lib.providers.media.s3:S3MediaProvider
110 filesystem = r2.lib.providers.media.filesystem:FileSystemMediaProvider
111 [r2.provider.cdn]
112 cloudflare = r2.lib.providers.cdn.cloudflare:CloudFlareCdnProvider
113 null = r2.lib.providers.cdn.null:NullCdnProvider
114 [r2.provider.auth]
115 cookie = r2.lib.providers.auth.cookie:CookieAuthenticationProvider
116 http = r2.lib.providers.auth.http:HttpAuthenticationProvider
117 [r2.provider.support]
118 zendesk = r2.lib.providers.support.zendesk:ZenDeskProvider
119 [r2.provider.search]
120 cloudsearch = r2.lib.providers.search.cloudsearch:CloudSearchProvider
121 solr = r2.lib.providers.search.solr:SolrSearchProvider
122 [r2.provider.image_resizing]
123 imgix = r2.lib.providers.image_resizing.imgix:ImgixImageResizingProvider
124 no_op = r2.lib.providers.image_resizing.no_op:NoOpImageResizingProvider
125 unsplashit = r2.lib.providers.image_resizing.unsplashit:UnsplashitImageResizingProvider
126 """,