A git powered package manager built on top of submodules.
Project description
gitpkg
A git powered package manager built on top of submodules.
Install
The recommended way to install git-pkg is via pipx:
$ pipx install gitpkg
Usage
The first thing you need to do to make your project work with git pkg is add a destination. A destination is a place where your packages will be installed into, you can have multiple of these.
Install a destination by using:
$ git pkg dest add addons
The directory does not have to exist, it will be automatically generated.
Next we need to install packages lets do so by:
$ git pkg add https://github.com/coppolaemilio/dialogic
But wait! While we now have an addons/dialogic directory, the thing we actually wanted there is now at addons/dialogic/addons/dialogic
Many projects, in this case Godot projects have the thing that is important to us in a subdirectory, to have this subdirectory in the desired location we have to define it as the package root by:
# You can just re-run this it will reconfigurate the package
$ git pkg add https://github.com/coppolaemilio/dialogic --package-root addons/dialogic
# OR: short hand
$ git pkg add https://github.com/coppolaemilio/dialogic -r addons/dialogic
Nice! But what do I do if the repository name and the directory I want is different?
Lets look at the next example:
$ git pkg add https://github.com/viniciusgerevini/godot-aseprite-wizard.git -r addons/AsepriteWizard
While this again will add addons/godot-aseprite-wizard we want the directory name to be AsepriteWizard we can do this by:
$ git pkg add https://github.com/viniciusgerevini/godot-aseprite-wizard.git -r addons/AsepriteWizard --name AsepriteWizard
# OR:
$ git pkg add https://github.com/viniciusgerevini/godot-aseprite-wizard.git --package-root-with-name addons/AsepriteWizard
# OR: actual shorthand
$ git pkg add https://github.com/viniciusgerevini/godot-aseprite-wizard.git -rn addons/AsepriteWizard
Oh no! Now we have addons/godot-aseprite-wizard and addons/AsepriteWizard... why? Names are essential for identifying projects so this can not be updated, we just have to remove the unwanted package now:
$ git pkg remove godot-aseprite-wizard
Nice! Now we can finally get back to work!
A few days later...
It looks like the packages received some updates! To update all installed packages simply run:
$ git pkg update
# You can also update singular packages by providing their names
$ git pkg update dialogic AsepriteWizard
Since this is powered by git submodules, you have to commit the update.
Motivation
Managing other git repositories as dependencies is essentially a very good idea but git submodules are a pain to work with so there came the idea of having a simpler approach that feels more like using something like npm, composer etc.
I mostly wrote this to use this in Godot projects to manage the addons I install but quickly realized this can be used for a lot of programming languages where package managers are not an option.
This is essentially just an opinionated wrapper around git and git submodules.
License
GNU General Public License v3
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitpkg-0.3.2.tar.gz.
File metadata
- Download URL: gitpkg-0.3.2.tar.gz
- Upload date:
- Size: 25.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eca37d239e5bd537d6950563f3552825a8f11cd9cf7936e06d1a060e8a32847a
|
|
| MD5 |
aa6d9426abdf1982bde618ed5a7081df
|
|
| BLAKE2b-256 |
8875ac9a377e2a528d0f3510279360c4117c104a793e4726e3dd02595e919806
|
Provenance
The following attestation bundles were made for gitpkg-0.3.2.tar.gz:
Publisher:
deploy.yml on atomicptr/gitpkg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gitpkg-0.3.2.tar.gz -
Subject digest:
eca37d239e5bd537d6950563f3552825a8f11cd9cf7936e06d1a060e8a32847a - Sigstore transparency entry: 179441254
- Sigstore integration time:
-
Permalink:
atomicptr/gitpkg@d9d628cdce885e1d2fc88476d4dab82ba0887b12 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/atomicptr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@d9d628cdce885e1d2fc88476d4dab82ba0887b12 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gitpkg-0.3.2-py3-none-any.whl.
File metadata
- Download URL: gitpkg-0.3.2-py3-none-any.whl
- Upload date:
- Size: 30.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93eaf935c16d400b49fc18f008ff671660d4f3cbece89e8a27b5930bcf217b51
|
|
| MD5 |
2d8846a0c771847f3ce827fd3c35fe56
|
|
| BLAKE2b-256 |
d348774dcb229b1bd7e142fb126616f22d33fef383671c26547bb9d350356167
|
Provenance
The following attestation bundles were made for gitpkg-0.3.2-py3-none-any.whl:
Publisher:
deploy.yml on atomicptr/gitpkg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gitpkg-0.3.2-py3-none-any.whl -
Subject digest:
93eaf935c16d400b49fc18f008ff671660d4f3cbece89e8a27b5930bcf217b51 - Sigstore transparency entry: 179441255
- Sigstore integration time:
-
Permalink:
atomicptr/gitpkg@d9d628cdce885e1d2fc88476d4dab82ba0887b12 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/atomicptr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@d9d628cdce885e1d2fc88476d4dab82ba0887b12 -
Trigger Event:
push
-
Statement type: