Skip to content

Latest commit

 

History

History
100 lines (62 loc) · 2.83 KB

HACKING.rst

File metadata and controls

100 lines (62 loc) · 2.83 KB

Introduction

Detail basic command to know when hacking pyloc. All commands must be executed from the root of the repository.

Test suite

Use this command to run the entire test suite:

$ python -m unittest test_pyloc

or:

$ nosetests

If you are using pyenv, you can run the test suite against several version of python like this:

for v in `pyenv versions --bare`; do
  echo ">>>>>>>>>>>>>> $v"
  PYENV_VERSION=$v python -m unittest test_pyloc
done

or using tox (make sure all python environment set in tox.ini are installed in pyenv and that they are made globally available using for instance: pyenv global 2.7.11 3.5.1 3.4.3 3.3.6 3.2.6)

tox

How to make a release

  1. Write a tag message containing the release notes. You can get the list of new commits since the last release using this command:

    $ git log $(git describe --always --match 'v*' --abbrev=0)..master

    Store you tag message in a file called '/tmp/pyloc.tagmsg' for instance.

  2. Make sure local commits are pushed.
  3. Check that Travis.CI has successfully checked the last commit.
  4. Choose a release version and store it in a VERSION shell variable:
    • Release number are of the form X.Y.Z.
    • Pre-release number are of the form X.Y.ZrcN
    • Post-release number are of the form X.Y.Z-N. This kind of release is supported only for continuous integration system and are not tagged. Do not pass any version number or tag message as argument to the release script to make such a release. If you want to make a bug fix release just increment the Z number.
  5. Make a test release on testpypi.python.org server and check that it is ok (mainly the information text should be well formatted).

    Make sure the ``--push`` flag is not set and the repo is ``pypitest``

    $ ./release.sh --tag-msg=/tmp/pyloc.tagmsg --upload=pypitest --clean $VERSION
  6. Visit https://testpypi.python.org/pypi/pyloc/$VERSION and check that all looks good.
  7. Test that installation is ok from pypitest:

    $ ./script/test-install.sh 2.7.11 https://testpypi.python.org/pypi 0.2.0 /tmp/testinstall2
    $ ./script/test-install.sh 3.5.1 https://testpypi.python.org/pypi 0.2.0 /tmp/testinstall3
  8. Make the release:

    $ ./release.sh --tag-msg=/tmp/pyloc.tagmsg --upload=pypi --push $VERSION
  9. Test that installation is ok from pypi:

    $ ./script/test-install.sh 2.7.11 https://pypi.python.org/simple 0.2.0 /tmp/testinstall2
    $ ./script/test-install.sh 3.5.1 https://pypi.python.org/simple 0.2.0 /tmp/testinstall3
  10. Unset the VERSION shell variable.