Suppose I have a private git repo(A
library repo) which I want to use from my project. (B
project repo)
I clone A
to my ~/workspace/A
and I work on my project at ~/workspace/B
B
's virtualenv resides in ~/virtualenvs/B
In order to modify A
and test the modified from B
,
- modify
A
- commit push to
A
's origin - pip install
A
git+http://A-repository
Which is very time consuming.. Can I reduce the above steps to
- modify
A
by placing A inside somewhere in project B
's virtualenv?
and commit & push only after I test the modified A
from B
?
** Edit
I could think of two ways and wonder if there's better way.
add
A
as a git submodule toB
somewhere (which is in python module path) under~/workspace/B
: I just didn't like submodule whenever I used it.. hard to grasp and manage them.add
~/workspace/parent-of-A/
to python-pathbefore
virutalenv python-path So when I edit~/workspace/parent-of-A/A
, it is readily seen byB
.
And production server and other people who don't modifyA
could usepip install-ed
version in virtualenv.