Ask Your Question
0

Exact syntax for bdist

asked 14 years ago

kcrisman gravatar image

updated 13 years ago

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

Preview: (hide)

Comments

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

kcrisman gravatar imagekcrisman ( 14 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 14 years ago

Mike Hansen gravatar image

updated 10 years ago

kcrisman gravatar image

Edit: 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.

Preview: (hide)
link

Comments

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 ( 14 years ago )

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 ( 14 years ago )

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 14 years ago

Seen: 695 times

Last updated: Aug 12 '14