Skip to content

Commit

Permalink
chore: Add pre-commit as dependency (#85)
Browse files Browse the repository at this point in the history
Fixes - #80

Resolution

* Move pre-commit to being a required dependency. This should force the
pip installation to pull that package down
* Updating the homebrew formula creation script to filter out packages
that are needed for pip but not the homebrew formula
* Updating lock file to reflect pre-commit being moved to a dependency

---------

Co-authored-by: Raul Centeno <raul.centeno@slalom.com>
  • Loading branch information
centenor and Raul Centeno committed Apr 28, 2023
1 parent a3f8bde commit 41bcd3c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
18 changes: 9 additions & 9 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pydantic = "^1.10.2"
jinja2 = "^3.1.2"
pathspec = "^0.10.1"
cfgv = "^3.3.1"
pre-commit = "^2.20.0"

[tool.pytest.ini_options]
addopts = "-p no:cacheprovider"
Expand All @@ -40,7 +41,6 @@ black = "^22.10.0"
identify = "^2.5.7"
poethepoet = "^0.16.4"
python-semantic-release = "^7.33.1"
pre-commit = "^2.20.0"

[build-system]
requires = ["poetry-core"]
Expand Down
18 changes: 15 additions & 3 deletions scripts/get-secureli-dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,21 @@
secureliPackageUrl = f"https://github.com/slalombuild/secureli/releases/download/v{secureliVersion}/secureli-{secureliVersion}.tar.gz"
secureliPackageDependencies = []
secureliFormulaPath = "./homebrew-secureli/Formula"
# Poetry does not do a good job of filtering out package sub-dependencies
# As a result, we need to filter out the packages ourself that the Secureli Formula does not need
packagesToRemoveFromFormula = ["colorama", "six", "shellingham"]
# Filter out additional packages that are needed for the pip package, but not the homebrew formula
packagesToRemoveFromFormula = [
"colorama",
"six",
"shellingham",
"distlib",
"filelock",
"identify",
"nodeenv",
"platformdirs",
"setuptools",
"virtualenv",
"cfgv",
"pre-commit",
]

secureliPackageNamesCmd = "poetry show --only main | awk '{print $1}'"
secureliPackageVersionsCmd = "poetry show --only main | awk '{print $2}'"
Expand Down

0 comments on commit 41bcd3c

Please sign in to comment.