[PR] #299 from jelly: Make typing-extensions optional
Make typing_extensions only required for 3.7
This commit is contained in:
+4
-1
@@ -1,4 +1,7 @@
|
|||||||
from typing_extensions import Literal
|
try:
|
||||||
|
from typing import Literal
|
||||||
|
except ImportError:
|
||||||
|
from typing_extensions import Literal
|
||||||
|
|
||||||
AnsiMode = Literal['default', 'ansi', '8bit', 'rgb']
|
AnsiMode = Literal['default', 'ansi', '8bit', 'rgb']
|
||||||
LightDark = Literal['light', 'dark']
|
LightDark = Literal['light', 'dark']
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ setup(
|
|||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
install_requires=[
|
install_requires=[
|
||||||
# Universal dependencies
|
# Universal dependencies
|
||||||
'setuptools', 'typing_extensions',
|
'setuptools', 'typing_extensions; python_version < "3.8"',
|
||||||
|
|
||||||
# Windows dependencies
|
# Windows dependencies
|
||||||
'psutil ; platform_system=="Windows"',
|
'psutil ; platform_system=="Windows"',
|
||||||
|
|||||||
Reference in New Issue
Block a user