Cosmetic fix to setup.py
This commit is contained in:
parent
7e7cc6f416
commit
933e02ee5c
9
setup.py
9
setup.py
@ -39,12 +39,17 @@ from distutils.command.build import build
|
|||||||
from distutils.command.sdist import sdist
|
from distutils.command.sdist import sdist
|
||||||
from distutils import log
|
from distutils import log
|
||||||
|
|
||||||
# read version from local pygit2/version.py without pulling in
|
# Read version from local pygit2/version.py without pulling in
|
||||||
# pygit2/__init__.py
|
# pygit2/__init__.py
|
||||||
sys.path.insert(0, 'pygit2')
|
sys.path.insert(0, 'pygit2')
|
||||||
from version import __version__
|
from version import __version__
|
||||||
|
|
||||||
u = lambda s: s if sys.version_info[0] > 2 else unicode(s, 'utf-8')
|
# Python 2 support
|
||||||
|
# See https://github.com/libgit2/pygit2/pull/180 for a discussion about this.
|
||||||
|
if sys.version_info[0] == 2:
|
||||||
|
u = lambda s: unicode(s, 'utf-8')
|
||||||
|
else:
|
||||||
|
u = str
|
||||||
|
|
||||||
|
|
||||||
# Use environment variable LIBGIT2 to set your own libgit2 configuration.
|
# Use environment variable LIBGIT2 to set your own libgit2 configuration.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user