tcl-hacks

Check-in [6f520aa71c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:use-cases and more readme
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6f520aa71c859224eea099640efae359ea85ea47
User & Date: aspect 2018-05-30 10:26:23
Context
2018-05-30
10:57
seperate tclenv.txt from tipple.txt, document some more check-in: b7067b3f66 user: aspect tags: trunk
10:26
use-cases and more readme check-in: 6f520aa71c user: aspect tags: trunk
08:45
tipple init first draft check-in: d393e032d2 user: aspect tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tipple/README.md.

18
19
20
21
22
23
24

25
26
27
28
29
30
31
..
37
38
39
40
41
42
43
44





45
46
47
48
49
50
51
..
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92


93
94
95
96
97
98
99
...
129
130
131
132
133
134
135










136
137
138
139
140
141
142
 * any of `curl`, `wget`, `fetch`
 * for installing from repos, `git`, `fossil`

Non-goals:

 * building extensions from source.  Those can come from a teapot
 * doing more than the 80% necessary to bootstrap newbies



## Synopsis

    ./tipple init DIR

Create a new environment in `DIR`
................................................................................
    DIR/bin/tclsh

Run system `tclsh` with environment from `DIR/bin/activate`.

    tipple install PKG ?VERSION? ?ARCH?
    tipple install REPO-URL ?CHECKOUT?

Add packages to environment







## Filesystem

Tipple creates a project directory consisting of:

    bin/        -- executables
................................................................................
 * tarball:  local or remote path to archive, which must be *well-behaved*
 * filesystem path:  local path to directory, which must be *well-behaved*
 * git repo:  `git+$url`, must be *well-behaved*
 * fossil repo:  `fossil+$url`, must be *well-behaved*

A *well-behaved* package source is expected to Install Correctly by the following means:

    cp -a lib/*     DIR/lib/
    cp -a modules/* DIR/modules/
    cp -a bin/*     DIR/bin/

It must *not*:

 * rely at runtime on anything not in these directories
 * require path-dependent preprocessing




## Metadata

It's useful for tipple to:

 * track what packages it has already installed in a repo
................................................................................
    require git+https://github.com/somebody/somepackage
    require git+https://github.com/somebody/somepackage branch-or-tag-or-commit-id
    
    # require from fossil, latest trunk or specific checkout
    require fossil+https://chiselapp.com/user/somebody/repository/somepackage
    require fossil+https://chiselapp.com/user/somebody/repository/somepackage branch-or-tag-or-commit-id












## Inspiration / see also

 * <https://teaparty.rkeene.org/> - `teapot-client` from here is used
 * <https://github.com/wduquette/tcl-quill/>
 * <https://github.com/AngryLawyer/mug/>
 * python's `pip` + `virtualenv`







>







 







|
>
>
>
>
>







 







|
|






>
>







 







>
>
>
>
>
>
>
>
>
>







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
..
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
..
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
...
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
 * any of `curl`, `wget`, `fetch`
 * for installing from repos, `git`, `fossil`

Non-goals:

 * building extensions from source.  Those can come from a teapot
 * doing more than the 80% necessary to bootstrap newbies
 * installing Tcl


## Synopsis

    ./tipple init DIR

Create a new environment in `DIR`
................................................................................
    DIR/bin/tclsh

Run system `tclsh` with environment from `DIR/bin/activate`.

    tipple install PKG ?VERSION? ?ARCH?
    tipple install REPO-URL ?CHECKOUT?

Add packages to environment, from any of:

 * teapot
 * a local directory or tarball
 * a tarball on the internet
 * a fossil or git repository


## Filesystem

Tipple creates a project directory consisting of:

    bin/        -- executables
................................................................................
 * tarball:  local or remote path to archive, which must be *well-behaved*
 * filesystem path:  local path to directory, which must be *well-behaved*
 * git repo:  `git+$url`, must be *well-behaved*
 * fossil repo:  `fossil+$url`, must be *well-behaved*

A *well-behaved* package source is expected to Install Correctly by the following means:

    cp -a lib/*     $TCLLIBPATH
    cp -a modules/* $TCL8_6_TM_PATH
    cp -a bin/*     DIR/bin/

It must *not*:

 * rely at runtime on anything not in these directories
 * require path-dependent preprocessing

*(means to install packages according to metadata in the form of `tipple.txt` or other "blessed" formats will come soon)*


## Metadata

It's useful for tipple to:

 * track what packages it has already installed in a repo
................................................................................
    require git+https://github.com/somebody/somepackage
    require git+https://github.com/somebody/somepackage branch-or-tag-or-commit-id
    
    # require from fossil, latest trunk or specific checkout
    require fossil+https://chiselapp.com/user/somebody/repository/somepackage
    require fossil+https://chiselapp.com/user/somebody/repository/somepackage branch-or-tag-or-commit-id


## Use cases (mostly articulated by stevel)

 * I want to install my own copies of packages that are not installed on the system, and I may not have root
 * I want to install a more up-to-date copy of a package that is already installed on the system
 * I want to wrap a script (as a starpack or just an archive) and include a copy of the dependent packages
 * I want to run a script to download and install all the dependencies of a package or script that I have
 * I want to publish a script or package that I have made, so users can easily install it with its dependencies
 * I want to use a modified version of a third-party package in my project


## Inspiration / see also

 * <https://teaparty.rkeene.org/> - `teapot-client` from here is used
 * <https://github.com/wduquette/tcl-quill/>
 * <https://github.com/AngryLawyer/mug/>
 * python's `pip` + `virtualenv`