diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-11-25 18:10:33 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-11-25 18:18:15 +0100 |
commit | f8ce24a835cae8c623e2936bec2618a8855c605b (patch) | |
tree | d4c1d392579e24285381613a4ac1b7cc2d6b6fae /setup.py | |
parent | 65747a216c67c3101c6ae2edaa8119d786b793cb (diff) | |
parent | 9004e3a1cf33110f2cbc458f1dc3259c930ad9b4 (diff) | |
download | gitpython-f8ce24a835cae8c623e2936bec2618a8855c605b.tar.gz |
-#######->WARNING<-####### Directory structure changed, see commit message
If you use git-python as a submodule of your own project, which alters the sys.path to import it,
you will have to adjust your code to take the changed directory structure into consideration.
Previously, you would put the path
./git-python/lib
into your syspath. All modules moved one level up into the 'git' subdirectory, which means that the 'git-python' directory
now contains the 'git' root package. To allow git to be found, add ./git-python into your path.
To finalize your update, run the following commands
git submodule update --init --recursive
As there will be left-over directories, consider running git-clean
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -9,6 +9,7 @@ except ImportError: from distutils.command.build_py import build_py as _build_py from setuptools.command.sdist import sdist as _sdist import os +import sys from os import path v = open(path.join(path.dirname(__file__), 'VERSION')) @@ -29,8 +30,8 @@ class build_py(_build_py): class sdist(_sdist): def make_release_tree (self, base_dir, files): _sdist.make_release_tree(self, base_dir, files) - orig = '__init__.py' - assert path.exists(orig) + orig = path.join('git', '__init__.py') + assert path.exists(orig), orig dest = path.join(base_dir, orig) if hasattr(os, 'link') and path.exists(dest): os.unlink(dest) @@ -40,7 +41,12 @@ class sdist(_sdist): def _stamp_version(filename): found, out = False, [] - f = open(filename, 'r') + try: + f = open(filename, 'r') + except (IOError, OSError): + print >> sys.stderr, "Couldn't find file %s to stamp version" % filename + return + #END handle error, usually happens during binary builds for line in f: if '__version__ =' in line: line = line.replace("'git'", "'%s'" % VERSION) |