An open API service indexing awesome lists of open source software.

https://github.com/project-undefined/cpython-compile-windows-base

Quickly set up a cpython project that compiles pyx files to exe files
https://github.com/project-undefined/cpython-compile-windows-base

cython python python-to-exe pyx windows

Last synced: 3 months ago
JSON representation

Quickly set up a cpython project that compiles pyx files to exe files

Awesome Lists containing this project

README

          

# cpython-compile-windows-base
Quickly set up a cpython project that compiles pyx files to exe files

# Instructions

Install cython via pip first
Make sure you have MINGW for c installed

NOTICE: in this projects the python installation is located at "C:/Python39" (you can change the location in the compile.sh file)

BEFORE DOING ANYTHING ADD THIS TO YOUR PYCONFIG.h FILE IN ```/Python39/pyconfig.h```
(search for the comment ```/* Compiler specific defines */``` and put this below it)

```
#ifdef __MINGW32__
#ifdef _WIN64
#define MS_WIN64
#endif
#endif

#ifdef __MINGW64__
#ifdef _WIN64
#define MS_WIN64
#endif
#endif
```

All you have to do now is run ```compile.sh```!

(It will compile ```lib.pyx``` to ```lib.c```, ```lib.h```, etc. Then it will use gcc to compile ```lib.c``` to ```lib.exe```)