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
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 ###############################################################################
27 from setuptools
import setup
, find_packages
, Extension
34 from Cython
.Build
import cythonize
36 print "Cannot find Cython. Skipping Cython build."
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 # guard against import errors in case this is the first run of setup.py and we
47 # don't have any dependencies (including baseplate) yet
49 from baseplate
.integration
.thrift
.command
import ThriftBuildPyCommand
51 print "Cannot find Baseplate. Skipping Thrift build."
53 commands
["build_py"] = ThriftBuildPyCommand
90 "httpagentparser==1.7.8",
92 # setup tests (allowing for "python setup.py test")
93 tests_require
=['mock', 'nose', 'coverage'],
94 test_suite
="nose.collector",
96 "https://github.com/reddit/snudown/archive/v1.1.3.tar.gz#egg=snudown-1.1.3",
97 "https://s3.amazonaws.com/code.reddit.com/pycaptcha-0.4.tar.gz#egg=pycaptcha-0.4",
99 packages
=find_packages(exclude
=["ez_setup"]),
101 ext_modules
=pyx_extensions
+ [
105 "r2/lib/c/filters.c",
112 [paste.paster_command]
113 run = r2.commands:RunCommand
114 shell = pylons.commands:ShellCommand
115 [paste.filter_app_factory]
116 gzip = r2.lib.gzipper:make_gzip_middleware
118 s3 = r2.lib.providers.media.s3:S3MediaProvider
119 filesystem = r2.lib.providers.media.filesystem:FileSystemMediaProvider
121 cloudflare = r2.lib.providers.cdn.cloudflare:CloudFlareCdnProvider
122 null = r2.lib.providers.cdn.null:NullCdnProvider
124 cookie = r2.lib.providers.auth.cookie:CookieAuthenticationProvider
125 http = r2.lib.providers.auth.http:HttpAuthenticationProvider
126 [r2.provider.support]
127 zendesk = r2.lib.providers.support.zendesk:ZenDeskProvider
129 cloudsearch = r2.lib.providers.search.cloudsearch:CloudSearchProvider
130 solr = r2.lib.providers.search.solr:SolrSearchProvider
131 [r2.provider.image_resizing]
132 imgix = r2.lib.providers.image_resizing.imgix:ImgixImageResizingProvider
133 no_op = r2.lib.providers.image_resizing.no_op:NoOpImageResizingProvider
134 unsplashit = r2.lib.providers.image_resizing.unsplashit:UnsplashitImageResizingProvider
136 null = r2.lib.providers.email.null:NullEmailProvider
137 mailgun = r2.lib.providers.email.mailgun:MailgunEmailProvider