public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] how to build Python 2.1.1
@ 2001-10-18 14:45 Gold is Heavy
  2001-10-23  8:13 ` Karl Trygve Kalleberg
  0 siblings, 1 reply; 2+ messages in thread
From: Gold is Heavy @ 2001-10-18 14:45 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1332 bytes --]

If you're like me, then maybe you wondered, where is Python 2.1.1?

Here is how to build your own Python 2.1.1 without using .ebuild.  The 
patches mentioned here are attached.

1. first fix tcl-tk .ebuild
   a) become root: su
   b) go to portage dir: cd /usr/portage
   c) apply my patch to tcl-tk-8.4.2.ebuild: patch -p0 < /path/to/tcl-tk.patch
   d) remerge tcl-tk: emerge dev-lang/tcl-tk
   e) become yourself: exit
2. get Python-2.1.1.tgz
3. untar it: tar zxf Python-2.1.1.tgz
4. go to Python-2.1.1 directory: cd Python-2.1.1
5. make a little config-command file, just in case you need to rerun the 
./configure script:
echo './configure --prefix=/usr/local/python2.1' > config-command
6. run it: sh config-command
7. go outside of Python-2.1.1 dir: cd ..
8. apply my patch to Setup file:
patch -p0 < /path/to/Python-Setup.patch
9. go back: cd Python-2.1.1
10. run make: make
11. become root: su
12. install Python: make install
13. become yourself: exit

That should be all.  If you don't want old db support, then add 
'--without-libdb' option to the ./configure command above.

I was going to make an .ebuild for this, but I realized it would be waste of 
time, since I am not a gentoo developer, and it would take me a long time to 
learn how portage system works.  I am happy just being a user.

I hope this helps.

--Leo

[-- Attachment #2: Python-Setup.patch --]
[-- Type: text/x-diff, Size: 6622 bytes --]

--- foo/Python-2.1.1/Modules/Setup	Thu Oct 18 15:39:28 2001
+++ Python-2.1.1/Modules/Setup	Thu Oct 18 14:23:22 2001
@@ -135,58 +135,59 @@
 # it, depending on your system -- see the GNU readline instructions.
 # It's okay for this to be a shared library, too.
 
-#readline readline.c -lreadline -ltermcap
+readline readline.c -lreadline -lncurses
 
 
 # Modules that should always be present (non UNIX dependent):
 
-#array arraymodule.c	# array objects
-#cmath cmathmodule.c # -lm # complex math library functions
-#math mathmodule.c # -lm # math library functions, e.g. sin()
-#struct structmodule.c	# binary structure packing/unpacking
-#time timemodule.c # -lm # time operations and variables
-#operator operator.c	# operator.add() and similar goodies
-#_weakref _weakref.c	# basic weak reference support
-#_codecs _codecsmodule.c	# access to the builtin codecs and codec registry
-#_testcapi _testcapimodule.c    # Python C API test module
+array arraymodule.c	# array objects
+cmath cmathmodule.c # -lm # complex math library functions
+math mathmodule.c # -lm # math library functions, e.g. sin()
+struct structmodule.c	# binary structure packing/unpacking
+time timemodule.c # -lm # time operations and variables
+operator operator.c	# operator.add() and similar goodies
+_weakref _weakref.c	# basic weak reference support
+_codecs _codecsmodule.c	# access to the builtin codecs and codec registry
+_testcapi _testcapimodule.c    # Python C API test module
 
-#unicodedata unicodedata.c    # static Unicode character database
+unicodedata unicodedata.c    # static Unicode character database
 
-#_locale _localemodule.c  # access to ISO C locale support
+_locale _localemodule.c  # access to ISO C locale support
 
 
 # Modules with some UNIX dependencies -- on by default:
 # (If you have a really backward UNIX, select and socket may not be
 # supported...)
 
-#fcntl fcntlmodule.c	# fcntl(2) and ioctl(2)
-#pwd pwdmodule.c		# pwd(3) 
-#grp grpmodule.c		# grp(3)
-#errno errnomodule.c	# posix (UNIX) errno values
-#select selectmodule.c	# select(2); not on ancient System V
+fcntl fcntlmodule.c	# fcntl(2) and ioctl(2)
+pwd pwdmodule.c		# pwd(3) 
+grp grpmodule.c		# grp(3)
+errno errnomodule.c	# posix (UNIX) errno values
+select selectmodule.c	# select(2); not on ancient System V
 
 # Memory-mapped files (also works on Win32).
-#mmap mmapmodule.c
+mmap mmapmodule.c
 
 # Dynamic readlines
-#xreadlines xreadlinesmodule.c
+xreadlines xreadlinesmodule.c
 
 # for socket(2), without SSL support.
 #_socket socketmodule.c
 
 # Socket module compiled with SSL support; you must comment out the other
 # socket line above, and possibly edit the SSL variable:
-#SSL=/usr/local/ssl
-#_socket socketmodule.c \
-#	-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
-#	-L$(SSL)/lib -lssl -lcrypto
+SSL=/usr/ssl
+SSL_PREFIX=/usr
+_socket socketmodule.c \
+	-DUSE_SSL -I$(SSL_PREFIX)/include -I$(SSL_PREFIX)/include/openssl \
+	-L$(SSL_PREFIX)/lib -lssl -lcrypto
 
 # The crypt module is now disabled by default because it breaks builds
 # on many systems (where -lcrypt is needed), e.g. Linux (I believe).
 #
 # First, look at Setup.config; configure may have set this for you.
 
-#crypt cryptmodule.c # -lcrypt	# crypt(3); needs -lcrypt on some systems
+crypt cryptmodule.c # -lcrypt	# crypt(3); needs -lcrypt on some systems
 
 
 # Some more UNIX dependent modules -- off by default, since these
@@ -210,12 +211,12 @@
 # Message-Digest Algorithm, described in RFC 1321.  The necessary files
 # md5c.c and md5.h are included here.
 
-#md5 md5module.c md5c.c
+md5 md5module.c md5c.c
 
 
 # The sha module implements the SHA checksum algorithm.
 # (NIST's Secure Hash Algorithm.)
-#sha shamodule.c
+sha shamodule.c
 
 
 # The mpz module interfaces to the GNU Multiple Precision library.
@@ -283,7 +284,7 @@
 
 # George Neville-Neil's timing module:
 
-#timing timingmodule.c
+timing timingmodule.c
 
 
 # The _tkinter module.
@@ -298,13 +299,13 @@
 # every system.
 
 # *** Always uncomment this (leave the leading underscore in!):
-# _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
+_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
 # *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
-#	-L/usr/local/lib \
+	-L/usr/lib \
 # *** Uncomment and edit to reflect where your Tcl/Tk headers are:
-#	-I/usr/local/include \
+	-I/usr/lib/tk8.4/include/generic -I/usr/lib/tcl8.4/include/generic \
 # *** Uncomment and edit to reflect where your X11 header files are:
-#	-I/usr/X11R6/include \
+	-I/usr/X11R6/include \
 # *** Or uncomment this for Solaris:
 #	-I/usr/openwin/include \
 # *** Uncomment and edit for Tix extension only:
@@ -317,9 +318,9 @@
 # *** Uncomment and edit for TOGL extension only:
 #	-DWITH_TOGL togl.c \
 # *** Uncomment and edit to reflect your Tcl/Tk versions:
-#	-ltk8.2 -ltcl8.2 \
+	-ltk8.4 -ltcl8.4 \
 # *** Uncomment and edit to reflect where your X11 libraries are:
-#	-L/usr/X11R6/lib \
+	-L/usr/X11R6/lib \
 # *** Or uncomment this for Solaris:
 #	-L/usr/openwin/lib \
 # *** Uncomment these for TOGL extension only:
@@ -327,12 +328,12 @@
 # *** Uncomment for AIX:
 #	-lld \
 # *** Always uncomment this; X11 libraries to link with:
-#	-lX11
+	-lX11
 
 # Lance Ellinghaus's modules:
 
-#rotor rotormodule.c		# enigma-inspired encryption
-#syslog syslogmodule.c		# syslog daemon interface
+rotor rotormodule.c		# enigma-inspired encryption
+syslog syslogmodule.c		# syslog daemon interface
 
 
 # Curses support, requring the System V version of curses, often
@@ -342,9 +343,9 @@
 #
 # First, look at Setup.config; configure may have set this for you.
 
-#_curses _cursesmodule.c -lcurses -ltermcap
+_curses _cursesmodule.c -lncurses
 # Wrapper for the panel library that's part of ncurses and SYSV curses.
-#_curses_panel _curses_panel.c -lpanel -lncurses 
+_curses_panel _curses_panel.c -lpanel -lncurses 
 
 
 # Tommy Burnette's 'new' module (creates new empty objects of certain kinds):
@@ -406,14 +407,14 @@
 
 
 # Helper module for various ascii-encoders
-#binascii binascii.c
+binascii binascii.c
 
 # Fred Drake's interface to the Python parser
-#parser parsermodule.c
+parser parsermodule.c
 
 # Digital Creations' cStringIO and cPickle
-#cStringIO cStringIO.c
-#cPickle cPickle.c
+cStringIO cStringIO.c
+cPickle cPickle.c
 
 
 # Lee Busby's SIGFPE modules.
@@ -436,7 +437,7 @@
 # Andrew Kuchling's zlib module.
 # This require zlib 1.1.3 (or later).
 # See http://www.cdrom.com/pub/infozip/zlib/
-#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
 
 # Interface to the Expat XML parser
 #

[-- Attachment #3: tcl-tk.patch --]
[-- Type: text/x-diff, Size: 1584 bytes --]

--- dev-lang/tcl-tk/tcl-tk-8.4.2.ebuild	Thu Aug 30 23:23:38 2001
+++ tcl-tk-8.4.2.ebuild	Thu Oct 18 15:57:12 2001
@@ -57,9 +57,9 @@
 	install -c -m0644 ${S1}/unix/*.h ${D}/usr/lib/tcl${V1}/include/unix
 	dodir /usr/lib/tcl${V1}/include/generic
 	install -c -m0644 ${S1}/generic/*.h ${D}/usr/lib/tcl${V1}/include/generic
-	rm -f ${D}/usr/lib/tcl${V1}/include/generic/tcl.h
-	rm -f ${D}/usr/lib/tcl${V1}/include/generic/tclDecls.h
-	rm -f ${D}/usr/lib/tcl${V1}/include/generic/tclPlatDecls.h	
+	#rm -f ${D}/usr/lib/tcl${V1}/include/generic/tcl.h
+	#rm -f ${D}/usr/lib/tcl${V1}/include/generic/tclDecls.h
+	#rm -f ${D}/usr/lib/tcl${V1}/include/generic/tclPlatDecls.h	
 
 	# install symlink for libraries
 	dosym /usr/lib/libtcl${V1}.a /usr/lib/libtcl.a
@@ -78,12 +78,12 @@
 	
 	# install private headers
 	dodir /usr/lib/tk${V2}/include/unix
-	install -c -m0644 ${S1}/unix/*.h ${D}/usr/lib/tk${V2}/include/unix
+	install -c -m0644 ${S2}/unix/*.h ${D}/usr/lib/tk${V2}/include/unix
 	dodir /usr/lib/tk${V2}/include/generic
-	install -c -m0644 ${S1}/generic/*.h ${D}/usr/lib/tk${V2}/include/generic
-	rm -f ${D}/usr/lib/tk${V2}/include/generic/tk.h
-	rm -f ${D}/usr/lib/tk${V2}/include/generic/tkDecls.h
-	rm -f ${D}/usr/lib/tk${V2}/include/generic/tkPlatDecls.h	
+	install -c -m0644 ${S2}/generic/*.h ${D}/usr/lib/tk${V2}/include/generic
+	#rm -f ${D}/usr/lib/tk${V2}/include/generic/tk.h
+	#rm -f ${D}/usr/lib/tk${V2}/include/generic/tkDecls.h
+	#rm -f ${D}/usr/lib/tk${V2}/include/generic/tkPlatDecls.h	
 
 	# install symlink for libraries
 	dosym /usr/lib/libtk${V2}.a /usr/lib/libtk.a

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gentoo-dev] how to build Python 2.1.1
  2001-10-18 14:45 [gentoo-dev] how to build Python 2.1.1 Gold is Heavy
@ 2001-10-23  8:13 ` Karl Trygve Kalleberg
  0 siblings, 0 replies; 2+ messages in thread
From: Karl Trygve Kalleberg @ 2001-10-23  8:13 UTC (permalink / raw
  To: gentoo-dev

On Thu, 18 Oct 2001 16:44:08 -0400
Gold is Heavy <aeoo@garbled.org> wrote:

> If you're like me, then maybe you wondered, where is Python 2.1.1?

dev-lang/python/python-2.1.1-r1.ebuild


However, you might need to unmask it. Also, be prepared that it is masked
for a reason, most likely that it has not been thoroughly tested yet.

Karl T	



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-10-23 14:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-18 14:45 [gentoo-dev] how to build Python 2.1.1 Gold is Heavy
2001-10-23  8:13 ` Karl Trygve Kalleberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox