Differences between revisions 8 and 9
Revision 8 as of 2015-02-09 14:46:38
Size: 1022
Editor: VinsS
Comment: Change pypirc file
Revision 9 as of 2015-06-05 15:32:41
Size: 1521
Comment: Added a step to register the new project
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
Line 21: Line 20:
username = richard username = <your user name goes here>
Line 26: Line 25:
username = richard username = <your user name goes here>
Line 29: Line 28:
3. Use the test server URL to register your project (it gives you the right to modify your project on the server):
Line 30: Line 30:
3. Then use the test server URL when uploading or installing packages: {{{
   python setup.py register -r https://testpypi.python.org/pypi
}}}
4. Then uploading it:
Line 35: Line 38:
To install packages from it: Now that your project is on the server, test that you can install your package from testpypi (it may be a good idea to run your unit tests from another directory to make sure you are using the version you just installed):
Line 39: Line 43:
If you need to push your project again, change the version number in `setup.py` otherwise the server will give you an error.

Test PyPI Server

Just learning the packaging ropes or trying some system integration out?

Why not use our new test PyPI server at https://testpypi.python.org/pypi

To upload packages to it you need to:

1. Register with the site. It has a different user database than the main PyPI server. It also gets cleaned out on a semi-regular basis.

2. Fill in your test PyPI credentials in your ~/.pypirc file. You should end up with something like this:

[distutils]
index-servers=
    pypi
    pypitest

[pypitest]
repository = https://testpypi.python.org/pypi
username = <your user name goes here>
password = <your password goes here>

[pypi]
repository = https://pypi.python.org/pypi
username = <your user name goes here>
password = <your password goes here>

3. Use the test server URL to register your project (it gives you the right to modify your project on the server):

   python setup.py register -r https://testpypi.python.org/pypi

4. Then uploading it:

   python setup.py upload -r https://testpypi.python.org/pypi

Now that your project is on the server, test that you can install your package from testpypi (it may be a good idea to run your unit tests from another directory to make sure you are using the version you just installed):

    pip install -i https://testpypi.python.org/pypi <package name>

If you need to push your project again, change the version number in setup.py otherwise the server will give you an error.

TestPyPI (last edited 2015-06-05 15:32:41 by Pierre Thibault)

Unable to edit the page? See the FrontPage for instructions.