Since they bytecode is itself, platform independent, wouldn&#39;t it make sense to just use one directory (eg. /usr/lib/python2.6/site-packages/xxx) and symlink the /usr/lib64/... to the that directory? Assuming you have both 32-bit and 64-bit builds of Python installed, there is no sense in having to install the same exact modules twice in two different locations. <br>
<br>I would opt to install everything in /usr/lib/... since that will always be present, and then create a symlink from doit.sh if x86_64 is detected. <br><br>Just my 2 cents. <br><br><div class="gmail_quote">On Thu, May 28, 2009 at 9:48 AM, Grissiom <span dir="ltr">&lt;<a href="mailto:chaos.proton@gmail.com">chaos.proton@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi folks,<br><br>While I was taking train this afternoon, a thought came up in my mind -- SlackBuilds for python modules and many programs that written in pure python (say, <font size="2">decorator</font>, pysetuptools, logilab-common etc) should be arch dependent. Maybe most of them are installed via &quot;distutils&quot;, if you see something like &quot;python setup.py install --root=$PKG&quot;, it will be the case.<br>

<br>I think setup.py just do what &quot;./configure &amp;&amp; make &amp;&amp; make install&quot; do -- detect the python installation structure, compile .py files to .pyc bytecodes. The bytecodes is platorm independent but the installation structure is not. So in slackware64, things will be installed into /usr/lib64/python2.6/site-packages/xxx but in slackware, things will be installed into /usr/lib/python2.6/site-packages/xxx. The conclusion is the files in the package in arch indenpendent but the direcory structure is arch dependent.<br>

<br>After some hack, I found a solution for this: write the SlackBuilds like this:<br>....<br>if [ &quot;$ARCH&quot; = &quot;i486&quot; ]; then<br>  SLKCFLAGS=&quot;-O2 -march=i486 -mtune=i686&quot;<br>  LIBDIRSUFFIX=&quot;&quot;<br>

elif [ &quot;$ARCH&quot; = &quot;i686&quot; ]; then<br>  SLKCFLAGS=&quot;-O2 -march=i686 -mtune=i686&quot;<br>  LIBDIRSUFFIX=&quot;&quot;<br>elif [ &quot;$ARCH&quot; = &quot;x86_64&quot; ]; then<br>  SLKCFLAGS=&quot;-O2 -fPIC&quot;<br>

  LIBDIRSUFFIX=&quot;64&quot;<br>fi<br>....<br>....<br>python setup.py install --prefix=/usr --install-lib=/usr/lib${LIBDIRSUFFIX}/python2.6/site-packages/ --root=$PKG<br>....<br><br clear="all">Thus the package will install files to /usr/lib for 32bit slack and /usr/lib64 for slackware64.(note python in slackware12.2 is still 2.5.x you may need to adjust the install command for 12.2)<br>

<br>Saying so much, I hope I have expressed my idea clearly and it will do some help.<br><br>-- <br>Cheers,<br><font color="#888888">Grissiom<br>
</font><br>_______________________________________________<br>
SlackBuilds-users mailing list<br>
<a href="mailto:SlackBuilds-users@slackbuilds.org">SlackBuilds-users@slackbuilds.org</a><br>
<a href="http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users" target="_blank">http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users</a><br>
Archives - <a href="http://lists.slackbuilds.org/pipermail/slackbuilds-users/" target="_blank">http://lists.slackbuilds.org/pipermail/slackbuilds-users/</a><br>
FAQ - <a href="http://slackbuilds.org/faq/" target="_blank">http://slackbuilds.org/faq/</a><br>
<br>
<br></blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.dragonwisard.net/">http://www.dragonwisard.net/</a><br>