Tutorial by Examples

The setup script is the centre of all activity in building, distributing, and installing modules using the Distutils. It's purpose is the correct installation of the software. If all you want to do is distribute a module called foo, contained in a file foo.py, then your setup script can be as simpl...
Command line scripts inside python packages are common. You can organise your package in such a way that when a user installs the package, the script will be available on their path. If you had the greetings package which had the command line script hello_world.py. greetings/ greetings/ ...
setuptools_scm is an officially-blessed package that can use Git or Mercurial metadata to determine the version number of your package, and find Python packages and package data to include in it. from setuptools import setup, find_packages setup( setup_requires=['setuptools_scm'], use_...
As seen in previous examples, basic use of this script is: python setup.py install But there is even more options, like installing the package and have the possibility to change the code and test it without having to re-install it. This is done using: python setup.py develop If you want to p...

Page 1 of 1