Skip to content
Uche edited this page Jan 30, 2015 · 20 revisions

Amara3-xml developer notes

Preparation

You need Github & PyPI update access.

You should also have pypandoc installed, if possible. On Debian-ish systems:

sudo apt-get install pandoc
#pandoc is Python 2.x only, so switch to a py2 VM, then:
pip install pypandoc

Actually at present, until pandoc supports Python 3 we have to generate an RST README by hand and then paste it into setup.py, as discussed below.

You also need to have set up index-servers in ~/.pypirc akin to:

# Tells distutils what package indexes you can push to
[distutils] 
index-servers =
    pypi
    pypitest

# authentication details for live PyPI
[pypi]
repository: https://pypi.python.org/pypi
username: {{your_username}}
password: {{your_password}}

# authentication details for test PyPI
[pypitest]
repository: https://testpypi.python.org/pypi
username: {{your_username}}
password: {{your_password}}

Release

#Update README.md
vi README.md
#Generate RST from MD
pandoc -t rst README.md > /tmp/README.rst 
#Next copy the contents of /tmp/README.rst into the LONGDESC constant in setup.py
#Upload to PyPI Test
python setup.py sdist upload -r pypitest

Now check the updated package page. For example if you're seeing raw RST description rather than HTML, it might be a link whitelist issue. Once it looks all good, proceed to the real release.

#Upload to PyPI
python setup.py sdist upload -r pypi
#Select tag name, update according to released version
export RELEASETAG=v3.0.0a5 #This works for bash. Tweak to taste.
#Tag release
git tag -am "Release of version $RELEASETAG" $RELEASETAG #Must be double, not single quotes
#Push the tag to Github
git push origin $RELEASETAG
#Hmm how about git push --tags origin master ?
#Bump version for next release
vi lib/version.py

Clone this wiki locally