##// END OF EJS Templates
contrib: drop Python < 2.6 from Makefile.python
Mads Kiilerich -
r26734:b000d34f default
parent child Browse files
Show More
@@ -17,9 +17,9 b' help:'
17 @echo ' symlink - create a $$SYMLINKDIR/$(PYTHONNAME)$$PYTHONVER symlink'
17 @echo ' symlink - create a $$SYMLINKDIR/$(PYTHONNAME)$$PYTHONVER symlink'
18 @echo
18 @echo
19 @echo 'Example: create a temporary Python installation:'
19 @echo 'Example: create a temporary Python installation:'
20 @echo ' $$ make -f Makefile.python python PYTHONVER=2.4 PREFIX=/tmp/p24'
20 @echo ' $$ make -f Makefile.python python PYTHONVER=2.6 PREFIX=/tmp/p26'
21 @echo ' $$ /tmp/p24/bin/python -V'
21 @echo ' $$ /tmp/p26/bin/python -V'
22 @echo ' Python 2.4'
22 @echo ' Python 2.6'
23 @echo
23 @echo
24 @echo 'Some external libraries are required for building Python: zlib bzip2 openssl.'
24 @echo 'Some external libraries are required for building Python: zlib bzip2 openssl.'
25 @echo 'Make sure their development packages are installed systemwide.'
25 @echo 'Make sure their development packages are installed systemwide.'
@@ -27,7 +27,7 b' help:'
27 # debian: apt-get install zlib1g-dev libbz2-dev libssl-dev
27 # debian: apt-get install zlib1g-dev libbz2-dev libssl-dev
28 @echo
28 @echo
29 @echo 'To build a nice collection of interesting Python versions:'
29 @echo 'To build a nice collection of interesting Python versions:'
30 @echo ' $$ for v in 2.{4{,.2,.3},5{,.6},6{,.1,.2,.9},7{,.8,.9}}; do'
30 @echo ' $$ for v in 2.{6{,.1,.2,.9},7{,.8,.9}}; do'
31 @echo ' make -f Makefile.python symlink PYTHONVER=$$v || break; done'
31 @echo ' make -f Makefile.python symlink PYTHONVER=$$v || break; done'
32 @echo 'To run a Mercurial test on all these Python versions:'
32 @echo 'To run a Mercurial test on all these Python versions:'
33 @echo ' $$ for py in `cd ~/bin && ls $(PYTHONNAME)2.*`; do'
33 @echo ' $$ for py in `cd ~/bin && ls $(PYTHONNAME)2.*`; do'
@@ -38,7 +38,7 b' export LANGUAGE=C'
38 export LC_ALL=C
38 export LC_ALL=C
39
39
40 python: $(PREFIX)/bin/python docutils
40 python: $(PREFIX)/bin/python docutils
41 printf 'import sys, zlib, bz2, docutils\nif sys.version_info >= (2,6):\n import ssl' | $(PREFIX)/bin/python
41 printf 'import sys, zlib, bz2, docutils, ssl' | $(PREFIX)/bin/python
42
42
43 PYTHON_SRCDIR=Python-$(PYTHONVER)
43 PYTHON_SRCDIR=Python-$(PYTHONVER)
44 PYTHON_SRCFILE=$(PYTHON_SRCDIR).tgz
44 PYTHON_SRCFILE=$(PYTHON_SRCDIR).tgz
@@ -49,15 +49,12 b' PYTHON_SRCFILE=$(PYTHON_SRCDIR).tgz'
49 tar xf $(PYTHON_SRCFILE)
49 tar xf $(PYTHON_SRCFILE)
50 # Ubuntu disables SSLv2 the hard way, disable it on old Pythons too
50 # Ubuntu disables SSLv2 the hard way, disable it on old Pythons too
51 -sed -i 's,self.*SSLv2_method(),0;//\0,g' $(PYTHON_SRCDIR)/Modules/_ssl.c
51 -sed -i 's,self.*SSLv2_method(),0;//\0,g' $(PYTHON_SRCDIR)/Modules/_ssl.c
52 # Find multiarch system libraries on Ubuntu with Python 2.4.x
53 # http://lipyrary.blogspot.dk/2011/05/how-to-compile-python-on-ubuntu-1104.html
54 -sed -i "s|lib_dirs = .* \[|\0'/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`',|g" $(PYTHON_SRCDIR)/setup.py
55 # Find multiarch system libraries on Ubuntu and disable fortify error when setting argv
52 # Find multiarch system libraries on Ubuntu and disable fortify error when setting argv
56 LDFLAGS="-L/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`"; \
53 LDFLAGS="-L/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`"; \
57 BASECFLAGS=-U_FORTIFY_SOURCE; \
54 BASECFLAGS=-U_FORTIFY_SOURCE; \
58 export LDFLAGS BASECFLAGS; \
55 export LDFLAGS BASECFLAGS; \
59 cd $(PYTHON_SRCDIR) && ./configure --prefix=$(PREFIX) && make all SVNVERSION=pwd && make install
56 cd $(PYTHON_SRCDIR) && ./configure --prefix=$(PREFIX) && make all SVNVERSION=pwd && make install
60 printf 'import sys, zlib, bz2\nif sys.version_info >= (2,6):\n import ssl' | $(PREFIX)/bin/python
57 printf 'import sys, zlib, bz2, ssl' | $(PREFIX)/bin/python
61 rm -rf $(PYTHON_SRCDIR)
58 rm -rf $(PYTHON_SRCDIR)
62
59
63 DOCUTILSVER=0.12
60 DOCUTILSVER=0.12
General Comments 0
You need to be logged in to leave comments. Login now