Skip to content

Commit 644c9f3

Browse files
authored
Merge pull request #177 from kmcquade/feat/homebrew
Homebrew installation support
2 parents 35b5525 + 073ceee commit 644c9f3

File tree

5 files changed

+115
-2
lines changed

5 files changed

+115
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
## Future release (Unreleased)
33
* Add conditions support
44

5+
## 0.8.0.6 (Unreleased)
6+
* Homebrew support
7+
58
## 0.8.0.5 (2020-04-23)
69
* Adjusted logging level to some functions to reduce noise when leveraging as a library.
710

HomebrewFormula/policy_sentry.rb

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
class PolicySentry < Formula
2+
include Language::Python::Virtualenv
3+
4+
desc "Shiny new formula"
5+
homepage "https://github.com/salesforce/policy_sentry"
6+
url "https://files.pythonhosted.org/packages/1d/26/d461385d60da16e828c8397c06f414e6d2b410c7ff70d71247c625cefdd9/policy_sentry-0.8.0.5.tar.gz"
7+
sha256 "d43229e14ed659d433c119e1deedd1caad9d744474de333cb4b5ff6664baca02"
8+
9+
depends_on "python3"
10+
11+
resource "beautifulsoup4" do
12+
url "https://files.pythonhosted.org/packages/3b/e4/7cfc641f11e0eef60123912611a5c9ee7d4638da7325878b695b9ae4bb6f/beautifulsoup4-4.9.0.tar.gz"
13+
sha256 "594ca51a10d2b3443cbac41214e12dbb2a1cd57e1a7344659849e2e20ba6a8d8"
14+
end
15+
16+
resource "certifi" do
17+
url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz"
18+
sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519"
19+
end
20+
21+
resource "chardet" do
22+
url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz"
23+
sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"
24+
end
25+
26+
resource "click" do
27+
url "https://files.pythonhosted.org/packages/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz"
28+
sha256 "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a"
29+
end
30+
31+
resource "click-log" do
32+
url "https://files.pythonhosted.org/packages/22/44/3d73579b547f0790a2723728088c96189c8b52bd2ee3c3de8040efc3c1b8/click-log-0.3.2.tar.gz"
33+
sha256 "16fd1ca3fc6b16c98cea63acf1ab474ea8e676849dc669d86afafb0ed7003124"
34+
end
35+
36+
resource "contextlib2" do
37+
url "https://files.pythonhosted.org/packages/02/54/669207eb72e3d8ae8b38aa1f0703ee87a0e9f88f30d3c0a47bebdb6de242/contextlib2-0.6.0.post1.tar.gz"
38+
sha256 "01f490098c18b19d2bd5bb5dc445b2054d2fa97f09a4280ba2c5f3c394c8162e"
39+
end
40+
41+
resource "idna" do
42+
url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz"
43+
sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb"
44+
end
45+
46+
resource "PyYAML" do
47+
url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz"
48+
sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d"
49+
end
50+
51+
resource "requests" do
52+
url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz"
53+
sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6"
54+
end
55+
56+
resource "schema" do
57+
url "https://files.pythonhosted.org/packages/0d/de/84afc54d41aea9787c6d8814391a2d296a8240eef5b59d11704a82d82064/schema-0.7.2.tar.gz"
58+
sha256 "b536f2375b49fdf56f36279addae98bd86a8afbd58b3c32ce363c464bed5fc1c"
59+
end
60+
61+
resource "soupsieve" do
62+
url "https://files.pythonhosted.org/packages/15/53/3692c565aea19f7d9dd696fee3d0062782e9ad5bf9535267180511a15967/soupsieve-2.0.tar.gz"
63+
sha256 "e914534802d7ffd233242b785229d5ba0766a7f487385e3f714446a07bf540ae"
64+
end
65+
66+
resource "urllib3" do
67+
url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz"
68+
sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527"
69+
end
70+
71+
def install
72+
virtualenv_create(libexec, "python3")
73+
virtualenv_install_with_resources
74+
end
75+
76+
test do
77+
false
78+
end
79+
end

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,15 @@ Policy Sentry aggregates all of that documentation into a single database and us
9595

9696
To get started, install Policy Sentry:
9797

98+
* Homebrew
99+
100+
```bash
101+
brew tap salesforce/policy_sentry https://github.com/salesforce/policy_sentry
102+
brew install policy_sentry
103+
```
104+
105+
* Pip
106+
98107
```bash
99108
pip3 install --user policy_sentry
100109
```
@@ -228,7 +237,14 @@ This rapidly speeds up the time to develop IAM policies, and ensures that all po
228237

229238
#### Installation
230239

231-
* Policy Sentry is available via pip. To install, run:
240+
* Homebrew
241+
242+
```bash
243+
brew tap salesforce/policy_sentry https://github.com/salesforce/policy_sentry
244+
brew install policy_sentry
245+
```
246+
247+
* Pip
232248

233249
```bash
234250
pip3 install --user policy_sentry

docs/user-guide/installation/index.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
Installation
22
--------------
33

4-
* ``policy_sentry`` is available via pip (Python 3 only). To install, run:
4+
* Homebrew
5+
6+
.. code-block:: bash
7+
brew tap salesforce/policy_sentry https://github.com/salesforce/policy_sentry
8+
brew install policy_sentry
9+
10+
11+
* pip (Python 3 only)
512

613
.. code-block:: bash
714

utils/update-brew.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
set -x
3+
pipenv install --dev
4+
pipenv run invoke build.build-package
5+
pipenv uninstall --all
6+
pipenv run pip install homebrew-pypi-poet
7+
pipenv run pip install policy_sentry -U
8+
pipenv run poet -f policy_sentry > HomebrewFormula/policy_sentry.rb

0 commit comments

Comments
 (0)