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