Add custom source suffix and HTTP Headers for custom urls with authentication support via env var interpolation#63
Conversation
…olation for authentication to custom URLs
There was a problem hiding this comment.
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.
I think we need to split first on #, and then look for known extension
There was a problem hiding this comment.
Makes sense, please feel free to edit if you are available
There was a problem hiding this comment.
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