Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1754327
  • 博文数量: 335
  • 博客积分: 4690
  • 博客等级: 上校
  • 技术积分: 4341
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-08 21:38
个人简介

无聊之人--除了技术,还是技术,你懂得

文章分类

全部博文(335)

文章存档

2016年(29)

2015年(18)

2014年(7)

2013年(86)

2012年(90)

2011年(105)

分类: C/C++

2013-02-25 22:34:31

python soucrce code 在VC 6.0下编译老是报错,上网无果,因此不得不在linux下编译,以便于后面的学习

os: ubuntu

python source code url:  

step: 

1 unzip:

tar  jxvf  Python-2.7.3.tar.bz2

2  read reame

layout of source code:

Demo/           Demonstration scripts, modules and programs
Doc/            Documentation sources (reStructuredText)
Grammar/        Input for the parser generator
Include/        Public header files
LICENSE         Licensing information
Lib/            Python library modules
Mac/            Macintosh specific resources
Makefile.pre.in Source from which config.status creates the Makefile.pre
Misc/           Miscellaneous useful files
Modules/        Implementation of most built-in modules
Objects/        Implementation of most built-in object types
PC/             Files specific to PC ports (DOS, Windows, OS/2)
PCbuild/        Build directory for Microsoft Visual C++
Parser/         The parser and tokenizer and their input handling
Python/         The byte-compiler and interpreter
README          The file you're reading now
RISCOS/         Files specific to RISC OS port
Tools/          Some useful programs written in Python
pyconfig.h.in   Source from which pyconfig.h is created (GNU autoheader output)
configure       Configuration shell script (GNU autoconf output)
configure.in    Configuration specification (input for GNU autoconf)
install-sh      Shell script used to install files
setup.py        Python script used to build extension modules

3in minipy  directory : ../configure  --prefix=/home/Desktop/cpython/Python2.7.3/minipy

4 make

5 sudo  -i

6 make install

7 run mypython 


root@ubuntu-virtual-machine:/home/ubuntu/Desktop/cpython/Python-2.7.3# python
Python 2.7.2+ (default, Oct  4 2011, 20:03:08)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
root@ubuntu-virtual-machine:/home/ubuntu/Desktop/cpython/Python-2.7.3# ./python

Python 2.7.3 (default, Feb 25 2013, 22:21:51)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> exit()

后续我们就可以自己修改源代码,进行定制

when you modify your source code ,you should run ./configure & make ,

that is all

ref: 

python readme

阅读(2133) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~