Codementor: How to run Linux-only Python projects by hacking makefiles through git mingw bash

Linux owners configure makefiles so as to have easy commands to perform operations such as make dependencies to pip install required packages. Here are the dry simple steps to run makefiles in Python projects on Windows.

  • Download git for windows. You should get git bash, git gui etc

  • Download the mingw GUI setup. Install it wherever you want. After running the setup you should get a screen like that:

Alt Text

  • On continuing you should get under all packages. Search for make, class bin. Right click and select mark for installation

Alt Text

  • Under installation, select apply changes

Alt Text

  • Confirm by clicking on apply

Alt Text

  • My git for windows’ migw is installed at C:Program FilesGitmingw32 and my mingw get is installed at C:MinGW. We need to merge the contents on the mingw32 folder with the MinGW. Ctrl+a to select all folder in MinGW then right click and copy. Then go to mingw32 folder and click paste. When asking is merge, say yes. If same files skip

  • Verify if there is venv/ in project gitignore. If not add it and reapply gitignore by using the following command (see accepted answer)

  • create a new virtual environent.

python -m venv venv
  • activate the env
cd venv
cd scripts
. activate

note the space between . and activate

  • cd back cd ../..

now try out any command listed here for example make dependencies

Forgot to say under bin rename mingw-get.exe to make.exe

Anything mail me arj.python at gmail dot com

This is something crazily powerful!

Author: Shantun Parmar

2 thoughts on “Codementor: How to run Linux-only Python projects by hacking makefiles through git mingw bash

  1. A lot of thanks for all your valuable efforts on this site. Kate loves getting into investigation and it’s really easy to understand why. I know all concerning the dynamic medium you give informative solutions on this web blog and as well as foster participation from others on that content plus our daughter is always discovering a lot. Have fun with the remaining portion of the new year. You are conducting a great job.

Thanks for your support, You may click on ads to encourage us which assits to writers.

Leave a Reply

Your email address will not be published.