{ "info": { "author": "Stephen Rosen", "author_email": "sirosen@uchicago.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "callable-pip\n============\n\n``callable-pip`` provides a drop-in replacement for ``pip.main()`` and support\nfor monkey-patching ``pip.main`` via a known-dangerous method.\n\n``pip.main()`` has never been a publicly supported API for ``pip``, but it has\noften been used as such. This tiny package is meant to cover the gap and ease\npeople's transitions to new usage.\n\nDrop-in Replacement for pip.main\n--------------------------------\n\nThis usage is *always guaranteed to work* on any supported python version with\nany functioning version of ``pip``.\n\nInstead of ``pip.main(...)``, use this method instead::\n\n import callable_pip\n callable_pip.main('install', '--upgrade', 'setuptools')\n\nIf you are writing a python program, you can just use ``callable_pip.main()``\nyourself. This is the only guaranteed-safe usage.\n\nPatching pip.main\n-----------------\n\n``callable-pip`` provides a patch which adds ``pip.main()`` back to ``pip``,\nbut which is dangerous and known not to work on some versions of ``pip``::\n\n import callable_pip\n callable_pip.dangerous_patch()\n ...\n import pip\n pip.main('--version') # actually invokes callable_pip.main()\n\nIf you have dependencies which use ``pip.main``, you can call\n``callable_pip.dangerous_patch()`` yourself and it will *usually* work.\n\n``dangerous_patch`` is so-named because it is *not* guaranteed to work on all\n``pip`` versions and it is dangerous. Avoid it when possible.\n\nPatching Without Control of Source\n----------------------------------\n\nYou may be a consumer of packages which use ``pip.main()`` in a context where\nyou cannot modify or do not own any of the source.\nThese techniques may help you.\n\nMore details on ``sitecustomize.py`` and ``.pth`` files can be found in the\nPython documentation:\nhttps://docs.python.org/3/library/site.html\n\nRemember to remove these patches if you uninstall ``callable_pip``, or Python\nwill fail to start.\n\nApplying the Patch With sitecustomize.py\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n``sitecustomize.py`` can exist anywhere in the ``PYTHONPATH``, including the\ndirectory where python is invoked.\n\nAdd a ``sitecustomize.py`` with the following content, or append it to an\nexisting ``sitecustomize.py``::\n\n import callable_pip\n callable_pip.dangerous_patch()\n\nApplying the Patch With a .pth File\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe ``.pth`` file can have any name you want, but must be installed in the\n``site-packages`` directory. It may therefore require root or other elevated\nprivileges to add.\n\nAdd a file, e.g. ``callable_pip.pth``, with the following content::\n\n import callable_pip; callable_pip.dangerous_patch()\n\nDocumentation\n=============\n\nAll documentation is in this readme doc.\n\nBug and Issue Reports\n=====================\n\nSubmit all bug reports and issues here:\nhttps://github.com/sirosen/callable-pip/issues", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sirosen/callable-pip", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "callable-pip", "package_url": "https://pypi.org/project/callable-pip/", "platform": "", "project_url": "https://pypi.org/project/callable-pip/", "project_urls": { "Homepage": "https://github.com/sirosen/callable-pip" }, "release_url": "https://pypi.org/project/callable-pip/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "callable-pip patches over the wide use of pip.main()", "version": "1.0.0" }, "last_serial": 3734770, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "366b3ba1f60677e376bff3bc62e7fce2", "sha256": "40359df750ba38003b459583ec57d6e435289f638078751f54113a757d826e4c" }, "downloads": -1, "filename": "callable_pip-0.1.0-py2.7.egg", "has_sig": false, "md5_digest": "366b3ba1f60677e376bff3bc62e7fce2", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 3728, "upload_time": "2018-04-04T15:11:32", "url": "https://files.pythonhosted.org/packages/f3/14/c3186de7158bd025b1a3b19429aa127d6630e0c180babb01589dac79dec5/callable_pip-0.1.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "58209d2f36a6046dc5faeefd3b36812c", "sha256": "12de20027e6a0a67fc952c1a8b2e11d7bda2783e76795581ccd164dcd38fcfd1" }, "downloads": -1, "filename": "callable-pip-0.1.0.tar.gz", "has_sig": false, "md5_digest": "58209d2f36a6046dc5faeefd3b36812c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3081, "upload_time": "2018-04-04T15:11:31", "url": "https://files.pythonhosted.org/packages/e6/a5/40a751e97ffe7a642238327c3446d47c7822b006cc969d89aed1fa5b3ade/callable-pip-0.1.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "e23c92c2118d38bbc68d5c4a523e86c5", "sha256": "11f744e8d82e19facfebc87d3bd578493e57f00882c76621cf05198aaf71242d" }, "downloads": -1, "filename": "callable_pip-1.0.0-py2.7.egg", "has_sig": false, "md5_digest": "e23c92c2118d38bbc68d5c4a523e86c5", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 4010, "upload_time": "2018-04-04T18:01:29", "url": "https://files.pythonhosted.org/packages/77/d5/54b1cb55f4c58d3d38bc8bda16dae3d88c6ca86afd064c3b3f1d9a096163/callable_pip-1.0.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "31c2b1d86fcb1129d17e0e90380532a7", "sha256": "0a549d157c9eed81599f0ff19c4981f23d6814902d9ce68408b042178b2a5d3c" }, "downloads": -1, "filename": "callable-pip-1.0.0.tar.gz", "has_sig": false, "md5_digest": "31c2b1d86fcb1129d17e0e90380532a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3321, "upload_time": "2018-04-04T18:01:28", "url": "https://files.pythonhosted.org/packages/30/57/e003fd728effa09035ac32c5a526267e5c15abcfd58d1b86c2096279abcf/callable-pip-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e23c92c2118d38bbc68d5c4a523e86c5", "sha256": "11f744e8d82e19facfebc87d3bd578493e57f00882c76621cf05198aaf71242d" }, "downloads": -1, "filename": "callable_pip-1.0.0-py2.7.egg", "has_sig": false, "md5_digest": "e23c92c2118d38bbc68d5c4a523e86c5", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 4010, "upload_time": "2018-04-04T18:01:29", "url": "https://files.pythonhosted.org/packages/77/d5/54b1cb55f4c58d3d38bc8bda16dae3d88c6ca86afd064c3b3f1d9a096163/callable_pip-1.0.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "31c2b1d86fcb1129d17e0e90380532a7", "sha256": "0a549d157c9eed81599f0ff19c4981f23d6814902d9ce68408b042178b2a5d3c" }, "downloads": -1, "filename": "callable-pip-1.0.0.tar.gz", "has_sig": false, "md5_digest": "31c2b1d86fcb1129d17e0e90380532a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3321, "upload_time": "2018-04-04T18:01:28", "url": "https://files.pythonhosted.org/packages/30/57/e003fd728effa09035ac32c5a526267e5c15abcfd58d1b86c2096279abcf/callable-pip-1.0.0.tar.gz" } ] }