<?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>stick&#039;s corner &#187; osc</title>
	<atom:link href="http://stick.gk2.sk/blog/tag/osc/feed/" rel="self" type="application/rss+xml" />
	<link>http://stick.gk2.sk</link>
	<description>All composite phenomena are impermanent. All contaminated things and events are unsatisfactory.</description>
	<lastBuildDate>Sun, 05 Feb 2012 14:03:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>OSC under Windows and Mac OS X</title>
		<link>http://stick.gk2.sk/blog/2009/05/osc-under-windows-and-mac-os-x/</link>
		<comments>http://stick.gk2.sk/blog/2009/05/osc-under-windows-and-mac-os-x/#comments</comments>
		<pubDate>Fri, 15 May 2009 12:34:26 +0000</pubDate>
		<dc:creator>Pavol Rusnak</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[buildservice]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[opensuse]]></category>
		<category><![CDATA[osc]]></category>
		<category><![CDATA[tryme]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://stick.gk2.sk/blog/?p=335</guid>
		<description><![CDATA[Few months ago I tried to use OSC &#8211; our command-line client to BuildService under Windows. I failed because of the hard-coded dependency on python-rpm module, which is (of course) not present in Python package for Windows. Today I saw Feature #306354, so I decided to give it a try again. Fortunately, the recent code [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-356" title="osc-win" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/05/osc-win.png" alt="osc-win" width="128" height="128" /></p>
<p style="text-align: justify;">Few months ago I tried to use <a href="http://en.opensuse.org/Build_Service/CLI">OSC</a> &#8211; our command-line client to <a href="http://en.opensuse.org/Build_Service">BuildService</a> under Windows. I failed because of the hard-coded dependency on python-rpm module, which is (of course) not present in Python package for Windows.</p>
<p style="text-align: justify;">Today I saw <a href="https://features.opensuse.org/306354">Feature #306354</a>, so I decided to give it a try again. Fortunately, the recent code changes made this task a lot easier! <img src='http://stick.gk2.sk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  I still had to create some fixes and hacks, but they are now commited to OSC subversion and shouldn&#8217;t cause problems anymore.</p>
<p>There are two ways how to use OSC in Windows:</p>
<ul>
<li>download <a href="http://stick.gk2.sk/blog/wp-content/uploads/2009/05/osc.zip">this archive</a> (or click on the openSUSE/Windows icon above),<br />
unpack it and use <code>osc.exe</code> binary without installing the whole python distribution<br />
(this <strong>does not need</strong> administrator rights) (<strong>Obsolete!</strong> see Update #3 below)</li>
<li>install python and use osc directly from its sources<br />
(this <strong>needs</strong> administrator rights if the python is not installed)</li>
</ul>
<p>Most of the features like checkouts, checkins, editing metadata should work, but there are some osc features that are unusuable (yet) under Windows:</p>
<ul>
<li>osc build &#8211; local building of the packages</li>
<li>osc vc &#8211; automated editing of changes file &#8211; you have to change the changelogs manually</li>
</ul>
<p>If you plan to use the binary package (option 1) you don&#8217;t need to read further. However, if you are interested in how I created the package or you want to use osc directly from its sources, keep reading!</p>
<p>Follow these steps if you want to build your own Windows build of osc:</p>
<ol>
<li>install the latest <a href="http://python.org/">python</a> (I used <a href="http://www.python.org/ftp/python/2.6.2/python-2.6.2.msi">python-2.6.2.msi</a> installer and kept the default path<br />
<code>C:\Python26</code>)</li>
<li>install the latest <a href="http://www.py2exe.org/">py2exe</a> (I used <a href="http://dl.sourceforge.net/sourceforge/py2exe/py2exe-0.6.9.win32-py2.6.exe">py2exe-0.6.9.win32-py2.6.exe</a>, it should find your python distribution installed in previous step)</li>
<li>install the latest <a href="http://subversion.tigris.org/">subversion</a> client (I used the build from sliksvn.com: <a href="http://www.sliksvn.com/pub/Slik-Subversion-1.6.2-win32.msi">Slik-Subversion-1.6.2-win32.msi</a>)</li>
<li>change into your working directory and checkout the latest osc from subversion:
<pre>svn co https://forgesvn1.novell.com/svn/opensuse/trunk/buildservice/src/clientlib/python/osc</pre>
</li>
<li>change into <code>osc</code> directory</li>
<li>run py2exe:
<pre>C:\Python26\python.exe setup.py py2exe</pre>
</li>
<li>compress all files in directory <code>dist</code> into <code>osc.zip</code> and you are done! enjoy!</li>
</ol>
<p>If you want to use osc directly from its sources, just follow the steps 1, 3, 4, 5 and run:</p>
<pre>C:\Python26\python.exe osc-wrapper.py</pre>
<p>(You can save typing if you add path <code>C:\Python26</code> into your <code>%PATH%</code> variable.</p>
<p>That&#8217;s it!</p>
<p><strong>Update #1:</strong> I found out that something very similar could be acheived on Mac OS X using <a href="http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html">py2app</a> and by calling <code>python setup.py py2app</code>. However, this is usually not needed, because Mac OS X already ships with python (2.4.2 in Tiger and 2.5.1 in Leopard if I recall correctly &#8211; these are older, but running osc with them should be just fine).</p>
<p><strong>Update #2:</strong> Michael E. Brown and Shalonda Matthews from Dell reported two bugs in my build. They were caused by different behaviour of <code>mmap.mmap</code> function under Unix and Windows and the fact that function <code>os.path.sametime</code> isn&#8217;t available under Windows at all. Both problems are fixed in SVN now and I have also rebuild the <code>osc.zip</code> archive.</p>
<p><strong>Update #3:</strong> The zip archive is not maintained. Build Service requires quite new build of osc, therefore I recommend creating your own executable by following the steps described above.</p>
<p><strong>Update #4:</strong> The code has moved from Subversion to <a href="http://www.gitorious.org/opensuse/osc">Gitorious</a>. You need to install Git and run <code>git clone git://gitorious.org/opensuse/osc.git</code> instead of points #3 and #4.</p>
]]></content:encoded>
			<wfw:commentRss>http://stick.gk2.sk/blog/2009/05/osc-under-windows-and-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

