# HG changeset patch
# User J. H. Palmieri <palmieri@math.washington.edu>
# Date 1324329630 28800
# Node ID dacb4ea8712ea510106d687b92352be55163d8ae
# Parent 631821a26796c74da14b093f0e129b18e260c9ad
#9419: documentation on format of SPKG.txt, and using "hg tag"
diff --git a/doc/en/developer/patching_spkgs.rst b/doc/en/developer/patching_spkgs.rst
a
|
b
|
the file :: |
74 | 74 | |
75 | 75 | is a patch for the file :: |
76 | 76 | |
77 | | matplotlib-1.0.1.p0/src/lib/matplotlib/finance.py.patch |
| 77 | matplotlib-1.0.1.p0/src/lib/matplotlib/finance.py |
78 | 78 | |
79 | 79 | The installation script ``matplotlib-1.0.1.p0/spkg-install`` contains the |
80 | 80 | following code to install the relevant patches:: |
81 | 81 | |
| 82 | cd src |
| 83 | |
82 | 84 | # Apply patches. See SPKG.txt for information about what each patch |
83 | 85 | # does. |
84 | 86 | for patch in ../patches/*.patch; do |
… |
… |
For example:: |
106 | 108 | (The environment variable :envvar:`UNAME` is defined by the script |
107 | 109 | ``sage-env``, and is available when ``spkg-install`` is run.) |
108 | 110 | |
109 | | Now provide a high-level explanation of your changes in |
110 | | ``SPKG.txt``. Once you are satisfied with your changes, use Mercurial |
111 | | to check in your changes with a meaningful commit message. Next, |
112 | | increment the patch level of the spkg by one, e.g. rename the |
113 | | directory ``matplotlib-1.0.1.p0`` to ``matplotlib-1.0.1.p1``. To |
114 | | produce the actual spkg file, change to the parent directory of |
| 111 | Now provide a high-level explanation of your changes in ``SPKG.txt``. |
| 112 | Note the format of ``SPKG.txt`` -- see the chapter :ref:`chapter-spkg` |
| 113 | for details. Once you are satisfied with your changes, use Mercurial |
| 114 | to check in your changes with a meaningful commit message. Then use |
| 115 | the command ``hg tag`` to tag the tip with the new version number |
| 116 | (using "p1" instead of "p0": we have made changes, so we need to |
| 117 | update the patch level):: |
| 118 | |
| 119 | $ hg tag matplotlib-1.0.1.p1 |
| 120 | |
| 121 | Next, rename the directory ``matplotlib-1.0.1.p0`` to |
| 122 | ``matplotlib-1.0.1.p1`` to match the new patch level. To produce the |
| 123 | actual spkg file, change to the parent directory of |
115 | 124 | ``matplotlib-1.0.1.p1`` and execute :: |
116 | 125 | |
117 | 126 | $ /path/to/sage-x.y.z/sage --pkg matplotlib-1.0.1.p1 |
… |
… |
binary files to the trac server. |
155 | 164 | Use patch for patching |
156 | 165 | ====================== |
157 | 166 | |
158 | | A main message of this section is: use the GNU program ``patch`` to |
| 167 | The main message of this section is: use the GNU program ``patch`` to |
159 | 168 | apply patches to files in ``src/``. GNU patch is distributed with |
160 | 169 | Sage, so if you are writing an spkg which is not part of the standard |
161 | 170 | Sage distribution, you may use ``patch`` in the ``spkg-install`` |
… |
… |
bzip2). |
201 | 210 | |
202 | 211 | To install your replacement spkg, you use :: |
203 | 212 | |
204 | | sage -f /URL/to/package-x.y.z.spkg |
| 213 | sage -f http://URL/to/package-x.y.z.spkg |
205 | 214 | |
206 | 215 | or :: |
207 | 216 | |
diff --git a/doc/en/developer/producing_spkgs.rst b/doc/en/developer/producing_spkgs.rst
a
|
b
|
The ``SPKG.txt`` file should follow this |
294 | 294 | |
295 | 295 | == SPKG Maintainers == |
296 | 296 | |
297 | | List the maintainers here |
| 297 | Put a bulleted list of the maintainers of the SPKG here: |
| 298 | |
| 299 | * Mary Smith |
| 300 | * Bill Jones |
| 301 | * Leonhard Euler |
298 | 302 | |
299 | 303 | == Upstream Contact == |
300 | 304 | |
… |
… |
The ``SPKG.txt`` file should follow this |
302 | 306 | |
303 | 307 | == Dependencies == |
304 | 308 | |
305 | | List the dependencies here |
| 309 | Put a bulleted list of dependencies here: |
| 310 | |
| 311 | * python |
| 312 | * readline |
306 | 313 | |
307 | 314 | == Special Update/Build Instructions == |
308 | 315 | |
… |
… |
The ``SPKG.txt`` file should follow this |
310 | 317 | |
311 | 318 | == Changelog == |
312 | 319 | |
313 | | Provide a changelog of the spkg here. |
| 320 | Provide a changelog of the spkg here, where the entries have this format: |
314 | 321 | |
| 322 | === mypackage-0.1.p0 (Mary Smith, 1 Jan 2012) === |
| 323 | |
| 324 | * Patch src/configure so it builds on Solaris. See Sage trac #137. |
| 325 | |
| 326 | === mypackage-0.1 (Leonhard Euler, 17 September 1783) === |
| 327 | |
| 328 | * Initial release. See Sage trac #007. |
| 329 | |
315 | 330 | When the directory (say, ``mypackage-0.1``) is ready, the command |
316 | 331 | |
317 | 332 | :: |