<div class="gmail_quote"><div>Hello,</div><div><br></div><div>
This is the third report of my GSoC project for Debian. During last two weeks </div><div>I've done most of things about the main tool. Before that weeks I have been</div><div> working on project's API. API is almost finished. Still I find missing/wrong </div>

<div>parts during the coding and changing the API design.</div>
<div><br></div><div>Like I said, main tool's coding process is nearly finished. For now It is doing </div><div>its job for building Python3.X packages. You can find the source code at [1].</div><div><br></div><div>I also coded an example plugin (actually only return values) and plugins/__init__.py </div>

<div>file which contains like Base class, exception classes and plugin listing method.</div>
<div><br></div><div>When I started coding I realized that I need extra parameters. I've added --install-dir</div><div> parameter. You can specify the install directory if there is no install directory the tools</div>

<div> pretends that the install directory is "./debian/tmp". After that it checks whether if the</div><div> directory exists. If not it creates the directory.</div>
<div><br></div><div>I've changed py3build.py a bit. First, I've thought for every process I invoke py3build's </div><div>methods but they are redundant. I've removed them. Now they are called in main </div>

<div>method of py3build.</div>
<div><br></div><div>I use logging module for printing messages, errors etc.</div><div><br></div><div>get_build_system() method retieves list from plugins/__init__.py file. In that file there is </div><div>scan_for_plugins() method. It finds all plugins in plugins/ directory which files match for</div>

<div> "[a-zA-Z].py". It keeps the list in plugins_list variable and returns that. When I'm writing </div><div>scan_for_plugins() method I've read codes (f.e. [2]) about that and decided to name all </div>

<div>plugins' class name as *BuildSystem*. Now, detecting method works with that way. </div><div>(all plugins' class' are called BuildSystem) And I've changed base class name to </div><div>BuildSystemBase.</div>


<div><br></div><div>get_build_system() method is used by determine_build_system() method. If there is given </div><div>build system (by parameter) it tries to use that. If that build system is not usable then give </div>

<div>error and exits. If there is no given build system. It invokes get_build_system() and iterates</div><div> that methods return value which is a list. When iterating It create an instance of that build </div><div>system class (if can not create then it gives warning and skips that build system plugin) </div>

<div>and invokes detect method and append plugin name and detect method's return value to </div><div>the bs_list which contains plugin list which are available. And then sorts it. If there is error </div><div>while sorting list or there is no usable plugin then give error and exits. If there is multiple </div>

<div>highest detect values then lists that plugins and exists. (maintainer should select one of </div><div>these plugins to build extension.)</div>
<div><br></div><div>In main method, after getting arguments, it checks for verbose mode (or 'DH_VERBOSE' </div><div>environment variable) and sets log level (logging.DEBUG or logging.WARN)</div><div><br></div><div>

If there is no given build_dir then it pretends it is "./".</div>
<div><br></div><div>After that It try to determine build system. If can not then prints error and exits.</div><div><br></div><div>And finally it starts to build extension. Firstly it checks if there is given version list. If not, </div>

<div>it uses default values and iterates build loop with that values.</div>
<div><br></div><div>First cleans, configures, builds (if there is no --test-only arg) and tests (if there is --test-only </div><div>arg or there is not --no-tests argument)</div><div><br></div><div>If there is error (raises plugin.Error) while invoking that method then prints error and exits. </div>


<div><br></div><div>In verbose mode tool prints every process. (like "configuring for PythonX.Y" etc.)</div><div><br></div><div><div>I've started writing a plugin for detecting *distutils*. For now, I only wrote its detect method. It </div>

<div>returns between 0-1.0 floating point value. If everything is OK it returns 1.0. Other methods does </div><div>nothing, only returns True but this week I'll finish this plugin and work for others.</div>
</div><div><br></div><div>For detecting distutils I've used the code at [3]. First I try to import that module if not, I've copied </div><div>required methods to plugins/_packaging.py file, I use them.</div><div>

<br></div><div>
I don't use is_distutils() method directly. For give probability I invoke what it invokes and give them </div><div>a number. (f.e. _has_setup_py has 0.5, _has_pkg_info has 0.25 and _has_distutil_text has 0.25. </div>

<div>But if _has_setup_py returns False then detect method doesn't look other methods since they </div><div>require setup.py.)</div>
<div><br></div><div>For now that's all. See you at next time.</div><div><br></div><div><span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px">[1] <span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px">git://<a href="http://git.debian.org/~mesutcan-guest/py3multibuild.git" style="color:rgb(28, 81, 168)" target="_blank">git.debian.org/~mesutcan-guest/py3multibuild.git</a></span></span><br clear="all">


[2] <a href="http://svn.berlios.de/viewvc/griffith/trunk/lib/plugins/extensions/" target="_blank">http://svn.berlios.de/viewvc/griffith/trunk/lib/plugins/extensions/</a></div><div>
[3] <span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px"><a href="http://hg.python.org/cpython/file/a7e00934baf1/Lib/packaging/util.py#l1343" style="color:rgb(28, 81, 168)" target="_blank">http://hg.python.org/cpython/file/a7e00934baf1/Lib/</a></span><span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px"><a href="http://hg.python.org/cpython/file/a7e00934baf1/Lib/packaging/util.py#l1343" style="color:rgb(28, 81, 168)" target="_blank">packaging/util.py</a></span></div>


<div><font face="arial, sans-serif"><span style="border-collapse:collapse"><br></span></font></div><div>-- <br>Mesutcan Kurt<br></div></div><br>