Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build script for pymcuprog executable #18

Closed

Conversation

kristofmulier
Copy link

1. Why a build script?

Not all computers have Python installed (especially Windows). Even if Python is available, people often don't like to install extra modules in their default installation. Virtual environments are of course a solution, but that requires skills and setup efforts. In short: a simple executable is a good idea to make your tool more easily available.

 

2. Result of the build

I've written a build script that invokes CX_Freeze to create an executable file. On Windows, the build output looks like this:

On Linux it looks very similar. I don't have a MAC, so I can't test it there. I only had the opportunity to test it on Windows 10, Windows 11, Ubuntu and Debian.

 

3. How to invoke the build script

My build script is very easy to invoke. Just make sure you have CX_Freeze installed. Then navigate to the toplevel pymcuprog folder and run the build script like so:

$ python3 pymcuprog_build.py

To clean the output, just run:

$ python3 pymcuprog_build.py --clean

 

4. Notes

Please note I added a file named pymcuprog_execute.py. It just serves as the target for CX_Freeze. The file simply imports the pymcuprog module and runs its main() function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants