ceronman/typeannotations — pull request #4 by dahlia (2014-08-19 17:20:47+00:00)
Title: Packaging in the Python standard way

I would like it to be submitted on PyPI so that we can install it using `pip install typeannotations`, so I worked on its packaging.

First of all, I wrote a setup.py script for the package, and it consists of several metadata about the package. `version` is one of them, and I fill it with arbitrary version: 1.0.0. Of course it can be adjusted by editing setup.py. There is also `long_description`, which is shown for PyPI package page. It should be reStructuredText rather than Markdown in order to be rendered by PyPI, so I reformatted README into reStructuredText. Fortunately GitHub and PyPI both render it well.

To submit the package to PyPI, you first need to register its name. This process is only required once:

```console
$ python3 setup.py register
```

After it’s registered, then build the package and upload it:

```console
$ python3 setup.py sdist upload
```

For more explanation, see [Python Packaging User Guide][1] as well.

Thanks!

[1]: https://packaging.python.org/en/latest/tutorial.html#uploading-your-project-to-pypi