0

I have some core Python packages that I develop for my team. The package directory is setup in standard way;

/mypkg
    /mypkg
    /tests
    README.txt
    LICENSE.txt
    setup.py
    .gitignore

Now, because these are for internal use only, and for other company-sensitive reasons, my remote git repository is just a shared network drive;

//svr/path/to/remote/repo.git

The core packages are relativley stable, and are updated with bug fixes and new features from time to time.

I also develop a set of tools which are distributed to team members. These team members all have access to the shared drive location.

Can they pip install directly from the shared drive?

I have seen answers with stuff like;

pip install git+https://github/user/repo.git

and I know about

pip install --find-links ...

Can they somehow be combined??? It would be cool? I know that an easier solution would be clone the git repo and then run setup.py but some of the end-users are non tech-savvy and also may not have git installed (as we are on Windows)

If I could simply add a line in the requirements.txt file which pointed at the shared drive that would be nice...

UPDATE:

If I use

pip install git+file://path/to/remote/repo.git

it works as I would like - but would this approach require git to be installed?

wstk
  • 1,040
  • 8
  • 14
  • It should work with `pip install --find-links file:///svr/path/to/remote/repo.git` – Karl Dec 21 '18 at 12:23
  • That was my initial thought, but when I try it I get `ERROR: You must give at least one requirement to install (maybe you meant pip install ` – wstk Dec 21 '18 at 12:32
  • Actually, come to think of it this won't work, it will only work with already packaged code (i.e. setup.py has already been run). Have a look at these two posts, they should help you along: https://stackoverflow.com/questions/15031694/installing-python-packages-from-local-file-system-folder-to-virtualenv-with-pip, https://stackoverflow.com/questions/7225900/how-to-install-packages-using-pip-according-to-the-requirements-txt-file-from-a – Karl Dec 21 '18 at 12:39
  • @karl, thank you. Yeah I know about installing when a source distribution is already created. The thing is, I don't really want to push the packaged code into the repository - this seems to go against the ethos of source-controlling stuff which can just be regenerated. However, if this is an accepted approach I could perhaps do this... – wstk Dec 21 '18 at 12:43

0 Answers0