![]() Usage: poet | -formula package | -resources package] (d) $ pip install datasette homebrew-pypi-poet You install that in a fresh virtual environment with the module you are packaging: $ cd /tmp Then I used the homebrew-pypi-poet tool to construct the rest of the resource blocks for me. They all need to be available as sdist packages - I made sure all of my dependencies had an sdist on PyPI. I got these for Datasette by publishing a sdist package to PyPI and then clicking the "View hashes" button next to the source release.Įvery dependency needs to be listed as a resource. def install virtualenv_install_with_resources end test do system bin/ "datasette", "-help" end endįor the initial block you need the URL to a source distribution and the sha256 code for it. The first working version of the datasette.rb formula can be seen here: Ĭlass Datasette < Formula include Language:: Python:: Virtualenv desc "An open source multi-tool for exploring and publishing data" homepage "" url "" version "0.46" sha256 "eb5e5dcb8a0957ed1def841108576afb15a38ce61d222bf54a25d827999ad521" depends_on resource "aiofiles" do url "" sha256 "98e6bcfd1b50f97db4980e182ddd509b7cc35909e903a8fe50d8849e02d815af" end #. This contains your formulas, which are Ruby. is the repo that gets tapped when someone runs brew tap simonw/datasette. Creating a tap is as simple as creating a GitHub repository with the homebrew- prefix. Homebrew taps are just naming conventions. The Python for Formula Authors documentation provides useful background. Or you could skip the tap step and run this: brew install simonw/datasette/datasette ![]() ![]() Prior to being accepted, you needed to install it from my own Homebrew tap like this: brew tap simonw/datasette My package was accepted into Homebrew core, which means you can now install it like this: brew install datasette I finally figured out how to package Datasette for installation with Homebrew. ![]() Simon Willison’s TILs Packaging a Python CLI tool for Homebrew Packaging a Python CLI tool for Homebrew | Simon Willison’s TILs ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |