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__)