]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
setup: Blacken the file
authorBen Darnell <ben@bendarnell.com>
Sun, 7 Oct 2018 03:13:06 +0000 (23:13 -0400)
committerBen Darnell <ben@bendarnell.com>
Sun, 7 Oct 2018 03:13:06 +0000 (23:13 -0400)
MANIFEST.in
setup.py

index 2ef76aefd9b4c56f25171f0ac8350093230d394e..d99e4bb930f082a1b013f0338bbaf79501c83cbb 100644 (file)
@@ -1,6 +1,7 @@
 recursive-include demos *.py *.yaml *.html *.css *.js *.xml *.sql README
 recursive-include docs *
 prune docs/build
+include tornado/py.typed
 include tornado/speedups.c
 include tornado/test/README
 include tornado/test/csv_translations/fr_FR.csv
index 460f516583099e498c60f4bcdb455754f3c44907..874e832488ed7e1854d93c2ab533908797e6abc8 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -79,11 +79,16 @@ MacOS users should run:
             build_ext.run(self)
         except Exception:
             e = sys.exc_info()[1]
-            sys.stdout.write('%s\n' % str(e))
-            warnings.warn(self.warning_message % ("Extension modules",
-                                                  "There was an issue with "
-                                                  "your platform configuration"
-                                                  " - see above."))
+            sys.stdout.write("%s\n" % str(e))
+            warnings.warn(
+                self.warning_message
+                % (
+                    "Extension modules",
+                    "There was an issue with "
+                    "your platform configuration"
+                    " - see above.",
+                )
+            )
 
     def build_extension(self, ext):
         name = ext.name
@@ -91,40 +96,45 @@ MacOS users should run:
             build_ext.build_extension(self, ext)
         except Exception:
             e = sys.exc_info()[1]
-            sys.stdout.write('%s\n' % str(e))
-            warnings.warn(self.warning_message % ("The %s extension "
-                                                  "module" % (name,),
-                                                  "The output above "
-                                                  "this warning shows how "
-                                                  "the compilation "
-                                                  "failed."))
+            sys.stdout.write("%s\n" % str(e))
+            warnings.warn(
+                self.warning_message
+                % (
+                    "The %s extension " "module" % (name,),
+                    "The output above "
+                    "this warning shows how "
+                    "the compilation "
+                    "failed.",
+                )
+            )
 
 
 kwargs = {}
 
 version = "6.0.dev1"
 
-with open('README.rst') as f:
-    kwargs['long_description'] = f.read()
+with open("README.rst") as f:
+    kwargs["long_description"] = f.read()
 
-if (platform.python_implementation() == 'CPython' and
-        os.environ.get('TORNADO_EXTENSION') != '0'):
+if (
+    platform.python_implementation() == "CPython"
+    and os.environ.get("TORNADO_EXTENSION") != "0"
+):
     # This extension builds and works on pypy as well, although pypy's jit
     # produces equivalent performance.
-    kwargs['ext_modules'] = [
-        Extension('tornado.speedups',
-                  sources=['tornado/speedups.c']),
+    kwargs["ext_modules"] = [
+        Extension("tornado.speedups", sources=["tornado/speedups.c"])
     ]
 
-    if os.environ.get('TORNADO_EXTENSION') != '1':
+    if os.environ.get("TORNADO_EXTENSION") != "1":
         # Unless the user has specified that the extension is mandatory,
         # fall back to the pure-python implementation on any build failure.
-        kwargs['cmdclass'] = {'build_ext': custom_build_ext}
+        kwargs["cmdclass"] = {"build_ext": custom_build_ext}
 
 
 if setuptools is not None:
-    python_requires = '>= 3.5'
-    kwargs['python_requires'] = python_requires
+    python_requires = ">= 3.5"
+    kwargs["python_requires"] = python_requires
 
 setup(
     name="tornado",
@@ -151,22 +161,24 @@ setup(
             "templates/utf8.html",
             "test.crt",
             "test.key",
-        ],
+        ]
     },
     author="Facebook",
     author_email="python-tornado@googlegroups.com",
     url="http://www.tornadoweb.org/",
     license="http://www.apache.org/licenses/LICENSE-2.0",
-    description=("Tornado is a Python web framework and asynchronous networking library,"
-                 " originally developed at FriendFeed."),
+    description=(
+        "Tornado is a Python web framework and asynchronous networking library,"
+        " originally developed at FriendFeed."
+    ),
     classifiers=[
-        'License :: OSI Approved :: Apache Software License',
-        'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.5',
-        'Programming Language :: Python :: 3.6',
-        'Programming Language :: Python :: 3.7',
-        'Programming Language :: Python :: Implementation :: CPython',
-        'Programming Language :: Python :: Implementation :: PyPy',
+        "License :: OSI Approved :: Apache Software License",
+        "Programming Language :: Python :: 3",
+        "Programming Language :: Python :: 3.5",
+        "Programming Language :: Python :: 3.6",
+        "Programming Language :: Python :: 3.7",
+        "Programming Language :: Python :: Implementation :: CPython",
+        "Programming Language :: Python :: Implementation :: PyPy",
     ],
     **kwargs
 )