From 9892e339210259a7c81e310b1eeaf805f289fcb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20H=C3=A1va?= Date: Fri, 30 Jun 2017 00:26:16 +0200 Subject: [PATCH] [SW-485] Update instructions for a new PYPI.org (#333) * [SW-485] Update instructions for a new PYPI.org (cherry picked from commit 9be3f7ccbc8d9b644fdf96b64eb5986ae801b05f) --- py/PUBLISHING_TO_PIPY.txt | 40 ------------------------------- py/PUBLISHING_TO_PYPI.rst | 50 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 40 deletions(-) delete mode 100644 py/PUBLISHING_TO_PIPY.txt create mode 100644 py/PUBLISHING_TO_PYPI.rst diff --git a/py/PUBLISHING_TO_PIPY.txt b/py/PUBLISHING_TO_PIPY.txt deleted file mode 100644 index c79ee685c4..0000000000 --- a/py/PUBLISHING_TO_PIPY.txt +++ /dev/null @@ -1,40 +0,0 @@ -This is tutorial how to publish pySparkling on PyPi - -1 - Build sparkling-water. This is necessary step as the build process prepares additional packages which needs to be -in the python package - sparkling_water package containing sparkling-water jar and h2o containing h2o python files - -./gradlew build -x check - -2 - Ensure you have .pypirc file in the ~ ( home) directory with the following content: - -[distutils] -index-servers = - pypi - pypitest - -[pypi] -repository=https://pypi.python.org/pypi -username=your_username_to_pypi -password=your_password_to_pypi - -[pypitest] -repository=https://testpypi.python.org/pypi -username=your_username_to_testpypi -password=your_password_to_testpypi - - -In the file are actually two servers - pypi and pypitest. Pypi is live server where the package needs to be uploaded -and pypitest is just for testing that our package uploads well on the server and has correct format. - -3 - Test that the package successfully registers and uploads to pypi test by running in ./py directory -python setup.py register -r pypitest -python setup.py sdist upload -r pypitest - -4 - If everything goes well, register and upload the package on pypi live -python setup.py register -r pypi -python setup.py sdist upload -r pypi - - -5 - Don't forget to do this for each pySparkling release ( for Spark 1.5, Spark 1.6 ... ) - -6 - That's it! \ No newline at end of file diff --git a/py/PUBLISHING_TO_PYPI.rst b/py/PUBLISHING_TO_PYPI.rst new file mode 100644 index 0000000000..9a89b64400 --- /dev/null +++ b/py/PUBLISHING_TO_PYPI.rst @@ -0,0 +1,50 @@ +This is tutorial how to publish PySparkling on PyPi +=================================================== + +1 - Build Sparkling Water. This is necessary step as the build process prepares additional packages which needs to be +in the python package + +- sparkling_water package containing sparkling-water jar +- h2o package containing h2o python files + +.. code:: bash + + ./gradlew build -x check + +2 - Ensure you have ``.pypirc`` file in the ~ ( home) directory with the following content: + +.. code:: xml + + [distutils] + index-servers = + pypi + pypitest + + [pypi] + username=your_username_to_pypi + password=your_password_to_pypi + + [pypitest] + repository=https://test.pypi.org/legacy/ + username=your_username_to_testpypi + password=your_password_to_testpypi + + +There are actually two servers - pypi and pypitest. Pypi is live server where the package needs to be uploaded +and pypitest is just for testing that our package uploads well on the server and has correct format. + +3 - Go to ``py/build/pkg`` + +4 - Test that the package successfully uploads to pypi test by running: + +.. code:: bash + + python setup.py sdist upload -r pypitest + +5 - If everything goes well, upload the package to pypi live: + +.. code:: bash + + python setup.py sdist upload -r pypi + +6 - That's it! \ No newline at end of file