Weekly Report #1: Diving In

Weekly report for the first two weeks of the Google Summer of Code

It’s On!

On May 24, GSoC officially began, and I started on my first task. The Python wiki page for Distutils2 lists my tasks under the “Distutils build tool” heading, i.e. “Distutils build command improvements”; the first one is adding a configure command to d2 (nickname for distutils2 on IRC, cause you know, we don’t have the time to type all these letters on the internets).

Learning Is Working Too

I did not manage to work more than 20-odd hours during the fisrt week. I did the first item off my list, studying 4Suite’s config command. Results of this are on my scratchpad.

To understand how it all works, I also read the build* and install* classes in Distutils2, and the base Command class. The picture starts to look quite clear in my mind. I refreshed some of my memories on docs.python.org/{install,distutils}, and acquired new knowledge by reading the Hitchhiker’s Guide to Packaging and the discussion threads on the associated google group. That will prove more useful in dealing with people (e.g. to switch a project to Distutils2) than to write code, but I think it was not wasted time. My mentor Titus agreed on that last point :)

Getting My Hands Dirty

During the second week, I’ve made progress with the configure command. I’ve learned a lot about the Command API and the relationships between commands, options, distribution and metadata. At the time of writing I’m nearly done with the basic command (with only two options for this first step) and I should be able to ask for review. I’ve read some test modules but not all of them; I’ll need to find how to use support code to write test that deal with file I/O, since my command writes and reads a file, or maybe write that support code. I expect this command to be ready by Monday 7 or 14.

While reading the code, I’ve made some small edits to fix py3k deprecation warnings and one bug. Tarek has merged them; you can see them on his repo or mine. I’ve also collected a number of typos and minor nitpicks; I’ll wait for the end of the summer for these unimportant things.

Prospects

When I’m done with the configure command or waiting for feedback, I’ll start on killing setup.py scripts, first with #8252 (a metadata section for setup.cfg), then proceed to #8253 (describe Python files and other resources). I guess I’ll need a week or two.

I’m a bit disappointed by the results I have so far considering the time I’ve spent on front of my computer. I tend to be easily distracted and need some time to warm up and get coding. Perhaps I need to stay off IRC and email to focus. That said, it’s a great learning and coding experience, made even better by the nice people involved.

I’ve been wavering between two designs for the configure command, but putting it on paper helped me see the tradeoffs and choose one. Even if it’s shot down, at least it will be coherent :)

Advertisements
This entry was posted in GSoC and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s