diff --git a/.gitignore b/.gitignore index 8295e65..8dacac3 100644 --- a/.gitignore +++ b/.gitignore @@ -16,5 +16,9 @@ tmp/ .idea/ test/resources/lrs_properties.py +# release +dist +tincan.egg-info/ + # wild todo.md diff --git a/README.md b/README.md index 9b2ec9d..d89212a 100644 --- a/README.md +++ b/README.md @@ -75,3 +75,48 @@ The docs will be output to `docs/build/html/`. If you would like to change the names of each section, you can do so by modifying `docs/source/tincan.rst`. ## Releasing +To release to PyPI, first make sure that you have a PyPI account set up at https://pypi.python.org/pypi (and at + https://testpypi.python.org/pypi if you plan on using the test index). You will also need a .pyirc file in your + home directory with the following contents. + + [distutils] + + index-servers = + pypi + pypitest + + [pypi] # authentication details for live PyPI + repository: https://pypi.python.org/pypi + username: + password: + + [pypitest] # authentication details for test PyPI + repository: https://testpypi.python.org/pypi + username: + password: + +The pypitest contents of the .pyirc file are optional and are used for hosting to the test PyPI index. + +Update setup.py to contain the correct release version and any other new information. + +To test the register/upload, run the following commands in the repo directory: + + python setup.py register -r pypitest + python setup.py sdist upload -r pypitest + +You should get no errors and should be able to find this tincan version at https://testpypi.python.org/pypi. + +To register/upload to the live PyPI server, run the following commands in the repo directory: + + python setup.py register -r pypi + python setup.py sdist upload -r pypi + +The new module should be now be installable with pip or easy_install. + + easy_install tincan + +or + + pip install tincan + +Use sudo as necessary. diff --git a/setup.py b/setup.py index d3fe715..4cdfd4c 100644 --- a/setup.py +++ b/setup.py @@ -21,8 +21,8 @@ 'SCORM', 'AICC', ], - requires=[ - 'aniso8601', - 'pytz', - ] -) + install_requires=[ + 'aniso8601', + 'pytz', + ], +) \ No newline at end of file