Building your package
In our example, we can package up our solution using the setuptools
library. In order to do this, you must create a file called setup.py
that contains the important metadata for your solution, including the location of the relevant packages it requires. An example of setup.py
is shown in the following code block. This shows how to do this for a simple package that wraps some of the outlier detection functionality we have been mentioning in this chapter:
from setuptools import setup
setup(name='outliers',
version='0.1',
description='A simple package to wrap some outlier detection functionality',
author='Andrew McMahon',
license='MIT',
packages=['outliers'],
zip_safe=False)
We can see that setuptools
allows you to supply metadata such as the name of the package, the version number, and the software license. Once you have this file in the root directory of your project, you can...