Uh oh!
There was an error while loading. Please reload this page.
forked from kivy/python-for-android
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
Latest commit
141 lines (126 loc) · 5.09 KB
/
Copy pathsetup.py
File metadata and controls
141 lines (126 loc) · 5.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
importglob
fromosimportwalk
fromos.pathimportjoin, dirname, sep
importre
fromsetuptoolsimportsetup, find_packages
# NOTE: All package data should also be set in MANIFEST.in
packages=find_packages()
package_data= {'': ['*.tmpl',
'*.patch',
'*.diff', ], }
data_files= []
# must be a single statement since buildozer is currently parsing it, refs:
# https://github.com/kivy/buildozer/issues/722
install_reqs= [
'appdirs', 'colorama>=0.3.3', 'jinja2',
'sh>=2, <3.0; sys_platform!="win32"', 'meson', 'ninja',
'build', 'toml', 'packaging', 'setuptools', 'wheel~=0.43.0'
]
# (build and toml are used by pythonpackage.py)
# By specifying every file manually, package_data will be able to
# include them in binary distributions. Note that we have to add
# everything as a 'pythonforandroid' rule, using '' apparently doesn't
# work.
defrecursively_include(results, directory, patterns):
forroot, subfolders, filesinwalk(directory):
forfninfiles:
ifnotany(
glob.fnmatch.fnmatch(fn, pattern) forpatterninpatterns):
continue
filename=join(root, fn)
directory='pythonforandroid'
ifdirectorynotinresults:
results[directory] = []
results[directory].append(join(*filename.split(sep)[1:]))
recursively_include(package_data, 'pythonforandroid/recipes',
['*.patch', 'Setup*', '*.pyx', '*.py', '*.c', '*.h',
'*.mk', '*.jam', '*.diff', ])
recursively_include(package_data, 'pythonforandroid/bootstraps',
[
'*.properties', '*.xml', '*.java', '*.tmpl', '*.txt',
'*.png', '*.mk', '*.c', '*.h', '*.py', '*.sh', '*.jpg',
'*.aidl', '*.gradle', '.gitkeep', 'gradlew*', '*.jar',
'*.patch',
])
recursively_include(package_data, 'pythonforandroid/bootstraps',
['sdl-config', ])
recursively_include(package_data, 'pythonforandroid/bootstraps/webview',
['*.html', ])
recursively_include(package_data, 'pythonforandroid',
['liblink', 'biglink', 'liblink.sh'])
withopen(join(dirname(__file__), 'README.md'),
encoding="utf-8",
errors="replace", ) asfileh:
long_description=fileh.read()
init_filen=join(dirname(__file__), 'pythonforandroid', '__init__.py')
version=None
try:
withopen(init_filen,
encoding="utf-8",
errors="replace") asfileh:
lines=fileh.readlines()
exceptIOError:
pass
else:
forlineinlines:
line=line.strip()
ifline.startswith('__version__ = '):
matches=re.findall(r'["\'].+["\']', line)
ifmatches:
version=matches[0].strip("'").strip('"')
break
ifversionisNone:
raiseException(
'Error: version could not be loaded from {}'.format(init_filen))
setup(name='python-for-android',
version=version,
description=(
'A development tool that packages Python apps into '
'binaries that can run on Android devices.'
),
long_description=long_description,
long_description_content_type='text/markdown',
python_requires=">=3.10.0",
author='Kivy Team and other contributors',
author_email='kivy-dev@googlegroups.com',
url='https://github.com/kivy/python-for-android',
license='MIT',
install_requires=install_reqs,
entry_points={
'console_scripts': [
'python-for-android = pythonforandroid.entrypoints:main',
'p4a = pythonforandroid.entrypoints:main',
],
'distutils.commands': [
'apk = pythonforandroid.bdistapk:BdistAPK',
'aar = pythonforandroid.bdistapk:BdistAAR',
'aab = pythonforandroid.bdistapk:BdistAAB',
],
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: Microsoft :: Windows',
'Operating System :: OS Independent',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Android',
'Programming Language :: C',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
'Topic :: Software Development',
'Topic :: Utilities',
],
packages=packages,
package_data=package_data,
project_urls={
'Documentation': "https://python-for-android.readthedocs.io",
'Source': "https://github.com/kivy/python-for-android",
'Bug Reports': "https://github.com/kivy/python-for-android/issues",
},
)