Skip to content
Newer
Older
100644 71 lines (64 sloc) 2.41 KB
2afa973 @finiteloop Move Tornado project to Github
finiteloop authored Sep 10, 2009
1 #!/usr/bin/env python
2 #
3 # Copyright 2009 Facebook
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License"); you may
6 # not use this file except in compliance with the License. You may obtain
7 # a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 # License for the specific language governing permissions and limitations
15 # under the License.
16
17 import distutils.core
18 import sys
3b181f5 @bdarnell Revert "Remove optional setuptools import."
bdarnell authored Feb 20, 2012
19 # Importing setuptools adds some features like "setup.py develop", but
20 # it's optional so swallow the error if it's not there.
21 try:
22 import setuptools
23 except ImportError:
24 pass
2afa973 @finiteloop Move Tornado project to Github
finiteloop authored Sep 10, 2009
25
5e916c2 @bdarnell Automatically run 2to3 when installing on python 3
bdarnell authored May 14, 2011
26 kwargs = {}
27
19f850e @bdarnell Declare dependencies in setup.py for automatic installation.
bdarnell authored Feb 20, 2011
28 # Build the epoll extension for Linux systems with Python < 2.6
29 extensions = []
cc2363a @bdarnell Revert "Declare dependencies in setup.py for automatic installation."
bdarnell authored Feb 22, 2011
30 major, minor = sys.version_info[:2]
31 python_26 = (major > 2 or (major == 2 and minor >= 6))
2afa973 @finiteloop Move Tornado project to Github
finiteloop authored Sep 10, 2009
32 if "linux" in sys.platform.lower() and not python_26:
33 extensions.append(distutils.core.Extension(
34 "tornado.epoll", ["tornado/epoll.c"]))
35
7a2442d @bdarnell Post-release version bump
bdarnell authored Sep 4, 2012
36 version = "2.4.post1"
34f0494 @bdarnell Add download url to setup.py for pypi
bdarnell authored Sep 9, 2010
37
5e916c2 @bdarnell Automatically run 2to3 when installing on python 3
bdarnell authored May 15, 2011
38 if major >= 3:
39 import setuptools # setuptools is required for use_2to3
40 kwargs["use_2to3"] = True
41
2afa973 @finiteloop Move Tornado project to Github
finiteloop authored Sep 10, 2009
42 distutils.core.setup(
43 name="tornado",
34f0494 @bdarnell Add download url to setup.py for pypi
bdarnell authored Sep 9, 2010
44 version=version,
c17dddb @danielrobbins Install platform files too.
danielrobbins authored Jul 6, 2011
45 packages = ["tornado", "tornado.test", "tornado.platform"],
c410292 @bdarnell Add test suite to tarball releases.
bdarnell authored Oct 18, 2010
46 package_data = {
c7b118f @bdarnell Add ca-certificates.crt as a data file in setup.py
bdarnell authored Feb 19, 2011
47 "tornado": ["ca-certificates.crt"],
489997d @bdarnell Fix load_gettext_translations on python 3
bdarnell authored Jun 14, 2012
48 # data files need to be listed both here (which determines what gets
49 # installed) and in MANIFEST.in (which determines what gets included
50 # in the sdist tarball)
51 "tornado.test": [
52 "README",
53 "test.crt",
54 "test.key",
55 "static/robots.txt",
56 "templates/utf8.html",
57 "csv_translations/fr_FR.csv",
58 "gettext_translations/fr_FR/LC_MESSAGES/tornado_test.mo",
59 "gettext_translations/fr_FR/LC_MESSAGES/tornado_test.po",
60 ],
c410292 @bdarnell Add test suite to tarball releases.
bdarnell authored Oct 19, 2010
61 },
2afa973 @finiteloop Move Tornado project to Github
finiteloop authored Sep 10, 2009
62 ext_modules = extensions,
63 author="Facebook",
64 author_email="python-tornado@googlegroups.com",
65 url="http://www.tornadoweb.org/",
34f0494 @bdarnell Add download url to setup.py for pypi
bdarnell authored Sep 9, 2010
66 download_url="http://github.com/downloads/facebook/tornado/tornado-%s.tar.gz" % version,
2afa973 @finiteloop Move Tornado project to Github
finiteloop authored Sep 10, 2009
67 license="http://www.apache.org/licenses/LICENSE-2.0",
68 description="Tornado is an open source version of the scalable, non-blocking web server and and tools that power FriendFeed",
5e916c2 @bdarnell Automatically run 2to3 when installing on python 3
bdarnell authored May 15, 2011
69 **kwargs
2afa973 @finiteloop Move Tornado project to Github
finiteloop authored Sep 10, 2009
70 )
Something went wrong with that request. Please try again.