tornado/setup.py

59 lines
1.9 KiB
Python
Raw Normal View History

2009-09-10 07:50:51 +00:00
#!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import distutils.core
import sys
2010-02-03 23:49:05 +00:00
# Importing setuptools adds some features like "setup.py develop", but
# it's optional so swallow the error if it's not there.
try:
import setuptools
except ImportError:
pass
2009-09-10 07:50:51 +00:00
kwargs = {}
# Build the epoll extension for Linux systems with Python < 2.6
extensions = []
major, minor = sys.version_info[:2]
python_26 = (major > 2 or (major == 2 and minor >= 6))
2009-09-10 07:50:51 +00:00
if "linux" in sys.platform.lower() and not python_26:
extensions.append(distutils.core.Extension(
"tornado.epoll", ["tornado/epoll.c"]))
2011-03-03 20:41:26 +00:00
version = "1.2.1"
2010-09-09 17:06:47 +00:00
if major >= 3:
import setuptools # setuptools is required for use_2to3
kwargs["use_2to3"] = True
2009-09-10 07:50:51 +00:00
distutils.core.setup(
name="tornado",
2010-09-09 17:06:47 +00:00
version=version,
2010-10-19 02:13:44 +00:00
packages = ["tornado", "tornado.test"],
package_data = {
"tornado": ["ca-certificates.crt"],
2010-10-19 02:13:44 +00:00
"tornado.test": ["README", "test.crt", "test.key"],
},
2009-09-10 07:50:51 +00:00
ext_modules = extensions,
author="Facebook",
author_email="python-tornado@googlegroups.com",
url="http://www.tornadoweb.org/",
2010-09-09 17:06:47 +00:00
download_url="http://github.com/downloads/facebook/tornado/tornado-%s.tar.gz" % version,
2009-09-10 07:50:51 +00:00
license="http://www.apache.org/licenses/LICENSE-2.0",
description="Tornado is an open source version of the scalable, non-blocking web server and and tools that power FriendFeed",
**kwargs
2009-09-10 07:50:51 +00:00
)