Skip to content

maet3608/minimal-setup-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

A minimal setup.py

It is easy to start with Python scripting but soon the number of files and their dependecies start to grow. An all-to-common solution to fix the then occuring errors regarding functions not found or modules that cannot be imported is to modify PYTHONPATH. Don't do it!

setup.py avoids all the problems that come with tweaking Python's search path and will give you packages that can easily be installed on other machines. Unfortunately the documentation on how to create setup.py is rather complex and intimidating. A simple, minimal example is lacking.

Well here it is! Put it in the root folder of your project folder, adjust the properties such as author's name, install requirements, make sure you have __init.py__ files for all packages and you are good to go.

Use one of the following commands for installation:

python setup.py install

or

python setup.py develop

p.s. A nice introdution on how to write setup.py can be found here.

See python-packaging for a great tutorial and example of a complete Python package.

About

An example for a minimal setup.py

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages