<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Everything technical &#187; Django</title>
	<atom:link href="http://www.lbotti.net/blog/tag/django/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lbotti.net/blog</link>
	<description>Linux, Java, Python...just techie blogging</description>
	<lastBuildDate>Mon, 30 Aug 2010 12:45:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Surfing</title>
		<link>http://www.lbotti.net/blog/2010/01/12/surfing/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.lbotti.net/blog/2010/01/12/surfing/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 22:57:15 +0000</pubDate>
		<dc:creator>lucabotti</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.lbotti.net/blog/?p=210</guid>
		<description><![CDATA[Sometimes I get lost in the Web, just following links after link for new ideas, following a vague plan of action, multiplying tabs and relying on browser&#8217;s session restore capabilities and tab and bookmark syncing. Tonight, after a full day of work, the gym, the dinner and some chatting with my lovely wife, I had [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes I get lost in the Web, just following links after link for new ideas, following a vague plan of action, multiplying tabs and relying on browser&#8217;s session restore capabilities and tab and bookmark syncing.<br />
Tonight, after a full day of work, the gym, the dinner and some chatting with my lovely wife, I had one of this session on the sofa (thanks to netbook magic, the fully working Samsung NC10 with F12 and about 4hrs battery life..).<br />
Anyway, I discovered some interesting projects. the first is a <a title='Original Link: http://www.djangoproject.org'  href="http://www.lbotti.net/blog/?bgJTR4jn">Django</a> powered software forge (think <a title='Original Link: http://sourceforge.net'  href="http://www.lbotti.net/blog/?AQG01XFl">sourceforge</a> plus <a title='Original Link: http://trac.edgewall.org'  href="http://www.lbotti.net/blog/?w2QFcd6d">trac</a>): <a title='Original Link: http://basieproject.org'  href="http://www.lbotti.net/blog/?x9Npk1Vd">basie</a> is a MIT licensed software which is growing up from an academic world, and I shall admit to find it intriguing, and an interesting candidate to the trac position.<br />
Next one is the <a title='Original Link: http://moss.wikidot.com/buildhaus'  href="http://www.lbotti.net/blog/?dBAqTXrU">Python Buildhaus Project</a>, which goal is to setup a build system for Python packages against multiple architectures / OSes / python environments: infrastructure will be provided by the <a title='Original Link: http://www.snakebite.org'  href="http://www.lbotti.net/blog/?40DKTMYj">Snakebite</a> project, which goal is to make available as many platforms as possible to test open source software builds.<br />
Finally, a nice old blog entry regarding <a title='Original Link: http://blog.james-carr.org/2006/11/03/tdd-anti-patterns/'  href="http://www.lbotti.net/blog/?ESNni5KH">TDD AntiPatterns</a>.<br />
Lot of stuff. Will keep an eye on those (and perhaps contribute to basie, who knows&#8230;).</p>
  
<div class="wp_license">
<p><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" alt="Creative Commons Attribution-ShareAlike 3.0 Unported" class="alignleft" style="margin-top:4px;" />
</a>This work  is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported</a>.</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.lbotti.net/blog/2010/01/12/surfing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pinax Dependencies &#8211; django-extensions</title>
		<link>http://www.lbotti.net/blog/2009/08/24/pinax-dependencies/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.lbotti.net/blog/2009/08/24/pinax-dependencies/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 03:55:44 +0000</pubDate>
		<dc:creator>lucabotti</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Packaging]]></category>
		<category><![CDATA[Pinax]]></category>

		<guid isPermaLink="false">http://www.lbotti.net/blog/?p=184</guid>
		<description><![CDATA[Ok, so I checked Pinax dependencies and found some external libs to be packaged before being able to completely package Pinax. This packages will form the &#8220;depends&#8221; line of Pinax itself. Looking carefully, the first one is named django_extensions, but really the name should be &#8220;django-extensions&#8221;, and you can find the project with the not [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so I checked <a title='Original Link: http://pinaxproject.com/docs/0.5.1/dependencies.html'  href="http://www.lbotti.net/blog/?aZmfuYB8" target="_blank">Pinax dependencies</a> and found some external libs to be packaged before being able to completely package Pinax. This packages will form the &#8220;depends&#8221; line of Pinax itself.</p>
<p>Looking carefully, the first one is named django_extensions, but really the name should be &#8220;django-extensions&#8221;, and you can find the project with the not intuitive name of &#8220;django-commandline-extensions&#8221; <a title='Original Link: http://code.google.com/p/django-command-extensions/'  href="http://www.lbotti.net/blog/?qJ3QnbdI" target="_blank">here</a> at googlecode.</p>
<p>Ok, let&#8217;s see the spec file:</p>
<blockquote><p>%{!?python_sitelib: %define python_sitelib %(%{__python} -c &#8220;from distutils.sysconfig import get_python_lib; print get_python_lib()&#8221;)}</p>
<p>Name:           django-extensions<br />
Version:        0.4.1<br />
Release:        1%{?dist}<br />
Summary:        Django command line extensions</p></blockquote>
<p>Up to this point, standard stuff. The {?dist} should stand for &#8220;current distribution&#8221;, so it will end in a &#8220;fc11&#8243; package.</p>
<blockquote><p>Group:          Development/Languages<br />
License:        BSD<br />
URL:            http://code.google.com/p/django-command-extensions/<br />
Source0:        %{name}-%{version}.tar.gz<br />
Source1:        %{name}-docs-%{version}.tar.gz</p></blockquote>
<p>The Group is standard for Python / Django libraries. License is taken from the project&#8217;s homepage, source is the standard .tar.gz file which is downloaded from the front page of the project. Source1 is extracted from the <a title='Original Link: http://github.com/django-extensions/django-extensions/tree/master'  href="http://www.lbotti.net/blog/?WXOwTwJJ" target="_blank">github</a> 0.4.1 tag of the project and contains just the documentation to be built.</p>
<blockquote><p>BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)</p>
<p>BuildArch:      noarch<br />
BuildRequires:  python-devel python-sphinx<br />
Requires:       Django</p>
<p>%description<br />
This is a repository for collecting global custom management extensions<br />
for the Django Framework</p></blockquote>
<p>The buildroot path is standard, arch is noarch (just python code&#8230;), the build requires gets the addition of <a title='Original Link: http://sphinx.pocoo.org/'  href="http://www.lbotti.net/blog/?UJUcmz33" target="_blank">python-sphinx</a> (python documentation generator) which, at buildtime, generates html documentation from .rst files. Obviously runtime requirements are Django, while the description is a copy and paste from the project home page.</p>
<blockquote><p>%package doc<br />
Summary:        Documentation for django-extensions<br />
Group:          Documentation<br />
Requires:       %{name} = %{version}-%{release}<br />
Provides:       %{name}-docs = %{version}-%{release}<br />
Obsoletes:      %{name}-docs &lt; %{version}-%{release}</p>
<p>%description doc<br />
This package contains the documentation for the django-extension library</p></blockquote>
<p>Wait a minute, what is this? Exactly, we are building not one but two packages. One for code, one for doc.</p>
<blockquote><p>%prep<br />
%setup -q -n %{name}-%{version}<br />
%setup -a 1</p></blockquote>
<p>Ok, now things become interesting. According to both the <a title='Original Link: http://docs.fedoraproject.org/drafts/rpm-guide-en/ch21s02.html'  href="http://www.lbotti.net/blog/?mc7Hmlsx" target="_blank">Fedora Project RPM Guide</a> and the <a title='Original Link: http://www.rpm.org/max-rpm-snapshot'  href="http://www.lbotti.net/blog/?9kuJskde">Maximum RPM</a> book on rpm.org, the above section reads as: prepare environment; extract first source file silently in a directory named $name-$version (e.g. django-extension-0.4.1), then extract the second source file after changing directory to the newly created directory. This is necessary because I compressed just the docs directory level in the git-donwloaded file.</p>
<blockquote><p>%build<br />
%{__python} setup.py build</p>
<p>%install<br />
rm -rf $RPM_BUILD_ROOT<br />
%{__python} setup.py install -O1 &#8211;skip-build &#8211;root $RPM_BUILD_ROOT</p>
<p>(cd docs &amp;&amp; make html)</p></blockquote>
<p>All this stuff comes standard creating an empty python spec file, apart from the last line, which builds the html documentation. This is suggested also by Django spec file (go get it with a yumdownloader &#8211;source Django and rpm -ivh the src.rpm).</p>
<blockquote><p>%clean<br />
rm -rf $RPM_BUILD_ROOT</p>
<p>%files<br />
%defattr(-,root,root,-)<br />
%{python_sitelib}/*</p></blockquote>
<p>Standard stuff again.</p>
<blockquote><p>%files doc<br />
%doc docs</p></blockquote>
<p>doc packages files</p>
<blockquote><p>%changelog<br />
* Sun Aug 23 2009 Luca Botti &lt;lucabotti&#8230;fedoraproject.org&gt;<br />
- Initial RPM Release</p></blockquote>
<p>changelog description.</p>
<p>This file is uploaded at my <a title='Original Link: http://lucabotti.fedorapeople.org/'  href="http://www.lbotti.net/blog/?8SAQd_pX" target="_blank">fedorapeople.org</a>&#8216;s address and is submitted in bugzilla for review <a title='Original Link: https://bugzilla.redhat.com/show_bug.cgi?id=518857'  href="http://www.lbotti.net/blog/?J9ZWySOK" target="_blank">here</a>. I am waiting for sponsorship. Thanks.</p>
<p>More packages will follow. Stay tuned.</p>
  
<div class="wp_license">
<p><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img src="http://i.creativecommons.org/l/by-sa/3.0//88x31.png" alt="Creative Commons Attribution-ShareAlike 3.0 Unported" class="alignleft" style="margin-top:4px;" />
</a>This work  is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported</a>.</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.lbotti.net/blog/2009/08/24/pinax-dependencies/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Building RPMs, part two &#8211; Pinax</title>
		<link>http://www.lbotti.net/blog/2009/08/23/building-rpms-part-two-pinax/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.lbotti.net/blog/2009/08/23/building-rpms-part-two-pinax/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 15:55:33 +0000</pubDate>
		<dc:creator>lucabotti</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Licensing]]></category>
		<category><![CDATA[Netbook]]></category>
		<category><![CDATA[Packaging]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://people.byte-code.com/lbotti/?p=56</guid>
		<description><![CDATA[Ok, so now we have the environment complete. First thing I want to package is Pinax. This is a nice little collection of Django applications which add some required stuff for most of web based applications. On the link above you will find all the info for the project, so let&#8217;s start. We will build [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so now we have the environment complete. First thing I want to package is <a title="Pinax" title='Original Link: http://pinaxproject.com/'  href="http://www.lbotti.net/blog/?lHD_YdIN" target="_blank">Pinax</a>. This is a nice little collection of Django applications which add some required stuff for most of web based applications.</p>
<p>On the link above you will find all the info for the project, so let&#8217;s start. We will build the release version of Pinax (for development versions I have a side project, which I will show you at right time). Please note &#8211; all the release used are current for the day this entry has been written.</p>
<p>Download pinax version 0.5.1 from <a title='Original Link: http://downloads.pinaxproject.com/pinax-0.5.1.tar.gz'  href="http://www.lbotti.net/blog/?ODh6AOjx">here</a> and put it in rpmbuild/SOURCES. After that:</p>
<blockquote><p>cd ~/rpmbuild/SPECS</p>
<p>rpmdev-newspec -t python pinax</p></blockquote>
<p>Rpmdev-newspec creates the skeleton for a new spec file named pinax. The -t python option tells to create a skeleton  with some python definitions in it (python definitions are laid out according to this <a title='Original Link: http://fedoraproject.org/wiki/Packaging:Python'  href="http://www.lbotti.net/blog/?vFV1KQHw" target="_blank">wiki entry</a> on the Fedora Project Wiki); you can see which skeletons are available looking in &#8216;\etc\rpmdevtools&#8217;.</p>
<p>Why Python? Well, my guess is that being DJango a <span style="text-decoration: underline;">Python</span> framework, you know&#8230;.</p>
<p>Let&#8217;s look at the spec file and put some info into that. You can use any editor for the file (I use <a title='Original Link: http://www.geany.org/'  href="http://www.lbotti.net/blog/?oWVTdap3" target="_blank">geany</a>, fast and lightweight).</p>
<blockquote><p># sitelib for noarch packages, sitearch for others (remove the unneeded one)<br />
%{!?python_sitelib: %global python_sitelib %(%{__python} -c &#8220;from distutils.sysconfig import get_python_lib; print get_python_lib()&#8221;)}<br />
%{!?python_sitearch: %global python_sitearch %(%{__python} -c &#8220;from distutils.sysconfig import get_python_lib; print get_python_lib(1)&#8221;)}</p>
<p>Name:           pinax<br />
Version:<br />
Release:        1%{?dist}<br />
Summary:</p>
<p>Group:          Development/Languages<br />
License:<br />
URL:<br />
Source0:<br />
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)</p>
<p>BuildArch:<br />
BuildRequires:  python-devel</p></blockquote>
<p>I am assuming that Pinax is a pure python package, so we use the sitelib for noarch packages (first line of the two provided). After that we have to insert some descriptive info of the Pinax project.</p>
<p>But, of course, before going ahead we must check some of the <a title='Original Link: http://pinaxproject.com/docs/0.5.1/dependencies.html'  href="http://www.lbotti.net/blog/?aZmfuYB8" target="_blank">Pinax dependencies</a>.</p>
<p>Continuing tomorrow&#8230;</p>
  
<div class="wp_license">
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img src="http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png" alt="Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported" class="alignleft" style="margin-top:4px;" />
</a>This work  is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported</a>.</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.lbotti.net/blog/2009/08/23/building-rpms-part-two-pinax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting lost</title>
		<link>http://www.lbotti.net/blog/2009/06/25/getting-lost/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.lbotti.net/blog/2009/06/25/getting-lost/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 12:06:20 +0000</pubDate>
		<dc:creator>lucabotti</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Packaging]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[RPM]]></category>

		<guid isPermaLink="false">http://people.byte-code.com/lbotti/?p=40</guid>
		<description><![CDATA[At Byte-code meetup I just launched the idea for a new projet to support the Prince2 project management methodology. Right now, I just registered at sourceforge and nothing else. But the plan is clear (and will be managed in a Prince2 manner, by the way): Django / Python powered GPL v2 Integration with external tools [...]]]></description>
			<content:encoded><![CDATA[<p>At <a title="Byte-Code 2009 Meetup" title='Original Link: http://www.byte-code.com/meetup2009/'  href="http://www.lbotti.net/blog/?zl9nYqKI" target="_blank">Byte-code meetup</a> I just launched the idea for a new projet to support the Prince2 project management methodology.</p>
<p>Right now, I just registered at sourceforge and nothing else. But the plan is clear (and will be managed in a Prince2 manner, by the way):</p>
<ul>
<li><a title='Original Link: http://www.djangoproject.com/'  href="http://www.lbotti.net/blog/?0CeP8aRr" target="_blank">Django</a> / Python powered</li>
<li>GPL v2</li>
<li>Integration with external tools ( <a title="trac" title='Original Link: http://trac.edgewall.org'  href="http://www.lbotti.net/blog/?w2QFcd6d">trac</a> comes to mind, but also <a title='Original Link: http://www.taskjuggler.org/'  href="http://www.lbotti.net/blog/?MCJG0_Jp" target="_blank">taskjuggler</a> )</li>
</ul>
<p>Django is a little hazard &#8211; never programmed seriously in Python, and the Django world is a new one for me. Anyway, I am just willing to move away from the Java world for a while.</p>
<p>Now comes the best &#8211; I will try to do it using <strong>Fedora way</strong> . This means that every additional package (Python or  Django)   will be rpm&#8217;ed.</p>
<p>Django by itself it&#8217;s a no-brainer &#8211; just <em>yum install Django</em> (observe the capital &#8216;D&#8217; here), but I was looking at <a title="Pinax" title='Original Link: http://pinaxproject.com/'  href="http://www.lbotti.net/blog/?lHD_YdIN" target="_blank">Pinax</a> and some more Django extensions, mostly hosted at google code.</p>
<p>Benefits of this plan:</p>
<ul>
<li>Enhance package building knowledge</li>
<li>Easy installation</li>
<li>Really join fedora community</li>
</ul>
<p>So I will create a new category, starting today, where I will summarize my steps. Stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lbotti.net/blog/2009/06/25/getting-lost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
