Merge pull request #2025 from sanic-org/fix-uvloop-1912
Fix uvloop 1912
This commit is contained in:
commit
4c360f43fd
12
setup.py
12
setup.py
|
@ -5,6 +5,7 @@ import codecs
|
|||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
from distutils.util import strtobool
|
||||
|
||||
from setuptools import setup
|
||||
|
@ -24,6 +25,7 @@ class PyTest(TestCommand):
|
|||
|
||||
def run_tests(self):
|
||||
import shlex
|
||||
|
||||
import pytest
|
||||
|
||||
errno = pytest.main(shlex.split(self.pytest_args))
|
||||
|
@ -38,7 +40,9 @@ def open_local(paths, mode="r", encoding="utf8"):
|
|||
|
||||
with open_local(["sanic", "__version__.py"], encoding="latin1") as fp:
|
||||
try:
|
||||
version = re.findall(r"^__version__ = \"([^']+)\"\r?$", fp.read(), re.M)[0]
|
||||
version = re.findall(
|
||||
r"^__version__ = \"([^']+)\"\r?$", fp.read(), re.M
|
||||
)[0]
|
||||
except IndexError:
|
||||
raise RuntimeError("Unable to determine version.")
|
||||
|
||||
|
@ -68,9 +72,11 @@ setup_kwargs = {
|
|||
],
|
||||
}
|
||||
|
||||
env_dependency = '; sys_platform != "win32" ' 'and implementation_name == "cpython"'
|
||||
env_dependency = (
|
||||
'; sys_platform != "win32" ' 'and implementation_name == "cpython"'
|
||||
)
|
||||
ujson = "ujson>=1.35" + env_dependency
|
||||
uvloop = "uvloop>=0.5.3" + env_dependency
|
||||
uvloop = "uvloop>=0.5.3,<0.15.0" + env_dependency
|
||||
|
||||
requirements = [
|
||||
"httptools>=0.0.10",
|
||||
|
|
Loading…
Reference in New Issue
Block a user