Merge branch 'dev'
diff --git a/.gitignore b/.gitignore
index f517fa3..d8a659d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,6 +24,8 @@
__pycache__/
*.py[cod]
*$py.class
+# Build results
+*.egg-info/
## CSharp and VisualStudio, selected lines from https://raw.githubusercontent.com/github/gitignore/master/VisualStudio.gitignore
# User-specific files
diff --git a/doc/releasing-antlr.md b/doc/releasing-antlr.md
index af9cf21..8c8104e 100644
--- a/doc/releasing-antlr.md
+++ b/doc/releasing-antlr.md
@@ -339,7 +339,13 @@
### Python
-The Python targets get deployed with `setup.py`. First, set up `~/.pypirc` with tight privileges:
+The Python targets get deployed with `setup.py` (Python 2), or `build` and `twine` (Python 3).
+Install them by
+```sh
+pip3 install build twine
+```
+
+First, set up `~/.pypirc` with tight privileges:
```bash
beast:~ $ ls -l ~/.pypirc
@@ -369,12 +375,13 @@
python setup.py sdist upload
```
-and do again for Python 3 target
+For Python 3 target, do
```bash
cd ~/antlr/code/antlr4/runtime/Python3
+python3 -m build
# assume you have ~/.pypirc set up
-python3 setup.py sdist upload
+twine upload dist/antlr4-python3-runtime-<version>.tar.gz dist/antlr4_python3_runtime-<version>-py3-none-any.whl
```
There are links to the artifacts in [download.html](http://www.antlr.org/download.html) already.