diff options
| author | FELD Boris <lothiraldan@gmail.com> | 2011-01-29 14:41:47 +0100 |
|---|---|---|
| committer | FELD Boris <lothiraldan@gmail.com> | 2011-01-29 14:41:47 +0100 |
| commit | bf859bd253878417188bc630f6c2015dbc50a140 (patch) | |
| tree | 7244579b833f88bab4d49c890d44bc33904f1013 /docs | |
| parent | 9ece9dd515d066312d41d436715e4245bf6a8ea1 (diff) | |
| download | disutils2-bf859bd253878417188bc630f6c2015dbc50a140.tar.gz | |
Add example for data-files documentation
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/design/wiki.rst | 6 | ||||
| -rw-r--r-- | docs/source/setupcfg.rst | 121 |
2 files changed, 106 insertions, 21 deletions
diff --git a/docs/design/wiki.rst b/docs/design/wiki.rst index 11b3058..e8ed1bf 100644 --- a/docs/design/wiki.rst +++ b/docs/design/wiki.rst @@ -250,8 +250,8 @@ Here's where we want the files to end up in a typical Linux distribution: == ==================================== =================================================================================================== 1 mailman/database/schemas/blah.schema /var/mailman/schemas/blah.schema 2 some.tpl /var/mailman/templates/some.tpl -3 path/to/some.tpl /var/mailman/templates/path/to/some.tpl -4 mailman/database/mailman.db /var/mailman/database/mailman.db +3 path/to/some.tpl /var/mailman/templates/path/to/some.tpl ! +4 mailman/database/mailman.db /var/mailman/database/mailman.db ! 5 developer-docs/index.txt /usr/share/doc/mailman/developer-docs/index.txt 6 developer-docs/api/toc.txt /usr/share/doc/mailman/developer-docs/api/toc.txt 7 README /usr/share/doc/mailman/README @@ -259,7 +259,7 @@ Here's where we want the files to end up in a typical Linux distribution: 9 mailman/foo/some/path/bar/my.cfg /etc/mailman/baz/some/path/bar/my.cfg AND /etc/mailman/hmm/some/path/bar/my.cfg + emit a warning -10 mailman/foo/some/path/other.cfg /etc/mailman/some/path/other.cfg +10 mailman/foo/some/path/other.cfg /etc/mailman/some/path/other.cfg ! 11 some-new-semantic.sns /var/funky/mailman/some-new-semantic.sns == ==================================== =================================================================================================== diff --git a/docs/source/setupcfg.rst b/docs/source/setupcfg.rst index 6885d1d..fe31e71 100644 --- a/docs/source/setupcfg.rst +++ b/docs/source/setupcfg.rst @@ -163,24 +163,6 @@ It means that every file which match the glob_syntax will be placed in the desti The destination path will be expanded at the installation time using categories's default-path in the sysconfig.cfg file in the system. For more information about categories's default-paths, take a look at next next sub-section destination_. -So, if you have this source tree:: - - mailman-1.0/ - README - scripts/ - start.sh - start.py - start.bat - LAUNCH - docs/ - index.rst - mailman/ - databases/ - main.db - mailman.py - - - .. _globsyntax: @@ -257,6 +239,109 @@ A special category exists, named {distribution.name} which will be expanded into So, if you have this destination path : **{help}/api**, it will be expanded into **{datadir}/{distribution.name}/api**. {datadir} will be expanded depending on your system value (ex : confdir = datadir = /usr/share/). + +Simple-example +-------------- + +Source tree:: + + babar-1.0/ + README + babar.sh + launch.sh + babar.py + +Setup.cfg:: + + [RESOURCES] + README = {doc} + *.sh = {scripts} + +So babar.sh and launch.sh will be placed in {scripts} directory. + +Now let's create to move all the scripts into a scripts/directory. + +Second-example +-------------- + +Source tree:: + + babar-1.1/ + README + scripts/ + babar.sh + launch.sh + LAUNCH + babar.py + +Setup.cfg:: + + [RESOURCES] + README = {doc} + scripts/ LAUNCH = {scripts} + scripts/ *.sh = {scripts} + +It's important to use the separator after scripts/ to install all the bash scripts into {scripts} instead of {scripts}/scripts. + +Now let's add some docs. + +Third-example +------------- + +Source tree:: + + babar-1.2/ + README + scripts/ + babar.sh + launch.sh + LAUNCH + docs/ + api + man + babar.py + +Setup.cfg:: + + [RESOURCES] + README = {doc} + scripts/ LAUNCH = {doc} + scripts/ *.sh = {scripts} + doc/ * = {doc} + doc/ man = {man} + +You want to place all the file in the docs script into {doc} category, instead of man, which must be placed into {man} category, we will use the order of declaration of globs to choose the destination, the last glob that match the file is used. + +Now let's add some scripts for windows users. + +Final example +------------- + +Source tree:: + + babar-1.3/ + README + doc/ + api + man + scripts/ + babar.sh + launch.sh + babar.bat + launch.bat + LAUNCH + +Setup.cfg:: + + [RESOURCES] + README = {doc} + scripts/ LAUNCH = {doc} + scripts/ *.{sh,bat} = {scripts} + doc/ * = {doc} + doc/ man = {man} + +We use brace expansion syntax to place all the bash and batch scripts into {scripts} category. + command sections ================ |
