OpenOpt install
Robert Kern
robert.kern at gmail.com
Mon Dec 17 15:27:09 EST 2007
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
More information about the Python-list
mailing list