Differences between revisions 10 and 11
Revision 10 as of 2016-11-30 18:46:11
Size: 1506
Editor: mbussonn
Comment: uniformise testpypi and Pypitest, update instruction to upload with twine innstead of setup.py upload
Revision 11 as of 2017-05-23 02:56:30
Size: 1463
Editor: NickCoghlan
Comment:
Deletions are marked like this. Additions are marked like this.
Line 24: Line 24:
repository = https://pypi.python.org/pypi

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
    testpypi

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

[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 using twine:

   twine upload dist/* -r testpypi

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 2017-08-11 17:49:12 by rsyring)

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