summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG3
-rw-r--r--setup.py9
2 files changed, 7 insertions, 5 deletions
diff --git a/CHANGELOG b/CHANGELOG
index c6babac..70c6f47 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -4,6 +4,9 @@
stack during tree building, when encountering a closing tag that had
no matching opening tag. [bug=1880420]
+* Specify the soupsieve dependency in a way that complies with
+ PEP 508. Patch by Mike Nerone. [bug=1893696]
+
= 4.9.1 (20200517)
* Added a keyword argument 'on_duplicate_attribute' to the
diff --git a/setup.py b/setup.py
index e8244ed..8e22ba6 100644
--- a/setup.py
+++ b/setup.py
@@ -7,10 +7,6 @@ import sys
with open("README.md", "r") as fh:
long_description = fh.read()
-install_requires=["soupsieve>1.2"]
-if sys.version_info.major == 2:
- install_requires.append("soupsieve<2.0")
-
setup(
name="beautifulsoup4",
# NOTE: We can't import __version__ from bs4 because bs4/__init__.py is Python 2 code,
@@ -22,7 +18,10 @@ setup(
url="http://www.crummy.com/software/BeautifulSoup/bs4/",
download_url = "http://www.crummy.com/software/BeautifulSoup/bs4/download/",
description="Screen-scraping library",
- install_requires=install_requires,
+ install_requires=[
+ "soupsieve >1.2; python_version>='3.0'",
+ "soupsieve >1.2, <2.0; python_version<'3.0'",
+ ],
long_description=long_description,
long_description_content_type="text/markdown",
license="MIT",