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
)
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
84 'test': ['mock', 'nose'],
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"]),
92 ext_modules
=pyx_extensions
+ [
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
109 s3 = r2.lib.providers.media.s3:S3MediaProvider
110 filesystem = r2.lib.providers.media.filesystem:FileSystemMediaProvider
112 cloudflare = r2.lib.providers.cdn.cloudflare:CloudFlareCdnProvider
113 null = r2.lib.providers.cdn.null:NullCdnProvider
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
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