Re: [PATCH v2 4/8] git_remote_helpers: use 2to3 if building with Python 3
On Thu, Jan 17, 2013 at 09:15:08PM -0800, Sverre Rabbelier wrote: On Thu, Jan 17, 2013 at 10:53 AM, John Keeping j...@keeping.me.uk wrote: [1] http://wiki.python.org/moin/PortingPythonToPy3k This link seems dead. Looks like the Python wiki is down [1]. I'll replace it with [2] since the content is similar and it should be easier to find a mirror of the Python documentation than of the wiki. [1] http://pyfound.blogspot.co.uk/2013/01/wikipythonorg-compromised.html [2] http://docs.python.org/3.3/howto/pyporting.html#during-installation John -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 4/8] git_remote_helpers: use 2to3 if building with Python 3
Assuming you tried this out on both 2.x and 3.x: Acked-by: Sverre Rabbelier srabbel...@gmail.com On Fri, Jan 18, 2013 at 2:32 AM, John Keeping j...@keeping.me.uk wrote: On Thu, Jan 17, 2013 at 09:15:08PM -0800, Sverre Rabbelier wrote: On Thu, Jan 17, 2013 at 10:53 AM, John Keeping j...@keeping.me.uk wrote: [1] http://wiki.python.org/moin/PortingPythonToPy3k This link seems dead. Looks like the Python wiki is down [1]. I'll replace it with [2] since the content is similar and it should be easier to find a mirror of the Python documentation than of the wiki. [1] http://pyfound.blogspot.co.uk/2013/01/wikipythonorg-compromised.html [2] http://docs.python.org/3.3/howto/pyporting.html#during-installation John -- Cheers, Sverre Rabbelier -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 4/8] git_remote_helpers: use 2to3 if building with Python 3
Using the approach detailed on the Python wiki[1], run 2to3 on the code as part of the build if building with Python 3. The code itself requires no changes to convert cleanly. [1] http://wiki.python.org/moin/PortingPythonToPy3k Signed-off-by: John Keeping j...@keeping.me.uk --- git_remote_helpers/setup.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/git_remote_helpers/setup.py b/git_remote_helpers/setup.py index 4d434b6..6de41de 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}, ) -- 1.8.1.1.260.g99b33f4.dirty -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 4/8] git_remote_helpers: use 2to3 if building with Python 3
On Thu, Jan 17, 2013 at 10:53 AM, John Keeping j...@keeping.me.uk wrote: [1] http://wiki.python.org/moin/PortingPythonToPy3k This link seems dead. -- Cheers, Sverre Rabbelier -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html