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 ...@@ -93,6 +93,12 @@ print
print '-'*78 print '-'*78
print 'Building extension modules' 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')
make('lib','python','DocumentTemplate') make('lib','python','DocumentTemplate')
make('lib','python','ZODB') make('lib','python','ZODB')
...@@ -100,17 +106,18 @@ make('lib','python','SearchIndex') ...@@ -100,17 +106,18 @@ make('lib','python','SearchIndex')
make('lib','python','Shared','DC','xml','pyexpat') make('lib','python','Shared','DC','xml','pyexpat')
# Try to link/copy cPickle.so to BoboPOS to out-fox # Try to link/copy cPickle.so to BoboPOS to out-fox
# stock Python cPickle. # stock Python cPickle if using Python 1.5.2.
cd('lib') if sys.version[:1] != '2':
files=filter( cd('lib')
lambda f: string.lower(f[:8])=='cpickle.', files=filter(
os.listdir('python') lambda f: string.lower(f[:8])=='cpickle.',
) os.listdir('python')
if files: )
cd('python'); cd('ZODB') if files:
for f in files: cd('python'); cd('ZODB')
src=os.path.join('..',f) for f in files:
try: os.link(src,f) src=os.path.join('..',f)
except: open(f,'wb').write(open(src,'rb').read()) try: os.link(src,f)
cd('..'); cd('..') except: open(f,'wb').write(open(src,'rb').read())
cd('..') 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