Diff for /python/pyGiNaC/setup3.py between versions 1.1 and 1.2

version 1.1, 2001/04/21 06:55:00 version 1.2, 2001/04/21 15:46:35
Line 129  sysconfig._init_posix = my_init_posix Line 129  sysconfig._init_posix = my_init_posix
   
 #+++++++++++++++++ PyGiNaC version ++++++++++++++  #+++++++++++++++++ PyGiNaC version ++++++++++++++
   
   wrapper_dir = 'wrappers3'
   lib_dir = 'lib3'
   
 major_version = 0  major_version = 0
 minor_version = 2  minor_version = 3
 try: execfile(os.path.join('tools','get_revision.py'))  try: execfile(os.path.join('tools','get_revision.py'))
 except: revision_version = 0  except: revision_version = 0
 version='%d.%d.%d'%(major_version,minor_version,revision_version)  version='%d.%d.%d'%(major_version,minor_version,revision_version)
Line 138  version='%d.%d.%d'%(major_version,minor_ Line 141  version='%d.%d.%d'%(major_version,minor_
 #++++++++++++++++ ginac._ginac +++++++++++++++++++++  #++++++++++++++++ ginac._ginac +++++++++++++++++++++
   
 ginac_cpp = os.path.join('src','_ginac.cpp')  ginac_cpp = os.path.join('src','_ginac.cpp')
 wrapper_dir = 'wrappers3'  
   
 ex_src = [  ex_src = [
     os.path.join(wrapper_dir,'ex_py.cpp'),      os.path.join(wrapper_dir,'ex_py.cpp'),
Line 152  if gentest: Line 155  if gentest:
     dt_match = re.compile(r'\s*/[*]DT(?P<text>.*?)[*]/',re.M|re.S)      dt_match = re.compile(r'\s*/[*]DT(?P<text>.*?)[*]/',re.M|re.S)
     mdt_match = re.compile(r'\s*/[*]M_DT(?P<text>.*?)[*]/',re.M|re.S)      mdt_match = re.compile(r'\s*/[*]M_DT(?P<text>.*?)[*]/',re.M|re.S)
     fdt_match = re.compile(r'\s*/[*]F_DT(?P<text>.*?)[*]/',re.M|re.S)      fdt_match = re.compile(r'\s*/[*]F_DT(?P<text>.*?)[*]/',re.M|re.S)
     fon = os.path.join('lib3','doc','__init__.py')      todo_match = re.compile(r'\s*/[*]\s*TODO(?P<text>.*?)[*]/',re.M|re.S)
       fon = os.path.join(lib_dir,'doc','__init__.py')
     fo = open(fon,'w')      fo = open(fon,'w')
       ftodo = open('TODO_py.txt','w')
     fo.write('''#!/usr/bin/env python      fo.write('''#!/usr/bin/env python
 import sys,os  import sys,os
 from distutils import util  from distutils import util
Line 174  sys.path.insert(0,os.path.abspath(os.pat Line 179  sys.path.insert(0,os.path.abspath(os.pat
             for l in m:              for l in m:
                 p,d=l.split('\n',1)                  p,d=l.split('\n',1)
                 ex_methods.append('''\n    def %s:\n        """%s"""\n'''%(p.strip(),d.strip()))                  ex_methods.append('''\n    def %s:\n        """%s"""\n'''%(p.strip(),d.strip()))
           m = todo_match.findall(open(fn,'r').read())
           if m:
               ftodo.write('In file %s:\n'%fn)
               ftodo.write('\n'.join(map(lambda s:s.strip(),m))+'\n')
         m = fdt_match.findall(open(fn,'r').read())          m = fdt_match.findall(open(fn,'r').read())
         if m:          if m:
             for l in m:              for l in m:
Line 188  def _test(): Line 197  def _test():
     return doctest.testmod(tt)      return doctest.testmod(tt)
 if __name__ == "__main__":  if __name__ == "__main__":
     _test()\n'''%('\n'.join(ex_methods)))      _test()\n'''%('\n'.join(ex_methods)))
     fo.close()          fo.close()
       ftodo.close()
     if gentest==2:      if gentest==2:
         os.system('%s %s -v'%(sys.executable,fon))          os.system('%s %s -v'%(sys.executable,fon))
     else:      else:
Line 198  if len(sys.argv)==1: Line 208  if len(sys.argv)==1:
     print "PyGiNaC Version",version      print "PyGiNaC Version",version
     sys.exit()      sys.exit()
 if rebuild:  if rebuild:
       print 'Creating file',os.path.join(wrapper_dir,'ex_py_subs.cpp')
     f=open(os.path.join(wrapper_dir,'ex_py_subs.cpp'),'w')      f=open(os.path.join(wrapper_dir,'ex_py_subs.cpp'),'w')
     for n in wrap_input:      for n in wrap_input:
         ff = n + '_py.cpp'          ff = n + '_py.cpp'
Line 247  such as sin, factorial, etc. Line 258  such as sin, factorial, etc.
        url = "http://cens.ioc.ee/projects/pyginac/",         url = "http://cens.ioc.ee/projects/pyginac/",
        ext_modules = [ ginac_ext ],         ext_modules = [ ginac_ext ],
        packages = ['ginac','ginac.doc'],         packages = ['ginac','ginac.doc'],
        package_dir = {'ginac': 'lib3',         package_dir = {'ginac': lib_dir,
                       'ginac.doc':os.path.join('lib3','doc') },                        'ginac.doc':os.path.join(lib_dir,'doc') },
        )         )
   
 print "PyGiNaC Version",version  print "PyGiNaC Version",version

Removed from v.1.1  
changed lines
  Added in v.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>