{"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-672088880", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 672088880, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjA4ODg4MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T16:54:06Z", "updated_at": "2020-08-11T16:54:06Z", "author_association": "OWNER", "body": "It works!\r\n```\r\n$ brew tap simonw/datasette\r\n$ brew install simonw/datasette/datasette\r\n$ datasette --version\r\ndatasette, version 0.46\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-671733187", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 671733187, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTczMzE4Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T05:25:23Z", "updated_at": "2020-08-11T05:25:23Z", "author_association": "OWNER", "body": "I got this almost working in `simonw/homebrew-datasette` - see https://github.com/simonw/homebrew-datasette/issues/2 for the last missing detail.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-671077168", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 671077168, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTA3NzE2OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T17:10:15Z", "updated_at": "2020-08-09T18:13:39Z", "author_association": "OWNER", "body": "Here's the issue that explains that warning: https://github.com/pypa/pip/issues/5599\r\n\r\nThis should fix it (risky):\r\n\r\n from pip._internal.cli.main import main", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-671076975", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 671076975, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTA3Njk3NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T17:08:34Z", "updated_at": "2020-08-09T17:09:21Z", "author_association": "OWNER", "body": "Quick prototype of `datasette install`:\r\n```diff\r\ndiff --git a/datasette/cli.py b/datasette/cli.py\r\nindex 287195a..95b6eb7 100644\r\n--- a/datasette/cli.py\r\n+++ b/datasette/cli.py\r\n@@ -231,6 +231,18 @@ def package(\r\n call(args)\r\n \r\n \r\n+@cli.command()\r\n+@click.argument(\"packages\", nargs=-1, required=True)\r\n+def install(packages):\r\n+ \"Install Python packages - e.g. Datasette plugins - into the same environment as Datasett\"\r\n+ import pip\r\n+\r\n+ try:\r\n+ pip.main([\"install\"] + list(packages))\r\n+ except SystemExit as e:\r\n+ pass\r\n+\r\n+\r\n @cli.command()\r\n @click.argument(\"files\", type=click.Path(exists=True), nargs=-1)\r\n @click.option(\r\n```\r\n\r\n```\r\n$ datasette install\r\nUsage: datasette install [OPTIONS] PACKAGES...\r\nTry 'datasette install --help' for help.\r\n\r\nError: Missing argument 'PACKAGES...'.\r\n$ datasette install datasette-vega\r\nWARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.\r\nPlease see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.\r\nTo avoid this problem you can invoke Python with '-m pip' instead of running pip directly.\r\nCollecting datasette-vega\r\n Using cached datasette_vega-0.6.2-py3-none-any.whl (1.8 MB)\r\n...\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-671005731", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 671005731, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTAwNTczMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T04:44:13Z", "updated_at": "2020-08-09T17:04:21Z", "author_association": "OWNER", "body": "Telling people how to figure out that `pip` location is going to be pretty unpleasant.\r\n\r\nHow about instead providing a `datasette plugins --install=datasette-graphql` command?\r\n\r\nOr `datasette install datasette-vega`\r\n\r\nIt would run `pip install` in the same virtualenv as Datasette itself.\r\n\r\nhttp://jelly.codes/articles/python-pip-module/ shows how to do this:\r\n\r\n```python\r\n\r\nimport pip\r\n\r\ntry:\r\n pip.main([\"install\", \"plumbum\"])\r\nexcept SystemExit as e:\r\n pass\r\n```\r\n\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-671001457", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 671001457, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTAwMTQ1Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T03:37:39Z", "updated_at": "2020-08-09T03:37:39Z", "author_association": "OWNER", "body": "Here's what happened when I installed `homebrew-vd`: https://gist.github.com/simonw/7bfd971a62743d7ca248e6b5e696c240\r\n\r\nIt worked! And from digging around, it has a virtual environment at `/usr/local/Cellar/visidata/1.5.2/libexec/`\r\n\r\nWhich means `/usr/local/Cellar/visidata/1.5.2/libexec/bin/pip` is a working `pip`\r\n\r\nAnd I tried running these commands and confirmed that I get a `datasette` with an additional plugin:\r\n\r\n```\r\n/usr/local/Cellar/visidata/1.5.2/libexec/bin/pip install datasette\r\n/usr/local/Cellar/visidata/1.5.2/libexec/bin/pip install datasette-graphql\r\n/usr/local/Cellar/visidata/1.5.2/libexec/bin/datasette plugins\r\n[\r\n {\r\n \"name\": \"datasette-graphql\",\r\n \"static\": false,\r\n \"templates\": true,\r\n \"version\": \"0.11\",\r\n \"hooks\": [\r\n \"register_routes\",\r\n \"startup\"\r\n ]\r\n }\r\n]\r\n```\r\nSo I can package Datasette as a homebrew package AND I can give people instructions for installing plugins.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-670999860", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 670999860, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MDk5OTg2MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T03:12:44Z", "updated_at": "2020-08-09T03:12:44Z", "author_association": "OWNER", "body": "How would plugin installation work if Datasette was installed via homebrew?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-670999832", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 670999832, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MDk5OTgzMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T03:12:14Z", "updated_at": "2020-08-09T03:12:14Z", "author_association": "OWNER", "body": "Another useful example: https://github.com/Homebrew/homebrew-core/blob/master/Formula/trailscraper.rb", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-404208602", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 404208602, "node_id": "MDEyOklzc3VlQ29tbWVudDQwNDIwODYwMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-07-11T15:20:12Z", "updated_at": "2018-07-11T15:20:12Z", "author_association": "OWNER", "body": "Here's a good example of a homebrew tap: https://github.com/saulpw/homebrew-vd", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-403866099", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 403866099, "node_id": "MDEyOklzc3VlQ29tbWVudDQwMzg2NjA5OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-07-10T15:32:14Z", "updated_at": "2018-07-10T15:32:14Z", "author_association": "OWNER", "body": "I can host a custom tap without needing to get anything accepted into homebrew-core: https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap\r\n\r\nSince my principle goal here is ensuring an easy installation path for people who are familiar with `brew` but don't know how to use pip and Python 3 that could be a good option.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-403863927", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 403863927, "node_id": "MDEyOklzc3VlQ29tbWVudDQwMzg2MzkyNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-07-10T15:26:27Z", "updated_at": "2018-07-10T15:29:54Z", "author_association": "OWNER", "body": "Here are some useful examples of other Python apps that have been packaged using the recipe described above: https://github.com/Homebrew/homebrew-core/search?utf8=%E2%9C%93&q=virtualenv_install_with_resources&type=", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-403865063", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 403865063, "node_id": "MDEyOklzc3VlQ29tbWVudDQwMzg2NTA2Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-07-10T15:29:32Z", "updated_at": "2018-07-10T15:29:32Z", "author_association": "OWNER", "body": "Huh... from https://docs.brew.sh/Acceptable-Formulae\r\n\r\n> We frown on authors submitting their own work unless it is very popular.\r\n\r\nMarking this one as \"help wanted\" :)", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null}