0

I have a number of python "script suites" (as I call them) which I would like to make easy-to-install for my colleagues. I have looked into pip, and that seems really nice, but in that regimen (as I understand it) I would have to submit a static version and update them on every change.

As it happens I am going to be adding and changing a lot of stuff in my script suites along the way, and whenever someone installs it, I would like them to get the newest version. With pip, that means that on every commit to my repository, I will also have to re-submit a package to the PyPI index. That's a lot of unnecessary work.

Is there any way to provide an easy cross-platform installation (via pip or otherwise) which pulls the files directly from my github repo?

TheChymera
  • 17,004
  • 14
  • 56
  • 86

1 Answers1

1

I'm not sure if I understand your problem entirely, but you might want to use pip's editable installs[1]

Here's a brief example: In this artificial example let's suppose you want to use git as CVS.

git clone url_to_myrepo.git path/to/local_repository
pip install [--user] -e path/to/local_repository

The installation of the package will reflect the state of your local repository. Therefore there is no need to reinstall the package with pip when the remote repository gets updated. Whenever you pull changes to your local repository, the installation will be up-to-date as well.

[1] http://pip.readthedocs.org/en/latest/reference/pip_install.html#editable-installs

cel
  • 30,017
  • 18
  • 97
  • 117
  • Sorry if I worded the question imprecisely. In any case, it seems you managed to answer it. This is really great! ^^ Apparently (as per the link you provided) I can also manage dependencies - right? how exactly does the install work? does it just add my local repo to the PYTHON_PATH? – TheChymera Apr 20 '14 at 20:15
  • In editable mode pip runs "setup.py develop" for you. If you want to understand what's happening you might want to see this question + accepted answer: http://stackoverflow.com/questions/12901776/python-setup-py-develop-is-it-possible-to-create-egg-info-folder-not-in-so For managing dependencies see https://docs.python.org/2.7/distutils/setupscript.html – cel Apr 20 '14 at 20:35
  • so I do have to add a `setup.py` file to my repository even if I do not want dependency management, right? – TheChymera Apr 20 '14 at 21:57
  • Yes, but this is not surprising - Using distutils is the common way to distribute python packages. – cel Apr 21 '14 at 07:28
  • Does [this](https://github.com/TheChymera/chr-helpers/blob/master/setup.py) seem about right? – TheChymera Apr 21 '14 at 13:19