{ "info": { "author": "Musyoka Morris", "author_email": "musyokamorris@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "Travis CI + Pypi Integration Guide\n=====================================\n\nThis is a very short guide to using Travis CI with your GitHub hosted code repository\nto automatically deploy a python package to Pypi.\nIf you\u2019re new to continuous integration or would like some more information on what Travis CI does,\nread `Travis CI Core Concepts for Beginners `_ first.\n\nIn this guide, we will be creating a Travis CI pipeline to automatically:\n\n- Start mongodb service. Requires ``mongo>=4.0``\n- Run ``pytest`` tests\n- Distributes the package to pypi\n\nAll the code can be found on https://github.com/musyoka-morris/travis-pypi-integration\n\nPrerequisites\n******************\n\nTo proceed, make sure you have a Travis CI account.\nYou can easily create one by visiting https://travis-ci.org/ and then click the ``Sign in with Github`` button.\n\n1. Install Travis CLI\n***********************\n\nFirst we need to install ``Travis CLI`` which is written in Ruby and published as a gem.\nWe will be using this tool to encrypt the Pypi password.\n\n\nTo install the gem:\n\n sudo gem install travis\n\nERROR: can't find header files for ruby ...\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIf you run into the error **can't find header files for ruby**,\nthen you also need to have the ruby headers installed.\n\nThe `stack overflow answer `_\nsaved me. In summary, you need to install ruby development headers as follows:\n\nFor Debian, and other distributions using Debian style packaging:\n\n sudo apt-get install ruby-dev\n\nFor Ubuntu:\n\n sudo apt-get install ruby-all-dev\n\n2. Create a .travis.yml file\n******************************\n\n.travis.yml\n~~~~~~~~~~~~~\n\n.. code-block:: yaml\n\n language: python # We are using Python language\n install: pip install -r requirements.txt # Install requirements\n script: pytest # Run pytest tests\n\nMongoDB service\n~~~~~~~~~~~~~~~~~~\n\nAdd instructions to start mongodb service.\n\nThis section is optional if you are not interested in MongoDB service.\nI simply left it here to serve as a guide for other services of interest.\n\n.. code-block:: yaml\n\n ...\n services:\n - mongodb\n before_script:\n - sleep 15 # Sleep for 15 seconds to ensure the service is started before we issue any commands\n\nBy default, travis loads ``mongo v2.4``. We instruct travis to load mongo v4.0\n\n.. code-block:: yaml\n\n ...\n dist: xenial\n addons:\n apt:\n sources:\n - mongodb-4.0-xenial # As defined on Travis Source safelist\n\nPypi Deployment\n~~~~~~~~~~~~~~~~\n\nAdd instruction for deployment to pypi\n\n.. code-block:: yaml\n\n ...\n deploy:\n provider: pypi\n user: musyoka-morris # Replace this with your pypi username. Password will be provided later\n distributions: sdist bdist_wheel\n skip_existing: true\n\n3. Add encrypted pypi password\n********************************\n\nNotice that so far we have not specified our pypi password.\nThe easiest way to add the password encrypted with the public key is to use Travis CLI:\n\n travis encrypt Your-Password-Here --add deploy.password\n\nNote: This assumes you are running the command in your project directory. If not, add ``-r owner/project``.\n\nThe command automatically adds your encrypted password on the .travis.yml file.\nyour .travis.yml file should look like this:\n\n.. code-block:: yaml\n\n ...\n deploy:\n ...\n user: musyoka-morris\n password:\n secure: YourEncryptedPasswordHere\n\n\n4. Push to GIT\n****************\n\nTravis configuration is ready.\nSimply push the code to the master branch and Travis will take care of the rest.\n\n\nThe complete ``.travis.yml`` file can be found on Github https://github.com/musyoka-morris/travis-pypi-integration\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/musyoka-morris/travis-pypi-integration", "keywords": "Travis CI,Pypi,integration,CI,CD,automated distribution", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "travis-pypi-integration", "package_url": "https://pypi.org/project/travis-pypi-integration/", "platform": "", "project_url": "https://pypi.org/project/travis-pypi-integration/", "project_urls": { "Homepage": "https://github.com/musyoka-morris/travis-pypi-integration" }, "release_url": "https://pypi.org/project/travis-pypi-integration/2.1.2/", "requires_dist": [ "pytest", "pymongo", "pymongoext" ], "requires_python": ">=3", "summary": "Sample Travis CI + Pypi integration", "version": "2.1.2" }, "last_serial": 5173500, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "eb8f3980bfa7029bbf574f25daf4cb53", "sha256": "d9fc8f94396bdeb279baad6e3688727ba29f4a952763f62151360e8a52702e39" }, "downloads": -1, "filename": "travis_pypi_integration-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "eb8f3980bfa7029bbf574f25daf4cb53", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 2555, "upload_time": "2019-04-22T10:41:28", "url": "https://files.pythonhosted.org/packages/4b/28/2ea7ea0f14cbfc8847fcdcda22fe21b068aa4b9064d6b7f64fe4bb804235/travis_pypi_integration-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "97963f702cd072b79a26ded0e27cb092", "sha256": "340308f18da9b095783ea94752d8c8e89d96cf6505b80a8b8f85b4732fb79f62" }, "downloads": -1, "filename": "travis_pypi_integration-1.0.0.tar.gz", "has_sig": false, "md5_digest": "97963f702cd072b79a26ded0e27cb092", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 1388, "upload_time": "2019-04-22T10:41:30", "url": "https://files.pythonhosted.org/packages/70/3c/030f3098b85c969fe810beca6fddd52288e11ac5bd246b58024f5944a8ef/travis_pypi_integration-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "3d8de4a860318911e0368569e31eb01a", "sha256": "a5bec2cdd5ad531048d58725d871a641f362387e36d9990eb9aa1700c2a029e1" }, "downloads": -1, "filename": "travis_pypi_integration-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3d8de4a860318911e0368569e31eb01a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 2557, "upload_time": "2019-04-22T10:51:28", "url": "https://files.pythonhosted.org/packages/7c/df/ec9998963b5faf72677f29d01f20f9a2d47d716321f9eb8802087a6c8508/travis_pypi_integration-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b884f03083cb3356bd94801864978aa0", "sha256": "ecd802cb63ec27233f83cc738df008b10464351d5847af96120951b98dfc648e" }, "downloads": -1, "filename": "travis_pypi_integration-1.1.0.tar.gz", "has_sig": false, "md5_digest": "b884f03083cb3356bd94801864978aa0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 1365, "upload_time": "2019-04-22T10:51:29", "url": "https://files.pythonhosted.org/packages/e5/a0/0c53207d3d3a07cc200e247d151d4705b78e9586f9fc9c87ffbed1518676/travis_pypi_integration-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "0bedfe4e76fdd774a5e9e440610ea662", "sha256": "4a5047d0d9389478af7f8eeb2b72a4c79b730f202d8d054d9f51dc526f17401b" }, "downloads": -1, "filename": "travis_pypi_integration-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "0bedfe4e76fdd774a5e9e440610ea662", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 2566, "upload_time": "2019-04-22T14:45:42", "url": "https://files.pythonhosted.org/packages/e2/18/85c540a210652de7413fbf927756e5e32a41b763d743db1a5ce66893a5d0/travis_pypi_integration-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "12d9711a819de83ca53582912f676043", "sha256": "5cfab10bb62aa39b8ddd00032f3045d2a02e73757ea5d09fa9bca83fd4702477" }, "downloads": -1, "filename": "travis_pypi_integration-1.2.0.tar.gz", "has_sig": false, "md5_digest": "12d9711a819de83ca53582912f676043", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 1378, "upload_time": "2019-04-22T14:45:43", "url": "https://files.pythonhosted.org/packages/08/28/9de4011fc5069de99c4f968973d9621d64d25df69e8003113f2b39a4d528/travis_pypi_integration-1.2.0.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "633a1bd8e7ffcd4d25761660b829a0db", "sha256": "54de05872606714946ac2b850e348a3f62cb8c9abb835b5b39b07f48730a5b09" }, "downloads": -1, "filename": "travis_pypi_integration-2.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "633a1bd8e7ffcd4d25761660b829a0db", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 2797, "upload_time": "2019-04-22T14:55:29", "url": "https://files.pythonhosted.org/packages/bd/e8/8dda2a424c6df89b7920e615aa88c811c1eaf6ab509f068901991db0ff9b/travis_pypi_integration-2.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "53a6a0dee75de74b22eda3c949002670", "sha256": "a17b2c6ea0ee4bf2dafaa4fa2bc5957459789d80a6ada49fad52bf767d02fe13" }, "downloads": -1, "filename": "travis_pypi_integration-2.0.0.tar.gz", "has_sig": false, "md5_digest": "53a6a0dee75de74b22eda3c949002670", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 1603, "upload_time": "2019-04-22T14:55:30", "url": "https://files.pythonhosted.org/packages/eb/a7/b21e7c996f0bd2b49dbb4c599d14d570600d1654e17c68f162ef2cba9668/travis_pypi_integration-2.0.0.tar.gz" } ], "2.1.0": [ { "comment_text": "", "digests": { "md5": "9529f8e76d1e823f0095c34689ca967f", "sha256": "d908ced54ff2e2688687460daf30f6dffea74fb237932e750651a2320a3f84ba" }, "downloads": -1, "filename": "travis_pypi_integration-2.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9529f8e76d1e823f0095c34689ca967f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 4196, "upload_time": "2019-04-22T16:11:10", "url": "https://files.pythonhosted.org/packages/bf/2d/0b022e4798a08e563119e2387e91f3c02a0e861fedbffdbf014354fd31ae/travis_pypi_integration-2.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "901d6262374619582dcca9fc893317cc", "sha256": "978314f31af8bef46d02b8adc2ebaf6caac90ad4217e4821b587fb4be043b895" }, "downloads": -1, "filename": "travis_pypi_integration-2.1.0.tar.gz", "has_sig": false, "md5_digest": "901d6262374619582dcca9fc893317cc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 3373, "upload_time": "2019-04-22T16:11:11", "url": "https://files.pythonhosted.org/packages/b0/90/3f6c4e7cfe8d49b6abdf8167ca1b17c301a062eb4e910b52fe76af0ad8cb/travis_pypi_integration-2.1.0.tar.gz" } ], "2.1.1": [ { "comment_text": "", "digests": { "md5": "9bc08c6b5dbc14fc1125f984f465bef9", "sha256": "caabbf10e54b0361137385a384a195ead202d4c2539690109e85b65928c0854a" }, "downloads": -1, "filename": "travis_pypi_integration-2.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "9bc08c6b5dbc14fc1125f984f465bef9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 4319, "upload_time": "2019-04-22T16:20:53", "url": "https://files.pythonhosted.org/packages/29/28/c54a3ec9292109453c829d428ce86e2be0714fd031b683ca5bbd223dc7ac/travis_pypi_integration-2.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3beb4a3c3838fb9d92326b91907dbe04", "sha256": "c69fa22262102600141cc48b930de8689ecd241ad90fb61265bd8cc815214c92" }, "downloads": -1, "filename": "travis_pypi_integration-2.1.1.tar.gz", "has_sig": false, "md5_digest": "3beb4a3c3838fb9d92326b91907dbe04", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 3538, "upload_time": "2019-04-22T16:20:55", "url": "https://files.pythonhosted.org/packages/4a/5d/527a69a8af55f229770ab0f22c050165cffc5cc74376b79105649e756747/travis_pypi_integration-2.1.1.tar.gz" } ], "2.1.2": [ { "comment_text": "", "digests": { "md5": "1b4ba9f82318efe78f110861e2a9e3ae", "sha256": "07809874835d332f69f7482bb473108ca7f0f17e59c1cbb3f28b2196fee2e023" }, "downloads": -1, "filename": "travis_pypi_integration-2.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "1b4ba9f82318efe78f110861e2a9e3ae", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 4320, "upload_time": "2019-04-22T16:27:40", "url": "https://files.pythonhosted.org/packages/15/0b/c01c7f8ffb5e0889708cf7d66cd0ec6261e8cbd680d9c6c8e8b64c0c537b/travis_pypi_integration-2.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "079d996c24753c147358e67daed488b4", "sha256": "8f5b83b5c5f153e5f37e1a81a4d17847d7d1ef1a8007fc6f296c5d7175e8e492" }, "downloads": -1, "filename": "travis_pypi_integration-2.1.2.tar.gz", "has_sig": false, "md5_digest": "079d996c24753c147358e67daed488b4", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 3534, "upload_time": "2019-04-22T16:27:41", "url": "https://files.pythonhosted.org/packages/9b/8d/f8ae34dbbe3426ddf93b31ad82f498544b5241680c00d0f0f63d3371f13b/travis_pypi_integration-2.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1b4ba9f82318efe78f110861e2a9e3ae", "sha256": "07809874835d332f69f7482bb473108ca7f0f17e59c1cbb3f28b2196fee2e023" }, "downloads": -1, "filename": "travis_pypi_integration-2.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "1b4ba9f82318efe78f110861e2a9e3ae", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 4320, "upload_time": "2019-04-22T16:27:40", "url": "https://files.pythonhosted.org/packages/15/0b/c01c7f8ffb5e0889708cf7d66cd0ec6261e8cbd680d9c6c8e8b64c0c537b/travis_pypi_integration-2.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "079d996c24753c147358e67daed488b4", "sha256": "8f5b83b5c5f153e5f37e1a81a4d17847d7d1ef1a8007fc6f296c5d7175e8e492" }, "downloads": -1, "filename": "travis_pypi_integration-2.1.2.tar.gz", "has_sig": false, "md5_digest": "079d996c24753c147358e67daed488b4", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 3534, "upload_time": "2019-04-22T16:27:41", "url": "https://files.pythonhosted.org/packages/9b/8d/f8ae34dbbe3426ddf93b31ad82f498544b5241680c00d0f0f63d3371f13b/travis_pypi_integration-2.1.2.tar.gz" } ] }