-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Windows Chocolatey package #80
Conversation
Coverage Report
|
Building locally
Installing/testing locally
|
@@ -10,7 +10,7 @@ readme = "README.md" | |||
python = "^3.10" | |||
click = "^8.1.3" | |||
httpx = "^0.23.1" | |||
copier = "^7.0.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we switch to the fixed version of copier while we're waiting for copier-org/copier#890 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep
]]></description> | ||
<!-- <releaseNotes>__REPLACE_OR_REMOVE__MarkDown_Okay</releaseNotes> --> | ||
<dependencies> | ||
<dependency id="python3" version="3.10" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is interesting. It means that if you already have python installed globally then god knows what this will do (worth testing?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. Python version hell.
For me, it installed a new version and added it at the beginning of my path.
Everything still worked, but yea, that might annoy people who already have a specific version of python installed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for some chocolatey packages it will try to determine if it's already been installed manually and "take over". But doesn't seem to do this for python (fortunately?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we depend on >=3.10.0 here instead?
RefreshEnv.cmd | ||
|
||
# ensure pipx is installed | ||
python -m pip --disable-pip-version-check install --user pipx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we assume python
will work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If python has been installed successfully as a dependency, then I can't see why not? Do you think I should do a test and print a useful error message (rather than a slightly obscure "command not found" error).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand the logic here, but this makes our package not idempotent due to also requiring pipe for uninstall. Can we make pipx
a dependency instead? This would mirror our home-brew package, and pipx is actually an (optional) runtime dependency (for installing poetry if not already installed during bootstrap)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no pipx package for chocolatey.
Don't think this will work
if ($wheelFileName.count -ne 1) { | ||
Throw "Packaging error. build artifact contained $($wheelFileName.count) normally named wheel files" | ||
} | ||
if ($wheelFileName[0].Name -Match '-([0-9]+\.[0-9]+\.[0-9]+)b?([0-9]*)-') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shamelessly stolen from @daniel-makerx here
@@ -105,3 +105,12 @@ jobs: | |||
name: algokit-cli | |||
path: dist/algokit-*-py3-none-any.whl | |||
if-no-files-found: error | |||
|
|||
cd-publish-release-packages: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I gathered having a separate job (and yaml file) for packages makes sense? We could potentially publish all our packages from the publish-release-packages.yaml files (i.e. brew and chocolatey. And potentially pypi). Keeps all package publishing together and allows us to trigger them all based on a single condition.
Otherwise I'm happy to move the whole publish-release-packages.yaml here into cd.yaml
Seems the Chocolaty community repo automated tests failed due to the copier package not installing. The image they use to test installing the packages does not have git, so it couldn't use our hacky fix in pyproject.toml pointing to my github fork of copier. We'll need to wait until copier release an alpha package to pypi...
https://gist.github.com/choco-bot/f7f5353bab35c18811de2a2843516c18 |
…ation/algokit-cli into chocolatey-package
closes #79
Windows users can
choco install algokit
and get the latest production version of algokit installed to their machineTODO
.nuspec
filechocolateyinstall.ps1
to install algokit from bundled wheel file using pipxchocolateyuninstall.ps1
to remove algokit using pipxGithub actions to upload new prelease package continuous deployment (automatic based on version slash notation x.y.x-beta)choco pack
.nuspec
Project URL and documentation URLs (when known) (used https://github.com/algorandfoundation/algokit-cli) for nowchoco upgrade algokit
to upgrade to latest available versionchoco uninstall algokit
to remove algokit cli from a systemchoco install --ignoredependencies algokit
to use existing python (use at own risk)