{ "info": { "author": "Nizar Malangadan", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX", "Programming Language :: Python", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Testing", "Topic :: Utilities" ], "description": "tox-local-hooks\n================\n\nWith this plugin, local tox hook implementations can be defined in a file `toxhooks.py`, which is in the same folder as the tox configuration file.\n\nThis will make it easier to write your own custom local hooks for tox. You just have to write the hooks in `toxhooks.py` (instead of creating a plugin package starting with `tox-` and then installing it in the same location as tox).\n\nExample\n-------\n\n`tox.ini` file\n\n.. code-block:: bash\n\n [tox]\n minversion = 3.8.0\n requires = tox-local-hooks\n skipsdist = true\n\n [testenv]\n whitelist_externals = bash\n randpwdenv = TESTPASSWORD\n commands = bash -c 'echo RANDOM PASSWORD: $TESTPASSWORD'\n\nThen create the `toxhooks.py` file in the same folder as `tox-ini` file\n\n.. code-block:: python\n\n import pluggy, string, random\n\n hookimpl = pluggy.HookimplMarker(\"tox\")\n\n @hookimpl\n def tox_addoption(parser):\n parser.add_testenv_attribute(\n \"randpwdenv\",\n type=\"string\",\n help=\"Random password environmental variable\"\n )\n\n @hookimpl(tryfirst=True)\n def tox_configure(config):\n for envConf in config.envconfigs.values():\n if envConf.randpwdenv:\n pwd = ''.join(random.choice(string.ascii_letters) for _ in range(10))\n envConf.setenv[envConf.randpwdenv] = pwd\n\n\nWhile running `tox`, you should be able to see the following output\n\n.. code-block::\n\n RANDOM PASSWORD: {some_random_string}", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/nizar-m/tox-local-hooks", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "tox-local-hooks", "package_url": "https://pypi.org/project/tox-local-hooks/", "platform": "", "project_url": "https://pypi.org/project/tox-local-hooks/", "project_urls": { "Homepage": "https://github.com/nizar-m/tox-local-hooks" }, "release_url": "https://pypi.org/project/tox-local-hooks/0.1.3/", "requires_dist": null, "requires_python": ">3.5", "summary": "Write hooks for tox in a local file", "version": "0.1.3" }, "last_serial": 5639906, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "a0b1646097f3fa8a62588b66f0562737", "sha256": "0189a087a0b0a62150b46e14b53d84d3754cbe687c3337e054c39d92571ae93e" }, "downloads": -1, "filename": "tox-local-hooks-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a0b1646097f3fa8a62588b66f0562737", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5", "size": 2813, "upload_time": "2019-08-04T22:10:05", "url": "https://files.pythonhosted.org/packages/87/5a/ceb82e3fbb0f42902b2897725af0e55125692620a05207fe4fbea335c4e7/tox-local-hooks-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "78667b629d7ceb1a2913cc92051e50d0", "sha256": "a615f16e73d98f5e54ff171968f5352eb11aff9f67664a6d1bd267a90dba220e" }, "downloads": -1, "filename": "tox-local-hooks-0.1.2.tar.gz", "has_sig": false, "md5_digest": "78667b629d7ceb1a2913cc92051e50d0", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5", "size": 2787, "upload_time": "2019-08-05T22:17:35", "url": "https://files.pythonhosted.org/packages/ca/b9/96b71592281d3a971735fb5bbaa83e0c67db1def08e7da0365c519de2619/tox-local-hooks-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "320e0a3b62dfbb620da04a92eec2ccc9", "sha256": "f4a715abadd6035c93bc3685150ceafdfd31c54dd616c58db01946fe1494a59d" }, "downloads": -1, "filename": "tox-local-hooks-0.1.3.tar.gz", "has_sig": false, "md5_digest": "320e0a3b62dfbb620da04a92eec2ccc9", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5", "size": 2775, "upload_time": "2019-08-06T13:57:36", "url": "https://files.pythonhosted.org/packages/bd/94/0395961056f08dbfb2b6d449deada7b36d0a79279dc8a8a0a42c145561bb/tox-local-hooks-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "320e0a3b62dfbb620da04a92eec2ccc9", "sha256": "f4a715abadd6035c93bc3685150ceafdfd31c54dd616c58db01946fe1494a59d" }, "downloads": -1, "filename": "tox-local-hooks-0.1.3.tar.gz", "has_sig": false, "md5_digest": "320e0a3b62dfbb620da04a92eec2ccc9", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5", "size": 2775, "upload_time": "2019-08-06T13:57:36", "url": "https://files.pythonhosted.org/packages/bd/94/0395961056f08dbfb2b6d449deada7b36d0a79279dc8a8a0a42c145561bb/tox-local-hooks-0.1.3.tar.gz" } ] }