Ajout du GUI
This commit is contained in:
Binary file not shown.
12
kivy/tests/pyinstaller/simple_widget/main.py
Normal file
12
kivy/tests/pyinstaller/simple_widget/main.py
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
from project.widget import MyWidget
|
||||
|
||||
if __name__ == '__main__':
|
||||
w = MyWidget()
|
||||
|
||||
assert w.x == w.y
|
||||
w.y = 868
|
||||
assert w.x == 868
|
||||
w.y = 370
|
||||
assert w.x == 370
|
||||
37
kivy/tests/pyinstaller/simple_widget/main.spec
Normal file
37
kivy/tests/pyinstaller/simple_widget/main.spec
Normal file
@@ -0,0 +1,37 @@
|
||||
# -*- mode: python -*-
|
||||
|
||||
block_cipher = None
|
||||
from kivy_deps import sdl2, glew
|
||||
from kivy.tools.packaging.pyinstaller_hooks import runtime_hooks, hookspath
|
||||
import os
|
||||
|
||||
|
||||
a = Analysis(['main.py'],
|
||||
pathex=[os.environ['__KIVY_PYINSTALLER_DIR']],
|
||||
binaries=[],
|
||||
datas=[],
|
||||
hiddenimports=[],
|
||||
hookspath=[os.environ['__KIVY_PYINSTALLER_DIR']],
|
||||
runtime_hooks=runtime_hooks(),
|
||||
excludes=['numpy', 'ffpyplayer'],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=block_cipher)
|
||||
pyz = PYZ(a.pure, a.zipped_data,
|
||||
cipher=block_cipher)
|
||||
exe = EXE(pyz,
|
||||
a.scripts,
|
||||
exclude_binaries=True,
|
||||
name='main',
|
||||
debug=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
console=True )
|
||||
coll = COLLECT(exe,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
*[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)],
|
||||
strip=False,
|
||||
upx=True,
|
||||
name='main')
|
||||
Binary file not shown.
Binary file not shown.
12
kivy/tests/pyinstaller/simple_widget/project/widget.py
Normal file
12
kivy/tests/pyinstaller/simple_widget/project/widget.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from kivy.uix.widget import Widget
|
||||
|
||||
|
||||
class MyWidget(Widget):
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super(MyWidget, self).__init__(**kwargs)
|
||||
|
||||
def callback(*l):
|
||||
self.x = self.y
|
||||
self.fbind('y', callback)
|
||||
callback()
|
||||
Reference in New Issue
Block a user