Closed andersgs closed 5 years ago
Make sure to follow these instructions to ensure the Markdown README gets properly parsed by PyPI:
https://packaging.python.org/guides/making-a-pypi-friendly-readme/
from setuptools import setup
# read the contents of your README file
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='an_example_package',
# other arguments omitted
long_description=long_description,
long_description_content_type='text/markdown'
)
Working on it
Create a little
invoke
script to automatically version bump, generate the bundles, and push to PyPI. Example usingbumpversion
(to automatically bump version) andtwine
(to upload to PyPI) below.You can add that to a file called
tasks.py
and then just runinv
to push new versions to PyPI (afterpip3 install invoke
). You could also make it a bash script, of course.Read
twine
README for some more background: https://github.com/pypa/twineAnd,
invoke
: http://www.pyinvoke.org/