Hi, My solution was the correct way to go, IIRC, only a few changes were to be done so that those files were detected correctly (I think there were some __init__.py files that were not present this may have to do with the fact that you add a lot of additional paths in sys.path when you load openopt, but I already told you we should simplify this).
Matthieu 2007/12/18, dmitrey <[EMAIL PROTECTED]>: > > When earlier OpenOpt versions had been installed there were no > compiled pyc-files (in destination directory). I called to mailing > list but no obvious receipt had been achieved. Matthieu had done some > changes but it yielded other mistakes (no some py-files detected or > kind of), so I had removed those changes and write my own, for to have > OO py-files being compiled when installed, because next time when they > will be run user may not have root permissions, so he will recompile > source files each time OO starts. > > On Dec 17, 10:27 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > > dmitrey wrote: > > > Use > > > python setup.py install > > > > People should be able to run the distutils commands independently. > > > > What are you trying to achieve with this block of code that follows the > setup() > > call? > > > > new_name = 'tmp55' > > os.rename('scikits', new_name) > > newPath = [] > > for directory in sys.path: > > if not 'scikits' in directory: newPath.append(directory)# > something > > wrong with list.remove() > > sys.path = newPath > > import scikits > > reload(scikits) > > Path = scikits.__path__[0] > > NewPath = os.path.join(Path, 'openopt') > > rmtree(NewPath, True) # True means ignore errors > > copytree(os.path.join(os.path.curdir, new_name, 'openopt'), NewPath) > > NewPath = Path > > compileall.compile_dir(NewPath) > > > > os.rename(new_name, 'scikits') > > > > This just looks like a really bad idea. > > > > -- > > Robert Kern > > > > "I have come to believe that the whole world is an enigma, a harmless > enigma > > that is made terrible by our own mad attempt to interpret it as though > it had > > an underlying truth." > > -- Umberto Eco > > -- > http://mail.python.org/mailman/listinfo/python-list > -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher
-- http://mail.python.org/mailman/listinfo/python-list