ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 02 Mar 2011 20:48:37 +0100Exact syntax for bdisthttps://ask.sagemath.org/question/7979/exact-syntax-for-bdist/I get tripped up on this all the time. What is the *exact* syntax for creating a 'canonical' binary distribution? (I assume there are scripts on [home/release](http://sage.math.washington.edu/home/release) for this, but I want this here where I can find it again.)
What I mean is what extra commands do I put in
./sage -bdist
in order to create something like `sage-4.6-OSX-32bit-10.4-i386-Darwin.dmg` or `sage-4.6.1-linux-32bit-ubuntu_10.04_lts-i686-Linux.tar`? I think that that version number comes for free, and I'm not worried about the file extension, but I don't know about the rest and want to do it right.
I THINK it is
./sage -bdist OSX-32bit-10.4-i386-Darwin
but I'm just not sure, and don't want to waste time making a mistake.
Edit: I see the following in sage-bdist
if [ $# -ne 2 ]; then
echo "Usage: $0 <SAGE_VERSION> <SAGE_ROOT>"
exit 1
fi
but the following in sage-sage
if [ "$1" = '-bdist' -o "$1" = "--bdist" ]; then
if [ $# -ne 2 ]; then
echo >&2 "** MISSING VERSION NUMBER! **"
exit 1
fi
sage-bdist $2 "$SAGE_ROOT"
exit $?
fi
is a little annoying - it's not clear whether you can even get to the 'usage' place in sage-bdist.
(Hint is that I think the answer to my question is in the rest of sage-bdist, but I'm too lazy to figure it out exactly now.)Wed, 02 Mar 2011 08:06:45 +0100https://ask.sagemath.org/question/7979/exact-syntax-for-bdist/Comment by kcrisman for <p>I get tripped up on this all the time. What is the <em>exact</em> syntax for creating a 'canonical' binary distribution? (I assume there are scripts on <a href="http://sage.math.washington.edu/home/release">home/release</a> for this, but I want this here where I can find it again.)</p>
<p>What I mean is what extra commands do I put in</p>
<pre><code>./sage -bdist
</code></pre>
<p>in order to create something like <code>sage-4.6-OSX-32bit-10.4-i386-Darwin.dmg</code> or <code>sage-4.6.1-linux-32bit-ubuntu_10.04_lts-i686-Linux.tar</code>? I think that that version number comes for free, and I'm not worried about the file extension, but I don't know about the rest and want to do it right.</p>
<p>I THINK it is </p>
<pre><code>./sage -bdist OSX-32bit-10.4-i386-Darwin
</code></pre>
<p>but I'm just not sure, and don't want to waste time making a mistake.</p>
<p>Edit: I see the following in sage-bdist</p>
<pre><code>if [ $# -ne 2 ]; then
echo "Usage: $0 <SAGE_VERSION> <SAGE_ROOT>"
exit 1
fi
</code></pre>
<p>but the following in sage-sage</p>
<pre><code>if [ "$1" = '-bdist' -o "$1" = "--bdist" ]; then
if [ $# -ne 2 ]; then
echo >&2 "** MISSING VERSION NUMBER! **"
exit 1
fi
sage-bdist $2 "$SAGE_ROOT"
exit $?
fi
</code></pre>
<p>is a little annoying - it's not clear whether you can even get to the 'usage' place in sage-bdist.</p>
<p>(Hint is that I think the answer to my question is in the rest of sage-bdist, but I'm too lazy to figure it out exactly now.)</p>
https://ask.sagemath.org/question/7979/exact-syntax-for-bdist/?comment=22033#post-id-22033Also, any other bdist syntax info you think is appropriate here would be just fine - we want this searchable!Wed, 02 Mar 2011 08:07:12 +0100https://ask.sagemath.org/question/7979/exact-syntax-for-bdist/?comment=22033#post-id-22033Answer by Mike Hansen for <p>I get tripped up on this all the time. What is the <em>exact</em> syntax for creating a 'canonical' binary distribution? (I assume there are scripts on <a href="http://sage.math.washington.edu/home/release">home/release</a> for this, but I want this here where I can find it again.)</p>
<p>What I mean is what extra commands do I put in</p>
<pre><code>./sage -bdist
</code></pre>
<p>in order to create something like <code>sage-4.6-OSX-32bit-10.4-i386-Darwin.dmg</code> or <code>sage-4.6.1-linux-32bit-ubuntu_10.04_lts-i686-Linux.tar</code>? I think that that version number comes for free, and I'm not worried about the file extension, but I don't know about the rest and want to do it right.</p>
<p>I THINK it is </p>
<pre><code>./sage -bdist OSX-32bit-10.4-i386-Darwin
</code></pre>
<p>but I'm just not sure, and don't want to waste time making a mistake.</p>
<p>Edit: I see the following in sage-bdist</p>
<pre><code>if [ $# -ne 2 ]; then
echo "Usage: $0 <SAGE_VERSION> <SAGE_ROOT>"
exit 1
fi
</code></pre>
<p>but the following in sage-sage</p>
<pre><code>if [ "$1" = '-bdist' -o "$1" = "--bdist" ]; then
if [ $# -ne 2 ]; then
echo >&2 "** MISSING VERSION NUMBER! **"
exit 1
fi
sage-bdist $2 "$SAGE_ROOT"
exit $?
fi
</code></pre>
<p>is a little annoying - it's not clear whether you can even get to the 'usage' place in sage-bdist.</p>
<p>(Hint is that I think the answer to my question is in the rest of sage-bdist, but I'm too lazy to figure it out exactly now.)</p>
https://ask.sagemath.org/question/7979/exact-syntax-for-bdist/?answer=12164#post-id-12164Edit: Apparently this was changed in http://trac.sagemath.org/ticket/15527 so now `sage -bdist` suffices, with an optional temporary directory name. Unclear if that info ever ended up documented.
When doing a bdist, you only need to provide the Sage version like
sage -bdist 4.6.3
(although you can include more info if you want). The `sage-bdist` script in `$SAGE_ROOT/local/bin/` will automatically prepend `sage-` and append
`uname -m`-`uname`
(edit by kcrisman: which typically give the chip type and OS)
So, on my system, doing `
sage -bdist 4.6.3
would produce a file starting with `sage-4.6.2-x86_64-Linux`.
On OSX, there are some environment variable which will control the type of file that is produced. If `SAGE_APP_BUNDLE=yes`, then the `Sage-4.6.3.app` file will be created. If `SAGE_APP_DMG != "no"` then a `.tar.gz` file will be created; otherwise a `.dmg` file will be created.Wed, 02 Mar 2011 16:49:22 +0100https://ask.sagemath.org/question/7979/exact-syntax-for-bdist/?answer=12164#post-id-12164Comment by kcrisman for <p>Edit: Apparently this was changed in <a href="http://trac.sagemath.org/ticket/15527">http://trac.sagemath.org/ticket/15527</a> so now <code>sage -bdist</code> suffices, with an optional temporary directory name. Unclear if that info ever ended up documented.</p>
<p>When doing a bdist, you only need to provide the Sage version like</p>
<pre><code>sage -bdist 4.6.3
</code></pre>
<p>(although you can include more info if you want). The <code>sage-bdist</code> script in <code>$SAGE_ROOT/local/bin/</code> will automatically prepend <code>sage-</code> and append</p>
<pre><code>`uname -m`-`uname`
</code></pre>
<p>(edit by kcrisman: which typically give the chip type and OS)</p>
<p>So, on my system, doing `</p>
<pre><code>sage -bdist 4.6.3
</code></pre>
<p>would produce a file starting with <code>sage-4.6.2-x86_64-Linux</code>. </p>
<p>On OSX, there are some environment variable which will control the type of file that is produced. If <code>SAGE_APP_BUNDLE=yes</code>, then the <code>Sage-4.6.3.app</code> file will be created. If <code>SAGE_APP_DMG != "no"</code> then a <code>.tar.gz</code> file will be created; otherwise a <code>.dmg</code> file will be created.</p>
https://ask.sagemath.org/question/7979/exact-syntax-for-bdist/?comment=22029#post-id-22029Also, nice reminder for the OSX variables - luckily, I was very aware of those, but it's great to have archived in a few places on the web.Wed, 02 Mar 2011 20:48:37 +0100https://ask.sagemath.org/question/7979/exact-syntax-for-bdist/?comment=22029#post-id-22029Comment by kcrisman for <p>Edit: Apparently this was changed in <a href="http://trac.sagemath.org/ticket/15527">http://trac.sagemath.org/ticket/15527</a> so now <code>sage -bdist</code> suffices, with an optional temporary directory name. Unclear if that info ever ended up documented.</p>
<p>When doing a bdist, you only need to provide the Sage version like</p>
<pre><code>sage -bdist 4.6.3
</code></pre>
<p>(although you can include more info if you want). The <code>sage-bdist</code> script in <code>$SAGE_ROOT/local/bin/</code> will automatically prepend <code>sage-</code> and append</p>
<pre><code>`uname -m`-`uname`
</code></pre>
<p>(edit by kcrisman: which typically give the chip type and OS)</p>
<p>So, on my system, doing `</p>
<pre><code>sage -bdist 4.6.3
</code></pre>
<p>would produce a file starting with <code>sage-4.6.2-x86_64-Linux</code>. </p>
<p>On OSX, there are some environment variable which will control the type of file that is produced. If <code>SAGE_APP_BUNDLE=yes</code>, then the <code>Sage-4.6.3.app</code> file will be created. If <code>SAGE_APP_DMG != "no"</code> then a <code>.tar.gz</code> file will be created; otherwise a <code>.dmg</code> file will be created.</p>
https://ask.sagemath.org/question/7979/exact-syntax-for-bdist/?comment=22030#post-id-22030Yeah, in the meantime I figured all this out in reading sage-bdist because I really wanted to bdist this thing. What was confusing was that the 'canonical' names that show up on the mirrors have a lot more information, and I wasn't sure if some of that showed up automatically, and didn't want to wait for the machine to finish bdisting to see what happened. Wed, 02 Mar 2011 20:48:08 +0100https://ask.sagemath.org/question/7979/exact-syntax-for-bdist/?comment=22030#post-id-22030