{ "info": { "author": "Thane Thomson", "author_email": "connect@thanethomson.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: MacOS", "Operating System :: POSIX", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Utilities" ], "description": "python-brewer\n=============\n\nOverview\n--------\n\n``python-brewer`` is a command-line utility (written in Python) to help\nwith generating formula templates for `Homebrew `__ from\ninstalled Python packages. The aim is not to generate perfect,\nready-to-go Homebrew formulae out of the box: the aim is to generate a\n**template** for you, taking some of the harder slog work out of the\nprocess.\n\nPrimarily, it takes an installed package, finds all of its installed\ndependencies, and generates a template containing ``resource``\nreferences to all of these dependencies (as per the installed versions).\nIt also automatically computes the SHA256 hashes of all of the packages\nby downloading their source distributions from PyPI.\n\nSee Homebrew's `Python for Formula\nAuthors `__\nguide for more details on submitting Python-based formulae for Homebrew.\n\nRequirements\n------------\n\nIn order to install ``python-brewer``, you will need:\n\n- Python 2.7+ or Python 3.5+\n- ``pip``\n\nInstallation\n------------\n\nInstalling via PyPI (install into a virtual environment please):\n\n.. code:: bash\n\n > pip install python-brewer\n\nBasic Usage\n-----------\n\nAs a simple example, we'll generate a base template for\n`Statik `__ - the static web site generator. The\nfirst step is to install the package into your virtual environment:\n\n.. code:: bash\n\n > pip install -U statik\n\nThe next step is to use the ``pybrew`` command, provided by\n``python-brewer``, to generate the Homebrew formula template. In this\ncase, at the time of this writing, I was generating the formula for\n``v0.14.2`` of **Statik**.\n\n.. code:: bash\n\n > pybrew \\\n # The name of the formula\n -n \"Statik\" \\\n # A description for the formula\n -d \"Python-based, generic static web site generator aimed at developers\" \\\n # Project homepage\n -H https://getstatik.com \\\n # HEAD of Git repo\n -g https://github.com/thanethomson/statik.git \\\n # Latest release of the package\n -r https://github.com/thanethomson/statik/archive/v0.14.2.tar.gz \\\n # Name of the Python package\n statik \\\n # Output file to which to write the template\n statik.rb\n\nAt the time of this writing, the following file was generated by\n``pybrew``:\n\n.. code:: ruby\n\n class Statik < Formula\n include Language::Python::Virtualenv\n\n desc \"Python-based, generic static web site generator aimed at developers\"\n homepage \"https://getstatik.com\"\n url \"https://github.com/thanethomson/statik/archive/v0.14.2.tar.gz\"\n sha256 \"ef2e67ecf8a1a59b71b5c88b86c7335e32cc480d3156716c3b2e7691edab7620\"\n head \"https://github.com/thanethomson/statik.git\"\n\n # TODO: If you're submitting an existing package, make sure you include your\n # bottle block here.\n\n depends_on :python if MacOS.version <= :snow_leopard\n\n resource \"future\" do\n url \"https://pypi.python.org/packages/00/2b/8d082ddfed935f3608cc61140df6dcbf0edea1bc3ab52fb6c29ae3e81e85/future-0.16.0.tar.gz\"\n sha256 \"e39ced1ab767b5936646cedba8bcce582398233d6a627067d4c6a454c90cfedb\"\n end\n\n resource \"tornado\" do\n url \"https://pypi.python.org/packages/1e/7c/ea047f7bbd1ff22a7f69fe55e7561040e3e54d6f31da6267ef9748321f98/tornado-4.4.2.tar.gz\"\n sha256 \"2898f992f898cd41eeb8d53b6df75495f2f423b6672890aadaf196ea1448edcc\"\n end\n\n resource \"argh\" do\n url \"https://pypi.python.org/packages/e3/75/1183b5d1663a66aebb2c184e0398724b624cecd4f4b679cb6e25de97ed15/argh-0.26.2.tar.gz\"\n sha256 \"e9535b8c84dc9571a48999094fda7f33e63c3f1b74f3e5f3ac0105a58405bb65\"\n end\n\n resource \"pathtools\" do\n url \"https://pypi.python.org/packages/e7/7f/470d6fcdf23f9f3518f6b0b76be9df16dcc8630ad409947f8be2eb0ed13a/pathtools-0.1.2.tar.gz\"\n sha256 \"7c35c5421a39bb82e58018febd90e3b6e5db34c5443aaaf742b3f33d4655f1c0\"\n end\n\n resource \"PyYAML\" do\n url \"https://pypi.python.org/packages/4a/85/db5a2df477072b2902b0eb892feb37d88ac635d36245a72a6a69b23b383a/PyYAML-3.12.tar.gz\"\n sha256 \"592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab\"\n end\n\n resource \"watchdog\" do\n url \"https://pypi.python.org/packages/54/7d/c7c0ad1e32b9f132075967fc353a244eb2b375a3d2f5b0ce612fd96e107e/watchdog-0.8.3.tar.gz\"\n sha256 \"7e65882adb7746039b6f3876ee174952f8eaaa34491ba34333ddf1fe35de4162\"\n end\n\n resource \"httpwatcher\" do\n url \"https://pypi.python.org/packages/02/97/055185c6a54e470ef943556b613bc56975e82da3f456bdd08f036cf7cae8/httpwatcher-0.4.0.tar.gz\"\n sha256 \"2f84c93a3766a11a69f2d339f143889558bd5eccee77574593c39111a3202645\"\n end\n\n resource \"MarkupSafe\" do\n url \"https://pypi.python.org/packages/c0/41/bae1254e0396c0cc8cf1751cb7d9afc90a602353695af5952530482c963f/MarkupSafe-0.23.tar.gz\"\n sha256 \"a4ec1aff59b95a14b45eb2e23761a0179e98319da5a7eb76b56ea8cdc7b871c3\"\n end\n\n resource \"jinja2\" do\n url \"https://pypi.python.org/packages/f4/3f/28387a5bbc6883082c16784c6135440b94f9d5938fb156ff579798e18eda/Jinja2-2.9.4.tar.gz\"\n sha256 \"aab8d8ca9f45624f1e77f2844bf3c144d180e97da8824c2a6d7552ad039b5442\"\n end\n\n resource \"lipsum\" do\n url \"https://pypi.python.org/packages/59/97/00636d64bc77dc173d782995de1b56dde39c70bb97112964452709b4d9aa/lipsum-0.1.2.tar.gz\"\n sha256 \"ba5f46cef19104c07f889b14486a3772845fc25afa1eb5e2eee1f2d9badcb8ab\"\n end\n\n resource \"markdown\" do\n url \"https://pypi.python.org/packages/d4/32/642bd580c577af37b00a1eb59b0eaa996f2d11dfe394f3dd0c7a8a2de81a/Markdown-2.6.7.tar.gz\"\n sha256 \"daebf24846efa7ff269cfde8c41a48bb2303920c7b2c7c5e04fa82e6282d05c0\"\n end\n\n resource \"Unidecode\" do\n url \"https://pypi.python.org/packages/ba/64/410af95d27f2a8824112d17ed41ea7ce6d2cbc8a4832c2e548d3408fad0a/Unidecode-0.04.20.tar.gz\"\n sha256 \"ed4418b4b1b190487753f1cca6299e8076079258647284414e6d607d1f8a00e0\"\n end\n\n resource \"python-slugify\" do\n url \"https://pypi.python.org/packages/63/86/ecf7b570089d794a9476c7411a06a329eb8e386f3407576640ccbe7a4698/python-slugify-1.2.1.tar.gz\"\n sha256 \"501182ec738cc8b743ae5c76c183f4427187ef016257f062b3fa594f60916e34\"\n end\n\n resource \"six\" do\n url \"https://pypi.python.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz\"\n sha256 \"105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a\"\n end\n\n resource \"SQLAlchemy\" do\n url \"https://pypi.python.org/packages/da/04/8048a5075d6e29235bbd6f1ea092a38dbe2630c670e73d4aa923a4e5521c/SQLAlchemy-1.1.5.tar.gz\"\n sha256 \"68fb40049690e567ebda7b270176f5abf0d53d9fbd515fec4e43326f601119b6\"\n end\n\n def install\n virtualenv_install_with_resources\n end\n\n # TODO: Add your package's tests here\n end\n\nOf course, I've since added the original ``bottle`` block for the script\nand the package's unit tests. See `this\ncommit `__\nand\n`statik.rb `__\nin ``homebrew-core`` for more details.\n\nPython 2 or 3?\n--------------\n\nWhile ``python-brewer`` runs well on Python 2.7+ and Python 3.5+, it's\nimportant to note that sometimes your dependencies will be different\nbased on which Python version you're running, and based on the nature of\nyour dependencies. Sometimes, certain packages include different\ndependencies when running Python 3, e.g.\n`Tornado `__.\n\nAs such, ``python-brewer`` automatically changes the Python dependency\nbased on the detected Python version. In the above package for\n**Statik**, I ran ``pybrew`` with Python 2 and, as such, automatically\nadded the line:\n\n.. code:: ruby\n\n depends_on :python if MacOS.version <= :snow_leopard\n\nIf I had run it with Python 3, it would have added the following line\ninstead:\n\n.. code:: ruby\n\n depends_on :python3\n\nThis will, of course, cause Homebrew to attempt to install its own\nPython 3 distribution for your package.\n\nContributing\n------------\n\nPlease feel free to contribute! If you want to add or fix something in\n``python-brewer``, please:\n\n1. Fork the project\n2. Make your changes in a feature branch\n3. Submit a pull request\n\nLicense\n-------\n\n**The MIT License (MIT)**\n\nCopyright (c) 2017 Thane Thomson\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\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/thanethomson/python-brewer", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "python-brewer", "package_url": "https://pypi.org/project/python-brewer/", "platform": "", "project_url": "https://pypi.org/project/python-brewer/", "project_urls": { "Homepage": "https://github.com/thanethomson/python-brewer" }, "release_url": "https://pypi.org/project/python-brewer/0.3.0/", "requires_dist": [ "future (>=0.16.0)", "html5lib (>=1.0b8)", "pip (>=9.0.1)", "pipdeptree (>=0.9.0)", "requests (>=2.12.5)", "six (>=1.10.0)" ], "requires_python": "", "summary": "A Homebrew formula template generator for Python packages", "version": "0.3.0" }, "last_serial": 4532595, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "b751d95a64ea51aa8e9138c848849fd2", "sha256": "4aa53e1da9881816e75953f8a79a3443a9977809dee1fa1d52dbd34f75e1e50b" }, "downloads": -1, "filename": "python_brewer-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b751d95a64ea51aa8e9138c848849fd2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18201, "upload_time": "2017-01-23T19:32:56", "url": "https://files.pythonhosted.org/packages/55/a6/f09f035bb04ac27f834472bc5e085a374d73dceee39810c3718ef288d2ab/python_brewer-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e4e527a873f5570139ba2dd85d2cca5c", "sha256": "e5e3d70f5deccb5125d36abbabe79df69478d8f2e11b5240aca6b95f4189b613" }, "downloads": -1, "filename": "python-brewer-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e4e527a873f5570139ba2dd85d2cca5c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13034, "upload_time": "2017-01-23T19:32:58", "url": "https://files.pythonhosted.org/packages/3a/6f/19730b3d19979336031f23f1188e852fe9abfc49f63b8116e893ca384e39/python-brewer-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "2655880663dc4cd38aeb7d3487289784", "sha256": "2fd5d2db8a4e4c89678dd932cbaab1faf255aadc20190c9ecaf882b82b6723f1" }, "downloads": -1, "filename": "python_brewer-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2655880663dc4cd38aeb7d3487289784", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18713, "upload_time": "2017-01-24T07:46:20", "url": "https://files.pythonhosted.org/packages/bf/23/2eb6d3bc98bad9f80ccde54f3b028045cc793677abe8d6313652a3d7bb7b/python_brewer-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ad08af71c4d6b8a693c16493235007c1", "sha256": "8effa4d7ad85e94fd07b7b4456f41cac5829045bda0999076c69a0e00915ab64" }, "downloads": -1, "filename": "python-brewer-0.2.0.tar.gz", "has_sig": false, "md5_digest": "ad08af71c4d6b8a693c16493235007c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14235, "upload_time": "2017-01-24T07:46:22", "url": "https://files.pythonhosted.org/packages/9c/92/d90157e877581dc7baeaca5febb800d36ff667f3f48876551cadd6dd18dd/python-brewer-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "6a4487fd1e1fdf84d1ca9f4425371b1a", "sha256": "563dfca520ebc04dae9a01e5a6dfa17f1d795d5fc1dcb48260939a4eaddbc3f4" }, "downloads": -1, "filename": "python_brewer-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6a4487fd1e1fdf84d1ca9f4425371b1a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13191, "upload_time": "2018-11-27T04:57:02", "url": "https://files.pythonhosted.org/packages/10/29/18ac7460e2adcd20e4ab1c3d3d6436ddb621779dbb54949d04b430729f9c/python_brewer-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0be28d737ba0789288612d518f5bce25", "sha256": "957eab975f965ff6b9efd75cb3d29ab05e2d2cb0af5a5fffa6bafad8be037022" }, "downloads": -1, "filename": "python-brewer-0.3.0.tar.gz", "has_sig": false, "md5_digest": "0be28d737ba0789288612d518f5bce25", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11045, "upload_time": "2018-11-27T04:57:05", "url": "https://files.pythonhosted.org/packages/2c/8a/ee6ffc2168fb9ad275b105fdde983b58dbe8643351471d67aed1e9654492/python-brewer-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6a4487fd1e1fdf84d1ca9f4425371b1a", "sha256": "563dfca520ebc04dae9a01e5a6dfa17f1d795d5fc1dcb48260939a4eaddbc3f4" }, "downloads": -1, "filename": "python_brewer-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6a4487fd1e1fdf84d1ca9f4425371b1a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13191, "upload_time": "2018-11-27T04:57:02", "url": "https://files.pythonhosted.org/packages/10/29/18ac7460e2adcd20e4ab1c3d3d6436ddb621779dbb54949d04b430729f9c/python_brewer-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0be28d737ba0789288612d518f5bce25", "sha256": "957eab975f965ff6b9efd75cb3d29ab05e2d2cb0af5a5fffa6bafad8be037022" }, "downloads": -1, "filename": "python-brewer-0.3.0.tar.gz", "has_sig": false, "md5_digest": "0be28d737ba0789288612d518f5bce25", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11045, "upload_time": "2018-11-27T04:57:05", "url": "https://files.pythonhosted.org/packages/2c/8a/ee6ffc2168fb9ad275b105fdde983b58dbe8643351471d67aed1e9654492/python-brewer-0.3.0.tar.gz" } ] }