diff options
| author | Junio C Hamano <gitster@pobox.com> | 2013-02-04 10:25:34 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2013-02-04 10:25:34 -0800 |
| commit | 3e515b0d40d9ad483c4f1e076c2726d91ccc072d (patch) | |
| tree | cc13ab3fb287adb12e4be67482e6907dea3dd201 /git_remote_helpers/setup.py | |
| parent | 9aea11dbc152726bbbe93630cc29b10c29d4f62e (diff) | |
| parent | ae6037bc710b248946ed715fd659ef535ea78980 (diff) | |
Merge branch 'jk/remote-helpers-in-python-3'
Prepare remote-helper test written in Python to be run with Python3.
* jk/remote-helpers-in-python-3:
git_remote_helpers: remove GIT-PYTHON-VERSION upon "clean"
git-remote-testpy: fix path hashing on Python 3
git-remote-testpy: call print as a function
git-remote-testpy: don't do unbuffered text I/O
git-remote-testpy: hash bytes explicitly
svn-fe: allow svnrdump_sim.py to run with Python 3
git_remote_helpers: use 2to3 if building with Python 3
git_remote_helpers: force rebuild if python version changes
git_remote_helpers: fix input when running under Python 3
git_remote_helpers: allow building with Python 3
Diffstat (limited to 'git_remote_helpers/setup.py')
| -rw-r--r-- | git_remote_helpers/setup.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/git_remote_helpers/setup.py b/git_remote_helpers/setup.py index 4d434b65cb..6de41deb44 100644 --- a/git_remote_helpers/setup.py +++ b/git_remote_helpers/setup.py @@ -4,6 +4,15 @@ from distutils.core import setup +# If building under Python3 we need to run 2to3 on the code, do this by +# trying to import distutils' 2to3 builder, which is only available in +# Python3. +try: + from distutils.command.build_py import build_py_2to3 as build_py +except ImportError: + # 2.x + from distutils.command.build_py import build_py + setup( name = 'git_remote_helpers', version = '0.1.0', @@ -14,4 +23,5 @@ setup( url = 'http://www.git-scm.com/', package_dir = {'git_remote_helpers': ''}, packages = ['git_remote_helpers', 'git_remote_helpers.git'], + cmdclass = {'build_py': build_py}, ) |
