Skip to content

Feature request: Installing package from Zip archive #106

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

Closed
amotl opened this issue Feb 16, 2025 · 2 comments
Closed

Feature request: Installing package from Zip archive #106

amotl opened this issue Feb 16, 2025 · 2 comments

Comments

@amotl
Copy link

amotl commented Feb 16, 2025

Dear @jwodder,

we absolutely love your versioningit package, and use it across the board. Thanks a stack for conceiving and maintaining it, with kudos to the community.

Of course it is in the nature of versioningit that it needs a Git installation. Still, it occasionally bothers us, now at crate/sqlalchemy-cratedb#202, that we can't provide preview installation links that reach out to the Zip archive per branch, as provided by GitHub, for example. In this case, we'd like to make the ingredients of the sslmode branch available to downstream users.

uv pip install 'sqlalchemy-cratedb @ https://github.com/crate/sqlalchemy-cratedb/archive/refs/heads/sslmode.zip'

Of course, using the canonical "install from Git" incantation, it works well. However, many people do not use Git, and it is also not installed by default in many Docker builds.

uv pip install 'sqlalchemy-cratedb @ git+https://github.com/crate/sqlalchemy-cratedb@sslmode'

Do you see any chance to improve the situation in our particular use case / scenario?

With kind regards,
Andreas.

@jwodder
Copy link
Owner

jwodder commented Feb 16, 2025

@amotl Assuming these Zip archives expand $Format:PLACEHOLDER$ placeholders on creation, you should be able to switch to the "git-archive" VCS method to embed certain Git versioning details in your package that versioningit can use.

@amotl
Copy link
Author

amotl commented Feb 16, 2025

Hi. Thanks a stack for your quick response. It is right on the spot, your proposed solution works well from the start.

$ uv pip install 'sqlalchemy-cratedb @ https://github.com/crate/sqlalchemy-cratedb/archive/refs/heads/versioningit-git-archive.zip'
Resolved 9 packages in 1.54s
   Built sqlalchemy-cratedb @ https://github.com/crate/sqlalchemy-cratedb/archive/refs/heads/versioningit-git-archive.zip
Prepared 1 package in 1.47s
Uninstalled 1 package in 6ms
Installed 1 package in 2ms
 - sqlalchemy-cratedb==0.41.0.post3+g75585c8 (from git+https://github.com/crate/sqlalchemy-cratedb@75585c8c8e705a121b22791f4e4c21c42017b8f5)
 + sqlalchemy-cratedb==0.41.0.post3+gb4f0542f (from https://github.com/crate/sqlalchemy-cratedb/archive/refs/heads/versioningit-git-archive.zip)

@amotl amotl closed this as completed Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants