8000 A fix for mac version test. · feedly/python-readability@67f4660 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jan 4, 2022. It is now read-only.

Commit 67f4660

Browse files
committed
A fix for mac version test.
1 parent 449dc20 commit 67f4660

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ setup: venv
2727
$(PIP) install -r requirements-dev.txt
2828

2929
.venv/bin/python:
30-
virtualenv .venv
30+
test -d .venv || which python3 && python3 -m venv .venv || virtualenv .venv
3131

3232
.PHONY: clean
3333
clean:
@@ -45,7 +45,6 @@ develop: .venv/lib/python*/site-packages/readability-lxml.egg-link
4545
.PHONY: clean_all
4646
clean_all: clean_venv
4747

48-
4948
# ###########
5049
# Deploy
5150
# ###########

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
import platform
1313

1414
mac_ver = platform.mac_ver()[0]
15-
mac_ver_no = int(mac_ver.split(".")[1])
16-
if mac_ver_no < 9:
15+
mac_major, mac_minor = mac_ver.split('.')[:2]
16+
if int(mac_major) == 10 and int(mac_minor) < 9:
1717
print("Using lxml<2.4")
1818
lxml_requirement = "lxml<2.4"
1919

0 commit comments

Comments
 (0)
0