Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating makefiles in python

I have two python programs. say a.py and b.py. I build an index in a.py and then run b.py which import a.py.

I want to make a python makefile to install the two porgrams such as I go to my makefile and run :

./install - it installs the project in current directory ./a.py - interprets a.py ./b.py - interprets b.py

Any idea how to make this or pointers where I could find resource for this ?

like image 409
Scooby Avatar asked May 22 '26 12:05

Scooby


1 Answers

To get started with python distutils, you just need to create a setup.py file. See the python reference for the documentation of setup.py, and see a real example here.

Once you've made a setup.py file that is appropriate to your project structure, you can install the project by running python setup.py install. See this for additional commands.

like image 55
Emmett Butler Avatar answered May 25 '26 00:05

Emmett Butler



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!