34
34
def recursively_include (results , directory , patterns ):
35
35
for root , subfolders , files in walk (directory ):
36
36
for fn in files :
37
- if not any (glob .fnmatch .fnmatch (fn , pattern ) for pattern in patterns ):
37
+ if not any (
38
+ glob .fnmatch .fnmatch (fn , pattern ) for pattern in patterns ):
38
39
continue
39
40
filename = join (root , fn )
40
41
directory = 'pythonforandroid'
@@ -47,9 +48,12 @@ def recursively_include(results, directory, patterns):
47
48
['*.patch' , 'Setup*' , '*.pyx' , '*.py' , '*.c' , '*.h' ,
48
49
'*.mk' , '*.jam' , '*.diff' , ])
49
50
recursively_include (package_data , 'pythonforandroid/bootstraps' ,
50
- ['*.properties' , '*.xml' , '*.java' , '*.tmpl' , '*.txt' , '*.png' ,
51
- '*.mk' , '*.c' , '*.h' , '*.py' , '*.sh' , '*.jpg' , '*.aidl' ,
52
- '*.gradle' , '.gitkeep' , 'gradlew*' , '*.jar' , "*.patch" , ])
51
+ [
52
+ '*.properties' , '*.xml' , '*.java' , '*.tmpl' , '*.txt' ,
53
+ '*.png' , '*.mk' , '*.c' , '*.h' , '*.py' , '*.sh' , '*.jpg' ,
54
+ '*.aidl' , '*.gradle' , '.gitkeep' , 'gradlew*' , '*.jar' ,
55
+ '*.patch' ,
56
+ ])
53
57
recursively_include (package_data , 'pythonforandroid/bootstraps' ,
54
58
['sdl-config' , ])
55
59
recursively_include (package_data , 'pythonforandroid/bootstraps/webview' ,
@@ -59,17 +63,15 @@ def recursively_include(results, directory, patterns):
59
63
60
64
with open (join (dirname (__file__ ), 'README.md' ),
61
65
encoding = "utf-8" ,
62
- errors = "replace" ,
63
- ) as fileh :
66
+ errors = "replace" , ) as fileh :
64
67
long_description = fileh .read ()
65
68
66
69
init_filen = join (dirname (__file__ ), 'pythonforandroid' , '__init__.py' )
67
70
version = None
68
71
try :
69
72
with open (init_filen ,
70
73
encoding = "utf-8" ,
71
- errors = "replace"
72
- ) as fileh :
74
+ errors = "replace" ) as fileh :
73
75
lines = fileh .readlines ()
74
76
except IOError :
75
77
pass
@@ -82,12 +84,15 @@ def recursively_include(results, directory, patterns):
82
84
version = matches [0 ].strip ("'" ).strip ('"' )
83
85
break
84
86
if version is None :
85
- raise Exception ('Error: version could not be loaded from {}' .format (init_filen ))
87
+ raise Exception (
88
+ 'Error: version could not be loaded from {}' .format (init_filen ))
86
89
87
90
setup (name = 'python-for-android' ,
88
91
version = version ,
89
- description = 'A development tool that packages Python apps into '
90
- 'binaries that can run on Android devices.' ,
92
+ description = (
93
+ 'A development tool that packages Python apps into '
94
+ 'binaries that can run on Android devices.'
95
+ ),
91
96
long_description = long_description ,
92
97
long_description_content_type = 'text/markdown' ,
93
98
python_requires = ">=3.7.0" ,
0 commit comments