from 0 to PyPI in 15 minutes
(hopefully...)
The process of installing, upgrading or publishing Python source code
https://python-packaging-user-guide.readthedocs.org/en/latest/glossary/
$ mkdir athina $ cd athina $ python -m venv .venv $ source .venv/bin/activate $ pip install -U setuptools pip wheel twine
def hi():
return 'Hi Athens!'
from setuptools import setup
setup(
name='athina',
version='0.1.0',
description='A sample Python project',
long_description='Long description of the package should be here.',
url='https://projectsite.com',
author='John Doe',
author_email='john@example.com',
license='MIT',
platforms='any',
py_modules=['athina']
)
A distribution format that provides metadata and the essential source files needed for installing by a tool like pip, or for generating a Built Distribution.
$ python setup.py sdist
A Distribution format containing files and metadata that only need to be moved to the correct location on the target system, to be installed
A Built Distribution format
$ python setup.py bdist_wheel --universal
https://pypi.python.org
or for testing
https://testpypi.python.org
[distutils]
index-servers=
pypi
testpypi
[pypi]
repository = https://pypi.python.org/pypi
username = alefteris
[testpypi]
repository = https://testpypi.python.org/pypi
username = thale
$ twine register -r testpypi dist/athina-0.1.0.tar.gz
$ twine upload -r testpypi dist/*
$ pip install -i https://testpypi.python.org/pypi athina
Here is a cat packaged