Version 16 of Teapot

Updated 2007-10-10 15:23:45 by dkf

Update: The Tcl Extension Archive (teapot) client - Teacup - was shipped in ActiveTcl 8.4.14.0 as well as 8.5.0.0 Beta 6.


  1. What is Teapot?

In a Tcl development environment, if the core of Tcl is installed as individual files, it is generally done in one of two ways. Either one gets the source code , builds, and installs it [add tcler's wiki page reference for this], or one obtains an already built version and installs it [add tcler's wiki page for batteries included].

One should call this initially set of directories the installation directory.

Now, when one wants to make use of add-on extensions, one can follow a similar process: build (which may not involve much if the code is pure-tcl) and install from source code, or download and install from a site providing prebuilt packages of some sort.

LV From my personal perspective, Teapot appears to be a system consisting of a client and server, designed to help a user deal with the add-ons. I'm sure that the developers can speak more on this topic, but my initial impressions are that the teapot system provides one with the ability to build a site which can provide for users pre-built bundles of add-on code. Teapot also provides to users the ability to download these bundles into a specialized directory structure (aka a repository).

One needs then to have an init.tcl which has been modified to know to look in the specialized directory structure to see if a particular package require should be fulfilled from code residing in that directory.

The user makes use of the teacup command to install packages into their local repository. Then commands with tcl embedded make use of the modified init.tcl to locate the relevant packages.

  1. What is Teacup?

Teacup is a client program, designed to query teapot archives to determine whether the archive contains a particular package that will run on a particular hardware/operating system architecture. Teacup also has the ability to request downloads of packages, as well as the ability to install the downloaded package into a local repository, for use by suitably modified tcl shells.

  1. Why use Teapot?

Many users, over the years, have asked for centrally managed sites containing organized tcl downloads. Teapot provides such functionality.

  1. Who is allowed to use teacup?

JH writes on the activetcl mailing list:

"Any ActiveTcl user currently. We haven't fully discussed plans for open sourcing the teacup client. At this moment, I'd be a bit leary about doing it because it is in flux anyways (both server and repository).

  1. Who is allowed to use teapot?

JH writes:

"teapot administration binaries and the docs for creating these are part of the Tcl Developer's Kit (tdk). See the docs here:

http://aspn.activestate.com/ASPN/docs/Tcl_Dev_Kit/4.0/TEA_Apps.html

  1. What teapot archives exist for public use? JH says he doesn't know of anyone other than ActiveState running one yet.
  2. Who is allowed to submit new entities to be placed within the repository?
  3. How does one submit new entities to particular repositories?
  4. What security is provided against malware?

JH writes: "This process requires in-depth discussion. Preferably over well-aged bottles of scotch. Cigars and dark chocolate optional. Anyone caught trying to bribe Andreas (ak) directly will be laughed at (since he neither smokes nor drinks ... we'll leave the dark chocolate as a dark horse ;) )."

    1. How much does all this cost to use?

ActiveTcl is freely distributable. Teacup comes as part of ActiveTcl now. Thus it is free to use. Teapot, though, is part of a commercial package. See the info at tdk for more details.


Page to collect issues with the beta teapot on the 2006 conference CD

OSX

The code to link the repo into the package management is missing. The following is the code which has to go at the end of the relevant init.tcl file.

 # -*- tcl -*-
 # @date@
 # Copyright (C) 2006 ActiveState Software Inc.

 # TEAPOT LINKAGE BEGIN"
 # Standard code for setting up the default local TEAPOT repository in
 # use by this installation.

 if {![interp issafe] && ![catch {package require platform}]} {
     # Toplevel directory of the standard local per-user repository

     global __teapot
     set    __teapot {~/Library/Application Support/ActiveState/Teapot/repository}

     # Make all repository subdirectories available which can contain
     # packages for the architecture currently executing this Tcl
     # script. This code assumes a directory structure as created by
     # 'repository::localma'.

     foreach __ [platform::patterns [platform::identify]] {
         set __ [file join $__teapot package $__]

         # The tm subdirectory contains Tcl Modules. This is relevant
         # only to a tcl shell which is able to handle such.

         # The lib subdirectory on the other hand contains regular
         # packages and can be used by all Tcl shells.

         lappend ::auto_path           [file join $__ lib]
         catch {::tcl::tm::roots [list [file join $__ teapot]]}
     }
     unset __teapot __
 }
 # TEAPOT LINKAGE END

Category PackageCategory Repository