September 2017
Intermediate to advanced
222 pages
5h 1m
English
We’ll start by learning how to make a small project installable with pip. For a simple one-module project, the minimal configuration is small. I don’t recommend you make it quite this small, but I want to show a minimal structure in order to build up to something more maintainable, and also to show how simple setup.py can be. Here’s a simple directory structure:
| | some_module_proj/ |
| | ├── setup.py |
| | └── some_module.py |
The code we want to share is in some_module.py:
| | def some_func(): |
| | return 42 |
To make it installable with pip, we need a setup.py file. This is about as bare bones as you can get:
| | from setuptools ... |
Read now
Unlock full access