From 9897ecf173867f8a62000437b8bdbd81cab72996 Mon Sep 17 00:00:00 2001 From: Marcelo Duarte Date: Fri, 27 Dec 2019 00:23:28 -0300 Subject: [PATCH] ctypes sample to show issue #523 --- cx_Freeze/samples/ctypes/setup.py | 17 +++++++++++++++++ cx_Freeze/samples/ctypes/test_ctypes.py | 3 +++ 2 files changed, 20 insertions(+) create mode 100644 cx_Freeze/samples/ctypes/setup.py create mode 100644 cx_Freeze/samples/ctypes/test_ctypes.py diff --git a/cx_Freeze/samples/ctypes/setup.py b/cx_Freeze/samples/ctypes/setup.py new file mode 100644 index 000000000..4248aa44c --- /dev/null +++ b/cx_Freeze/samples/ctypes/setup.py @@ -0,0 +1,17 @@ +'''A setup script to demonstrate build using ctypes''' +# +# Run the build process by running the command 'python setup.py build' +# +# If everything works well you should find a subdirectory in the build +# subdirectory that contains the files needed to run the script without Python + +from cx_Freeze import setup, Executable + +setup(name='test_ctypes', + version='0.1', + description='cx_Freeze script to test ctypes', + executables=[Executable("test_ctypes.py")], + options={ + 'build_exe': {'zip_include_packages': ['*'], + 'zip_exclude_packages': []} + }) diff --git a/cx_Freeze/samples/ctypes/test_ctypes.py b/cx_Freeze/samples/ctypes/test_ctypes.py new file mode 100644 index 000000000..7243809c7 --- /dev/null +++ b/cx_Freeze/samples/ctypes/test_ctypes.py @@ -0,0 +1,3 @@ +import ctypes + +print('Hello', ctypes.__name__)