Skip to content

Instantly share code, notes, and snippets.

@a-recknagel
Created November 7, 2020 16:07
Show Gist options
  • Save a-recknagel/53425eb2eecfd62c7d6547d15edba7eb to your computer and use it in GitHub Desktop.
Save a-recknagel/53425eb2eecfd62c7d6547d15edba7eb to your computer and use it in GitHub Desktop.
Minimal packaging requirements
from setuptools import setup
setup(
name="my_package",
version="0.1.0",
packages=["my_package"],
install_requires=[],
)
@a-recknagel
Copy link
Author

a-recknagel commented Nov 7, 2020

This setup file should live at the top-level of the project tree, with the code that needs to be packaged being inside of a folder called "my_package", as the packages keyword defines:

.
├───setup.py
└───my_package
    ├───__init__.py 
    ├───my_code.py
    └───...

The package can then be installed into the currently activated python environement by running pip install -e .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment