Skip to content

Commit

Permalink
poetry: depend on python-build and keyring
Browse files Browse the repository at this point in the history
  • Loading branch information
singingwolfboy committed Oct 5, 2023
1 parent e1a7081 commit 58a04d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 35 deletions.
38 changes: 4 additions & 34 deletions Formula/p/poetry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class Poetry < Formula

depends_on "cmake" => :build # for rapidfuzz
depends_on "cffi"
depends_on "keyring"
depends_on "pycparser"
depends_on "python-build"
depends_on "python-certifi"
depends_on "python-packaging"
depends_on "python@3.11"
Expand All @@ -34,11 +36,6 @@ class Poetry < Formula
sha256 "6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015"
end

resource "build" do
url "https://files.pythonhosted.org/packages/de/1c/fb62f81952f0e74c3fbf411261d1adbdd2d615c89a24b42d0fe44eb4bcf3/build-0.10.0.tar.gz"
sha256 "d5b71264afdb5951d6704482aac78de887c80691c52b88a9ad195983ca2c9269"
end

resource "cachecontrol" do
url "https://files.pythonhosted.org/packages/9e/65/3356cfc87bdee0cdf62d941235e936a26c205e4f1e1f2c85dbd952d7533a/cachecontrol-0.13.1.tar.gz"
sha256 "f012366b79d2243a6118309ce73151bf52a38d4a5dac8ea57f09bd29087e506b"
Expand Down Expand Up @@ -79,36 +76,16 @@ class Poetry < Formula
sha256 "814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"
end

resource "importlib-metadata" do
url "https://files.pythonhosted.org/packages/33/44/ae06b446b8d8263d712a211e959212083a5eda2bf36d57ca7415e03f6f36/importlib_metadata-6.8.0.tar.gz"
sha256 "dbace7892d8c0c4ac1ad096662232f831d4e64f4c4545bd53016a3e9d4654743"
end

resource "installer" do
url "https://files.pythonhosted.org/packages/05/18/ceeb4e3ab3aa54495775775b38ae42b10a92f42ce42dfa44da684289b8c8/installer-0.7.0.tar.gz"
sha256 "a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631"
end

resource "jaraco-classes" do
url "https://files.pythonhosted.org/packages/8b/de/d0a466824ce8b53c474bb29344e6d6113023eb2c3793d1c58c0908588bfa/jaraco.classes-3.3.0.tar.gz"
sha256 "c063dd08e89217cee02c8d5e5ec560f2c8ce6cdc2fcdc2e68f7b2e5547ed3621"
end

resource "jsonschema" do
url "https://files.pythonhosted.org/packages/36/3d/ca032d5ac064dff543aa13c984737795ac81abc9fb130cd2fcff17cfabc7/jsonschema-4.17.3.tar.gz"
sha256 "0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d"
end

resource "keyring" do
url "https://files.pythonhosted.org/packages/14/c5/7a2a66489c66ee29562300ddc5be63636f70b4025a74df71466e62d929b1/keyring-24.2.0.tar.gz"
sha256 "ca0746a19ec421219f4d713f848fa297a661a8a8c1504867e55bfb5e09091509"
end

resource "more-itertools" do
url "https://files.pythonhosted.org/packages/2d/73/3557e45746fcaded71125c0a1c0f87616e8258c78391f0c365bf97bbfc99/more-itertools-10.1.0.tar.gz"
sha256 "626c369fa0eb37bac0291bce8259b332fd59ac792fa5497b59837309cd5b114a"
end

resource "msgpack" do
url "https://files.pythonhosted.org/packages/dc/a1/eba11a0d4b764bc62966a565b470f8c6f38242723ba3057e9b5098678c30/msgpack-1.0.5.tar.gz"
sha256 "c075544284eadc5cddc70f4757331d99dcbc16b2bbd4849d15f8aae4cf36d31c"
Expand Down Expand Up @@ -194,19 +171,12 @@ class Poetry < Formula
sha256 "c12e7d81ffaa0605b3ac8c22c2994a8e18a9cf1c59287a1b7722a2289c952ec5"
end

resource "zipp" do
url "https://files.pythonhosted.org/packages/e2/45/f3b987ad5bf9e08095c1ebe6352238be36f25dd106fde424a160061dce6d/zipp-3.16.2.tar.gz"
sha256 "ebc15946aa78bd63458992fc81ec3b6f7b1e92d51c35e6de1c3804e73b799147"
end

def install
virtualenv_install_with_resources

site_packages = Language::Python.site_packages("python3.11")
%w[virtualenv].each do |package_name|
package = Formula[package_name].opt_libexec
(libexec/site_packages/"homebrew-#{package_name}.pth").write package/site_packages
end
paths = %w[keyring virtualenv].map { |p| Formula[p].opt_libexec/site_packages }
(libexec/site_packages/"homebrew-deps.pth").write paths.join("\n")

generate_completions_from_executable(bin/"poetry", "completions")
end
Expand Down
4 changes: 3 additions & 1 deletion pypi_formula_mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,9 @@
"exclude_packages": ["PyYAML"]
},
"poetry": {
"exclude_packages": ["certifi", "cffi", "packaging", "pycparser", "six", "virtualenv"]
"exclude_packages": [
"build", "certifi", "cffi", "keyring", "packaging", "pycparser", "six", "virtualenv"
]
},
"pre-commit": {
"exclude_packages": ["PyYAML", "virtualenv"]
Expand Down

0 comments on commit 58a04d1

Please sign in to comment.