From 69310fa52bce70be863e9f76ccf431cfc767aa3b Mon Sep 17 00:00:00 2001 From: Adam Hupp <142939708+adamh-oai@users.noreply.github.com> Date: Fri, 22 Dec 2023 02:27:10 -0800 Subject: [PATCH] MacOS fix: change lxml setup (#114) * Unpin lxml Per https://github.com/adbar/trafilatura/issues/449, see if unpinning lxml works on MacOS. * specify versions and add platform test * further specify, add tests * reduce number of tests --------- Co-authored-by: Adrien Barbaresi Co-authored-by: Adrien Barbaresi --- .github/workflows/tests.yml | 4 ++++ setup.py | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 523cc0c0..77f30bc0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,6 +27,10 @@ jobs: python-version: 3.7 - os: macos-latest python-version: 3.8 + - os: macos-latest + python-version: "3.10" + - os: macos-latest + python-version: "3.12" - os: windows-latest python-version: 3.8 steps: diff --git a/setup.py b/setup.py index 27eb26a1..3bf7da3a 100644 --- a/setup.py +++ b/setup.py @@ -118,8 +118,9 @@ def get_version(package): "charset_normalizer >= 3.0.1; python_version < '3.7'", "charset_normalizer >= 3.3.2; python_version >= '3.7'", "dateparser >= 1.1.2", # 1.1.3+ slower - "lxml >= 4.9.3 ; platform_system != 'Darwin'", - "lxml == 4.9.2 ; platform_system == 'Darwin'", + # see tests on Github Actions + "lxml == 4.9.2 ; platform_system == 'Darwin' and python_version <= '3.8'", + "lxml >= 4.9.4 ; platform_system != 'Darwin' or python_version > '3.8'", "python-dateutil >= 2.8.2", "urllib3 >= 1.26, < 2; python_version < '3.7'", "urllib3 >= 1.26, < 3; python_version >= '3.7'",