-
Notifications
You must be signed in to change notification settings - Fork 11
Add custom source suffix and HTTP Headers for custom urls with authentication support via env var interpolation #63
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
Conversation
…olation for authentication to custom URLs
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.
To satisfy the linter, let's bump McCabe allowed complexity to 18, I'll refactor this to come back to simpler function later.
Change the setting here: https://github.com/codrsquad/portable-python/blob/main/pyproject.toml#L66 from 14 to 18
…'t end in .tar.gz or .zip, such as Github enterprise releases endpoint - Move url and header env var expansion into cfg_http_headers cfg_url functions
- Satisfy linter by eliminating temporary
Ok, fixed that, and refactored a bit, added another url fix, and added another forgotten local change of the suffix override for github release assets. |
src/portable_python/__init__.py
Outdated
basename = f"{self.m_name}-{self.version}.{suffix}" | ||
else: | ||
# Split on '#' for urls that include a checksum, such as #sha256=... fragment | ||
basename = runez.basename(self.url, extension_marker="#") |
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 we need to split first on #
, and then look for known extension
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.
Makes sense, please feel free to edit if you are available
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.
Corrected and added test to observe that a #sha256=...
doesn't fool this into thinking url has no known extension.
Thank you so much for the contrib once again!! |
Released as v1.9.9 |
This was intended to be included in #59
The use case is pretty straightforward and it is working