Commit a32708c5 authored by 's avatar

Added logic to exclude cPickle, cStringIO when compiling under Python 2.x

parent 010cb40e
......@@ -93,6 +93,12 @@ print
print '-'*78
print 'Building extension modules'
# For Python 2, we want to skip some things
if sys.version[:1]=='2':
do('cp ./lib/python/Setup20 ./lib/python/Setup')
else:
do('cp ./lib/python/Setup15 ./lib/python/Setup')
make('lib','python')
make('lib','python','DocumentTemplate')
make('lib','python','ZODB')
......@@ -100,17 +106,18 @@ make('lib','python','SearchIndex')
make('lib','python','Shared','DC','xml','pyexpat')
# Try to link/copy cPickle.so to BoboPOS to out-fox
# stock Python cPickle.
cd('lib')
files=filter(
lambda f: string.lower(f[:8])=='cpickle.',
os.listdir('python')
)
if files:
cd('python'); cd('ZODB')
for f in files:
src=os.path.join('..',f)
try: os.link(src,f)
except: open(f,'wb').write(open(src,'rb').read())
cd('..'); cd('..')
cd('..')
# stock Python cPickle if using Python 1.5.2.
if sys.version[:1] != '2':
cd('lib')
files=filter(
lambda f: string.lower(f[:8])=='cpickle.',
os.listdir('python')
)
if files:
cd('python'); cd('ZODB')
for f in files:
src=os.path.join('..',f)
try: os.link(src,f)
except: open(f,'wb').write(open(src,'rb').read())
cd('..'); cd('..')
cd('..')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment