aws / git-remote-codecommit

An implementation of Git Remote Helper that makes it easier to interact with AWS CodeCommit
Apache License 2.0
272 stars 39 forks source link

Pip install from CC repo #9

Closed jabrennem closed 4 years ago

jabrennem commented 4 years ago

Is there a way to use this to pip install a python package in a CodeCommit repository?

pip install git-remote-codecommit pip install git+codecommit::{region}://repo-name

dytoto commented 4 years ago

You should be able to clone your CodeCommit repository and then install the pip module.

git clone codecommit://<profile>@<python-package-in-repo>

cd <your-python-package>

python setup.py sdist

pip install --upgrade dist/<your-python-package>-*.tar.gz

mguillau commented 4 years ago

I just came across the same feature wish, so I looked into it (including finding this issue).

Adding support for git+commit:// as a scheme for pip is an issue of pip, not this package. The list of supported git-based schemes in pip is here: https://github.com/pypa/pip/blob/f84f91af27e194a40a1c59f72de93a904d989d44/src/pip/_internal/vcs/git.py#L51 .

I cloned the https://github.com/pypa/pip repo, added 'git+codecommit' to that tuple, ran pip install -e . in a virtual env and was able to install a CodeCommit repo via pip install git+codecommit://repo-name.

Hope this helps.

jabrennem commented 4 years ago

Thank you. I will try out the tuple idea. It would be a cool feature request for pip to add that scheme via the command line.

frank-sorschak commented 3 years ago

pip install git+https://{url_of_repo} worked for me with my git-codecommit repo