File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
pythonforandroid/bootstraps/common/build Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,10 @@ def get_hostpython():
38
38
return get_dist_info_for ('hostpython' )
39
39
40
40
41
+ def get_python_version ():
42
+ return get_dist_info_for ('python_version' )
43
+
44
+
41
45
def get_bootstrap_name ():
42
46
return get_dist_info_for ('bootstrap' )
43
47
@@ -52,6 +56,7 @@ def get_bootstrap_name():
52
56
curdir = dirname (__file__ )
53
57
54
58
PYTHON = get_hostpython ()
59
+ PYTHON_VERSION = get_python_version ()
55
60
if PYTHON is not None and not exists (PYTHON ):
56
61
PYTHON = None
57
62
@@ -62,17 +67,18 @@ def get_bootstrap_name():
62
67
'^*.bzr/*' ,
63
68
'^*.svn/*' ,
64
69
65
- # pyc/py
66
- '*.pyc' ,
67
- # '*.py',
68
-
69
70
# temp files
70
71
'~' ,
71
72
'*.bak' ,
72
73
'*.swp' ,
73
74
]
75
+ # pyc/py
74
76
if PYTHON is not None :
75
77
BLACKLIST_PATTERNS .append ('*.py' )
78
+ if PYTHON_VERSION and int (PYTHON_VERSION [0 ]) == 2 :
79
+ # we only blacklist `.pyc` for python2 because in python3 the compiled
80
+ # extension is `.pyc` (.pyo files not exists for python >= 3.6)
81
+ BLACKLIST_PATTERNS .append ('*.pyc' )
76
82
77
83
WHITELIST_PATTERNS = []
78
84
if get_bootstrap_name () in ('sdl2' , 'webview' , 'service_only' ):
You can’t perform that action at this time.
0 commit comments