Ask Your Question

Exact syntax for bdist

asked 2011-03-02 08:06:45 +0200

kcrisman gravatar image

updated 2011-05-12 15:54:41 +0200

Kelvin Li gravatar image

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 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

but the following in sage-sage

if [ "$1" = '-bdist' -o "$1" = "--bdist" ]; then
   if [ $# -ne 2 ]; then
       echo >&2 "** MISSING VERSION NUMBER! **"
       exit 1
   sage-bdist $2 "$SAGE_ROOT"
   exit $?

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.)

edit retag flag offensive close merge delete


Also, any other bdist syntax info you think is appropriate here would be just fine - we want this searchable!

kcrisman gravatar imagekcrisman ( 2011-03-02 08:07:12 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2011-03-02 16:49:22 +0200

Mike Hansen gravatar image

updated 2014-08-12 07:54:33 +0200

kcrisman gravatar image

Edit: Apparently this was changed in 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 file will be created. If SAGE_APP_DMG != "no" then a .tar.gz file will be created; otherwise a .dmg file will be created.

edit flag offensive delete link more


Yeah, 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.

kcrisman gravatar imagekcrisman ( 2011-03-02 20:48:08 +0200 )edit

Also, 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.

kcrisman gravatar imagekcrisman ( 2011-03-02 20:48:37 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-03-02 08:06:45 +0200

Seen: 580 times

Last updated: Aug 12 '14