mirror of https://github.com/scrapy/scrapy.git
chore: Remove deprecated code
This commit is contained in:
parent
a93a63c208
commit
0b1da44a05
31
setup.py
31
setup.py
|
|
@ -1,24 +1,10 @@
|
|||
from pathlib import Path
|
||||
|
||||
from setuptools import __version__ as setuptools_version
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
version = (Path(__file__).parent / "scrapy/VERSION").read_text("ascii").strip()
|
||||
|
||||
|
||||
def has_environment_marker_platform_impl_support():
|
||||
"""Code extracted from 'pytest/setup.py'
|
||||
https://github.com/pytest-dev/pytest/blob/7538680c/setup.py#L31
|
||||
|
||||
The first known release to support environment marker with range operators
|
||||
it is 18.5, see:
|
||||
https://setuptools.readthedocs.io/en/latest/history.html#id235
|
||||
"""
|
||||
from packaging.version import parse as parse_version
|
||||
|
||||
return parse_version(setuptools_version) >= parse_version("18.5")
|
||||
|
||||
|
||||
install_requires = [
|
||||
"Twisted>=18.9.0",
|
||||
"cryptography>=36.0.0",
|
||||
|
|
@ -37,19 +23,10 @@ install_requires = [
|
|||
"tldextract",
|
||||
"lxml>=4.4.1",
|
||||
]
|
||||
extras_require = {}
|
||||
cpython_dependencies = [
|
||||
"PyDispatcher>=2.0.5",
|
||||
]
|
||||
if has_environment_marker_platform_impl_support():
|
||||
extras_require[
|
||||
':platform_python_implementation == "CPython"'
|
||||
] = cpython_dependencies
|
||||
extras_require[':platform_python_implementation == "PyPy"'] = [
|
||||
"PyPyDispatcher>=2.1.0",
|
||||
]
|
||||
else:
|
||||
install_requires.extend(cpython_dependencies)
|
||||
extras_require = {
|
||||
':platform_python_implementation == "CPython"': ["PyDispatcher>=2.0.5"],
|
||||
':platform_python_implementation == "PyPy"': ["PyPyDispatcher>=2.1.0"],
|
||||
}
|
||||
|
||||
|
||||
setup(
|
||||
|
|
|
|||
Loading…
Reference in New Issue