Is there a one-liner shortcut for:
git clone https://github.com/user/mypythonmodule.git
cd mypythonmodule
python setup.py install
cd ..
like
git clone install https://github.com/user/mypythonmodule.git
or doesn't this exist?
Stephen Paulger
5,3733 gold badges31 silver badges46 bronze badges
asked May 21, 2015 at 8:31
Basj
47.6k113 gold badges468 silver badges819 bronze badges
1 Answer 1
If you use pip it supports installing from git URLs.
From the pip documentation
"pip currently supports cloning over git, git+https and git+ssh"
So you would do
pip install git+https://github.com/user/mypythonmodule.git
answered May 21, 2015 at 8:36
Stephen Paulger
5,3733 gold badges31 silver badges46 bronze badges
Sign up to request clarification or add additional context in comments.
3 Comments
Basj
Nice solution. I admit, that I first wanted to avoid asking target users to install
pip, because on my Raspbian Wheezy : apt-get install python-pip installs pip + .... Python 2.6 on top of Python 2.7 ... :s ugly !Stephen Paulger
Is Python 2.7 default in Raspbian Jessie? Alternatively if you have a python 2.7 easy_install you could install pip using that rather than apt.
cel
@StephenPaulger, does that really work without the
git+prefix? For me it seems that it has to be pip install git+https://github.com/user/mypythonmodule.gitlang-py
mypythonmodulewith your solution