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

Reply via email to