OK, in fact distutils can compile every python script without a problem as long as it is in a package. For instance every solver is in the solvers folder, but there is no __init__.py file there, so distutils cannot compile the scripts that are in the subfolders, it is logical.
<br>What you have to do is to modify your oo.py file so that it does not add all subfolders to the sys.path. Besides, if someone has a subfoler that is named after one of our folders, the whole scikit can crash : the purpose of namespaces is to avoid this, so we must use them adequately (that is 
scikit.openopt.*), even if it means that the whole scikit architecture must be rethought.<br><br>Matthieu<br><br><div><span class="gmail_quote">2007/12/18, Matthieu Brucher <<a href="mailto:matthieu.brucher@gmail.com">
matthieu.brucher@gmail.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br>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).<br><br>Matthieu<br><br><div><span class="gmail_quote">2007/12/18, dmitrey <<a href="mailto:dmitrey.kroshko@scipy.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
dmitrey.kroshko@scipy.org
</a>>:</span><div><span class="e" id="q_116ec595b31bf1d2_1"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">When earlier OpenOpt versions had been installed there were no
<br>compiled pyc-files (in destination directory). I called to mailing
<br>list but no obvious receipt had been achieved. Matthieu had done some<br>changes but it yielded other mistakes (no some py-files detected or<br>kind of), so I had removed those changes and write my own, for to have<br>

OO py-files being compiled when installed, because next time when they<br>will be run user may not have root permissions, so he will recompile<br>source files each time OO starts.<br><br>On Dec 17, 10:27 pm, Robert Kern <
<a href="mailto:robert.k...@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">robert.k...@gmail.com</a>> wrote:<br>> dmitrey wrote:<br>> > Use<br>> > python setup.py install
<br>><br>> People should be able to run the distutils commands independently.
<br>><br>> What are you trying to achieve with this block of code that follows the setup()<br>> call?<br>><br>>     new_name = 'tmp55'<br>>     os.rename('scikits', new_name)<br>>     newPath = []
<br>>     for directory in sys.path:<br>>         if not 'scikits' in directory: newPath.append(directory)# something<br>> wrong with list.remove()<br>>     sys.path = newPath<br>>     import scikits
<br>>     reload(scikits)<br>>     Path = scikits.__path__[0]<br>>     NewPath = os.path.join(Path, 'openopt')<br>>     rmtree(NewPath, True) # True means ignore errors<br>>     copytree(os.path.join

(os.path.curdir, new_name, 'openopt'), NewPath)<br>>     NewPath = Path<br>>     compileall.compile_dir(NewPath)<br>><br>>     os.rename(new_name, 'scikits')<br>><br>> This just looks like a really bad idea.
<br>><br>> --<br>> Robert Kern<br>><br>> "I have come to believe that the whole world is an enigma, a harmless enigma<br>>  that is made terrible by our own mad attempt to interpret it as though it had
<br>>  an underlying truth."<br>>   -- Umberto Eco<br><br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://mail.python.org/mailman/listinfo/python-list
</a><br></blockquote></span></div></div><span class="sg"><br><br clear="all">
<br>-- <br>French PhD student<br>Website : <a href="http://matthieu-brucher.developpez.com/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://matthieu-brucher.developpez.com/</a><br>Blogs : <a href="http://matt.eifelle.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://matt.eifelle.com</a> and <a href="http://blog.developpez.com/?blog=92" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://blog.developpez.com/?blog=92</a><br>LinkedIn : <a href="http://www.linkedin.com/in/matthieubrucher" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.linkedin.com/in/matthieubrucher
</a>
</span></blockquote></div><br><br clear="all"><br>-- <br>French PhD student<br>Website : <a href="http://matthieu-brucher.developpez.com/">http://matthieu-brucher.developpez.com/</a><br>Blogs : <a href="http://matt.eifelle.com">
http://matt.eifelle.com</a> and <a href="http://blog.developpez.com/?blog=92">http://blog.developpez.com/?blog=92</a><br>LinkedIn : <a href="http://www.linkedin.com/in/matthieubrucher">http://www.linkedin.com/in/matthieubrucher
</a>