Skip to content

Commit

Permalink
chore: Remove deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
Laerte committed Jun 20, 2023
1 parent a93a63c commit 0b1da44
Showing 1 changed file with 4 additions and 27 deletions.
31 changes: 4 additions & 27 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -37,19 +23,10 @@ def has_environment_marker_platform_impl_support():
"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(
Expand Down

0 comments on commit 0b1da44

Please sign in to comment.