Where can I find URLs for python packages as homebrew resources (dependencies)

Viewed 69

I would like homebrew to install several python modules (shutil, numpy, pyevtk) as dependencies on a homebrew formulae I have built. The only documentation I can find says that the jrnl formula is a great example. Indeed jrnl does list the correct syntax for your homebrew formula file to list python modules as dependencies. EX:

resource "numpy" do
    url "https://files.pythonhosted.org/packages/84/1e/ff467ac56bfeaea51d4a2e72d315c1fe440b20192fea7e460f0f248acac8/numpy-1.18.2.zip"    
    sha256 "e7894793e6e8540dbeac77c87b489e331947813511108ae097f1715c018b8f3d"
  end

I was able to find the url and sha356 for numpy by searching github for "resource "numpy" do", but no luck for pyevtk. Where can I find a list of url's where other packages can be sourced by homebrew in a similar fashion?

As always, any help is greatly appreciated!

1 Answers

Pypi provides an API described here.

You can request a description for the pyevtk module on:

https://pypi.org/pypi/pyevtk/json

To get a description for a specific release:

https://pypi.org/pypi/pyevtk/1.1.1/json

You then have the URL on pythonhosted.org

 "1.1.1": [
      {
        "comment_text": "",
        "digests": {
          "md5": "a94bba98e655082b3244dc52fd32bfaa",
          "sha256": "0bd02406fe15fc34f6b0d34048e6531be004530ff3b63085d60ece66bc9bb376"
        },
        "downloads": -1,
        "filename": "pyevtk-1.1.1-py3-none-any.whl",
        "has_sig": false,
        "md5_digest": "a94bba98e655082b3244dc52fd32bfaa",
        "packagetype": "bdist_wheel",
        "python_version": "py3",
        "requires_python": null,
        "size": 15887,
        "upload_time": "2019-02-02T11:35:04",
        "upload_time_iso_8601": "2019-02-02T11:35:04.962515Z",
        "url": "https://files.pythonhosted.org/packages/bb/0e/88c4895e436d32493e4dc4648201ed77cd35019c64b29e125b68c415b62f/pyevtk-1.1.1-py3-none-any.whl",
        "yanked": false,
        "yanked_reason": null
      }
    ]

which can be used with Homebrew.

Related