KKobuszewski / optimcut

Simple library to optimize leftovers from cutting slices from longer material pieces (single dimension).
MIT License
0 stars 0 forks source link

Distrubuting program as package & installer for windows #5

Open KKobuszewski opened 7 months ago

KKobuszewski commented 7 months ago

Current status Currently program traditionally compiles on Linux system: setup.py runs gcc compiler for c/python extension and installs package (module) along current python interpreter (if running with virtualenv the package/module is installed to environmental interpreter version).

It is somehow possible to use PyInstaller and create single-file program with encapsulated dependencies which works path-independently on Linux (Ubuntu 22.02).

To make windows installer we probably need docker file to emulate proper system. Alternatively we can prepare program with docker container that can be run on windows.

Creating python package

www.freecodecamp.org/build-your-first-python-package

packaging.python.org/packaging-projects

packaging.python.org/en/latest/guides/packaging-binary-extensions/#implementing-binary-extensions


Docker

Docker tutorial on YT, https://docker-curriculum.com/

https://github.com/cdrx/docker-pyinstaller <- example of docker image, probably can be exploited

https://github.com/pypa/manylinux https://github.com/pypa/python-manylinux-demo

https://gist.github.com/dariodip/4e0133eaa8733e4206ccdb48e7af6a90 <- dockerfile for cython


Pyinstaller

https://pyinstaller.org/en/stable/index.html

https://github.com/mobiusklein/cython_pyinstaller_example

https://www.makeworld.space/2021/10/linux-wine-pyinstaller.html

KKobuszewski commented 7 months ago

Nuitka

https://nuitka.net/index.html

https://stackoverflow.com/questions/5458048/how-can-i-make-a-python-script-standalone-executable-to-run-without-any-dependen

Compiles python code to C++

Unfortunately commercial version could be essential...

https://nuitka.net/doc/commercial.html

KKobuszewski commented 7 months ago

Docker & containers

no-docker1 docker1

KKobuszewski commented 7 months ago

What should be done:

  1. Create ubuntu-based docker file with software capable of cross compiling C/C++ code for Windows 64-bit mingw Pyinstaller
KKobuszewski commented 7 months ago

Check if package name is not used on PyPI

https://pypi.org/search/?q=optimcut

KKobuszewski commented 7 months ago

https://stackoverflow.com/questions/2033997/how-to-compile-for-windows-on-linux-with-gcc-g