contrib: drop Python < 2.6 from Makefile.python
authorMads Kiilerich <madski@unity3d.com>
Thu, 15 Oct 2015 21:35:49 +0200
changeset 26734 b000d34f863f
parent 26733 f6e2e42fb8ef
child 26735 ec74ea542201
contrib: drop Python < 2.6 from Makefile.python
contrib/Makefile.python
--- a/contrib/Makefile.python	Fri Oct 16 11:37:34 2015 +0200
+++ b/contrib/Makefile.python	Thu Oct 15 21:35:49 2015 +0200
@@ -17,9 +17,9 @@
 	@echo '  symlink   - create a $$SYMLINKDIR/$(PYTHONNAME)$$PYTHONVER symlink'
 	@echo
 	@echo 'Example: create a temporary Python installation:'
-	@echo '  $$ make -f Makefile.python python PYTHONVER=2.4 PREFIX=/tmp/p24'
-	@echo '  $$ /tmp/p24/bin/python -V'
-	@echo '  Python 2.4'
+	@echo '  $$ make -f Makefile.python python PYTHONVER=2.6 PREFIX=/tmp/p26'
+	@echo '  $$ /tmp/p26/bin/python -V'
+	@echo '  Python 2.6'
 	@echo
 	@echo 'Some external libraries are required for building Python: zlib bzip2 openssl.'
 	@echo 'Make sure their development packages are installed systemwide.'
@@ -27,7 +27,7 @@
 # debian: apt-get install zlib1g-dev libbz2-dev libssl-dev
 	@echo
 	@echo 'To build a nice collection of interesting Python versions:'
-	@echo '  $$ for v in 2.{4{,.2,.3},5{,.6},6{,.1,.2,.9},7{,.8,.9}}; do'
+	@echo '  $$ for v in 2.{6{,.1,.2,.9},7{,.8,.9}}; do'
 	@echo '    make -f Makefile.python symlink PYTHONVER=$$v || break; done'
 	@echo 'To run a Mercurial test on all these Python versions:'
 	@echo '  $$ for py in `cd ~/bin && ls $(PYTHONNAME)2.*`; do'
@@ -38,7 +38,7 @@
 export LC_ALL=C
 
 python: $(PREFIX)/bin/python docutils
-	printf 'import sys, zlib, bz2, docutils\nif sys.version_info >= (2,6):\n import ssl' | $(PREFIX)/bin/python
+	printf 'import sys, zlib, bz2, docutils, ssl' | $(PREFIX)/bin/python
 
 PYTHON_SRCDIR=Python-$(PYTHONVER)
 PYTHON_SRCFILE=$(PYTHON_SRCDIR).tgz
@@ -49,15 +49,12 @@
 	tar xf $(PYTHON_SRCFILE)
 	# Ubuntu disables SSLv2 the hard way, disable it on old Pythons too
 	-sed -i 's,self.*SSLv2_method(),0;//\0,g' $(PYTHON_SRCDIR)/Modules/_ssl.c
-	# Find multiarch system libraries on Ubuntu with Python 2.4.x
-	# http://lipyrary.blogspot.dk/2011/05/how-to-compile-python-on-ubuntu-1104.html
-	-sed -i "s|lib_dirs = .* \[|\0'/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`',|g" $(PYTHON_SRCDIR)/setup.py
 	# Find multiarch system libraries on Ubuntu and disable fortify error when setting argv
 	LDFLAGS="-L/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`"; \
 	BASECFLAGS=-U_FORTIFY_SOURCE; \
 	export LDFLAGS BASECFLAGS; \
 	cd $(PYTHON_SRCDIR) && ./configure --prefix=$(PREFIX) && make all SVNVERSION=pwd && make install
-	printf 'import sys, zlib, bz2\nif sys.version_info >= (2,6):\n import ssl' | $(PREFIX)/bin/python
+	printf 'import sys, zlib, bz2, ssl' | $(PREFIX)/bin/python
 	rm -rf $(PYTHON_SRCDIR)
 
 DOCUTILSVER=0.12