osx fixes + shrinking

This commit is contained in:
ed 2020-05-12 22:36:21 +02:00
parent 633481fae3
commit 8dca8326f7
3 changed files with 16 additions and 3 deletions

View file

@ -16,6 +16,8 @@ if platform.system() == "Windows":
VT100 = not WINDOWS or WINDOWS >= [10, 0, 14393]
# introduced in anniversary update
MACOS = platform.system() == "Darwin"
class EnvParams(object):
def __init__(self):

View file

@ -8,7 +8,7 @@ import threading
from datetime import datetime, timedelta
import calendar
from .__init__ import PY2, WINDOWS, VT100
from .__init__ import PY2, WINDOWS, MACOS, VT100
from .tcpsrv import TcpSrv
from .up2k import Up2k
from .util import mp
@ -111,6 +111,8 @@ class SvcHub(object):
return msg
elif vmin < 3:
return msg
elif MACOS:
return "multiprocessing is wonky on mac osx;"
else:
msg = "need python 2.7 or 3.3+ for multiprocessing;"
if not PY2 and vmin < 3:
@ -133,7 +135,7 @@ class SvcHub(object):
if mp.cpu_count() <= 1:
return False
try:
# support vscode debugger (bonus: same behavior as on windows)
mp.set_start_method("spawn", True)

View file

@ -24,6 +24,7 @@ command -v gfind >/dev/null && {
sed() { gsed "$@"; }
find() { gfind "$@"; }
sort() { gsort "$@"; }
unexpand() { gunexpand "$@"; }
}
[ -e copyparty/__main__.py ] || cd ..
@ -71,7 +72,15 @@ cd sfx
tar -zxf $f
mv Jinja2-*/jinja2 .
rm -rf Jinja2-* jinja2/testsuite jinja2/tests.py
rm -rf Jinja2-* jinja2/testsuite jinja2/_markupsafe/tests.py jinja2/_stringdefs.py
f=jinja2/lexer.py
sed -r '/.*föö.*/ raise SyntaxError/' <$f >t
tmv $f
f=jinja2/_markupsafe/_constants.py
awk '!/: [0-9]+,?$/ || /(amp|gt|lt|quot|apos|nbsp).:/' <$f >t
tmv $f
# msys2 tar is bad, make the best of it
echo collecting source