1515
1616import os
1717import platform
18- import ssl
1918import sys
2019import warnings
2120
22- try :
23- # Use setuptools if available, for install_requires (among other things).
24- import setuptools
25- from setuptools import setup
26- except ImportError :
27- setuptools = None
28- from distutils .core import setup
29-
30- from distutils .core import Extension
31-
32- # The following code is copied from
33- # https://github.com/mongodb/mongo-python-driver/blob/master/setup.py
34- # to support installing without the extension on platforms where
35- # no compiler is available.
36- from distutils .command .build_ext import build_ext
21+ from setuptools import setup , Extension
22+ from setuptools .command .build_ext import build_ext
3723
3824
3925class custom_build_ext (build_ext ):
@@ -103,7 +89,7 @@ def build_extension(self, ext):
10389
10490kwargs = {}
10591
106- version = "5.1.1+dirac.2 "
92+ version = "5.1.1+dirac.3 "
10793
10894with open ('README.rst' ) as f :
10995 kwargs ['long_description' ] = f .read ()
@@ -123,29 +109,7 @@ def build_extension(self, ext):
123109 kwargs ['cmdclass' ] = {'build_ext' : custom_build_ext }
124110
125111
126- if setuptools is not None :
127- # If setuptools is not available, you're on your own for dependencies.
128- install_requires = []
129- if sys .version_info < (3 , 2 ):
130- install_requires .append ('futures' )
131- if sys .version_info < (3 , 4 ):
132- install_requires .append ('singledispatch' )
133- if sys .version_info < (3 , 5 ):
134- install_requires .append ('backports_abc>=0.4' )
135- kwargs ['install_requires' ] = install_requires
136-
137- python_requires = '>= 2.7, !=3.0.*, !=3.1.*, !=3.2.*, != 3.3.*'
138- kwargs ['python_requires' ] = python_requires
139-
140- # Verify that the SSL module has all the modern upgrades. Check for several
141- # names individually since they were introduced at different versions,
142- # although they should all be present by Python 3.4 or 2.7.9.
143- if (not hasattr (ssl , 'SSLContext' ) or
144- not hasattr (ssl , 'create_default_context' ) or
145- not hasattr (ssl , 'match_hostname' )):
146- raise ImportError ("Tornado requires an up-to-date SSL module. This means "
147- "Python 2.7.9+ or 3.4+ (although some distributions have "
148- "backported the necessary changes to older versions)." )
112+ kwargs ['python_requires' ] = '>= 3.11'
149113
150114setup (
151115 name = "tornado" ,
0 commit comments