diff --git a/Examples/PythonPackageExample/python/README.rst b/Examples/PythonPackageExample/python/README.rst index 7d844c8b21..dbeaa6b484 100644 --- a/Examples/PythonPackageExample/python/README.rst +++ b/Examples/PythonPackageExample/python/README.rst @@ -1,50 +1,65 @@ Sample Module Repository ======================== This simple project is an example repo for Python projects. -It is adapted from: -``_. +It is adapted from [this github example](https://github.com/kennethreitz/samplemod/tree/master). +[Learn more](). -And tries to follow the instructions on -``_. +And tries to follow the instructions on [this guide](). The actual code can be found in sample/thinker.py. It implements a toy class which "thinks" random thoughts. The tests for this class are located in sample/tests. Python will automatically discover tests if you name them test_*.py Look at test_advanced.py for a simple unittest example. ## install dependencies either use: +``` pip install -r requirements.txt +``` or +``` make init +``` ## install this package -You have to choices: +You have two choices: 1. install a development version. This means that if you make changes to the packages code you make will affect the code you write which is based on this package. 2. "normal" install. This will install the current version. After you installed your package, it can be imported in your via import sample where ever you are. ### install development version: either use: +``` python setup.py develop +``` or +``` make install_develop +``` ### "normal" install either use: +``` python setup.py install +``` or +``` make install +``` ## run tests either run: +``` python -m unittest discover +``` or +``` make test +```