Skip to content

Instantly share code, notes, and snippets.

@toxinu
Created September 23, 2020 16:30
Show Gist options
  • Save toxinu/8059bdcc1e868a1237c692913df2209b to your computer and use it in GitHub Desktop.
Save toxinu/8059bdcc1e868a1237c692913df2209b to your computer and use it in GitHub Desktop.
blog/how-to-store-your-python-package-metadata
import os
from setuptools import setup
base_dir = os.path.dirname(__file__)
about = {}
with open(os.path.join(base_dir, "my_package", "__about__.py")) as f:
exec(f.read(), about)
setup(
name=about["__title__"],
version=about["__version__"],
description=about["__summary__"],
author=about["__author__"],
author_email=about["__email__"],
url=about["__uri__"],
license=about["__license__"]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment