Package metadata, including dependencies on other packages, is reported by an "info.rkt" module within the package. This module must be implemented in the info language.
For example, a basic "info.rkt" file might be
The following "info.rkt" fields are used by the package manager:
When a package is a single collection package, its "info.rkt" file may specify additional fields that are used for the Scribble documentation system or other tools. Many of these fields are described in Controlling raco setup with "info.rkt" Files.
either 'multi to implement a multi-collection package or a string or 'use-pkg-name to implement a single-collection package. If collection is defined as a string, then the string is used as the name of the collection implemented by the package. If collection is defined as 'use-pkg-name, then the package name is used as the package’s collection name.
Beware that omitting collection or defining it as 'use-pkg-name means that a package’s content effectively changes with the package’s name. A package’s content should normally be independent of the package’s name, and so defining collection to a string is preferable for a single-collection package.
A string for a package source.
- A list of the formwhere each keyword-and-spec has a distinct keyword in the form
keyword-and-spec = '#:version version-string | '#:platform platform-spec platform-spec = string | symbol | regexp
A version-string specifies a lower bound on an acceptable version of the needed package.
A platform-spec indicates that the dependency applies only for platforms with a matching result from (system-type) when platforms-spec is a symbol or (path->string (system-library-subpath #f)) when platform-spec is a string or regular expression. See also matching-platform?. For example, platform-specific binaries can be placed into their own packages, with one separate package and one dependency for each supported platform.
- A list of the form
(list package-source-string version-string)which is deprecated and equivalent to
(list package-source-string '#:version version-string)
Each element of the deps list determines a dependency on the package whose name is inferred from the package source (i.e., dependencies are on package names, not package sources), while the package source indicates where to get the package if needed to satisfy the dependency.
Using the package name "racket" specifies a dependency on the Racket run-time system, which is potentially useful when a version is included in the dependency. For most purposes, it’s better to specify a versioned dependency on "base", instead.
See also Package Dependency Checking.
like deps, but for dependencies that can be dropped in a binary package, which does not include sources; see Source, Binary, and Built Packages and Package Dependency Checking. The build-deps and deps lists are appended, while raco pkg create strips away build-deps when converting a package for --binary mode.
a list of strings and 'core. Each string refers to a package listed in deps and indicates that a dependency on the current package counts as a dependency on the named package; for example, the gui package is defined to ensure access to all of the libraries provided by gui-lib, so the "info.rkt" file of gui lists "gui-lib" in implies. Packages listed in implies list are treated specially by updating: implied packages are automatically updated whenever the implying package is updated. The special value 'core is intended for use by an appropriate base package to declare it as the representative of core Racket libraries.
a list of strings. Each string refers to a package listed in deps or build-deps and indicates that the implied packages are automatically updated whenever the implying package is updated.
a list of path strings and/or lists of path strings, which are used as collection names to set up via raco setup after the package is installed, or 'all to indicate that all collections need to be setup. By default, only collections included in the package are set up (plus collections for global documentation indexes and links).
either 'source, 'built, or 'binary, indicating the most suitable distribution mode for the package (but not a guarantee that it will be distributed as such). Absence of this definition implies 'binary if the package has no ".rkt" or ".scrbl" files other than "info.rkt" files, and if it has any ".so", ".dll", ".dylib", or ".framework" files; otherwise, absence implies 'built.
a list of two items; the first item is 'binary, 'binary-lib, or 'built, and the second item is either #f or a string to represent a Racket version for compiled content. This information is used by raco pkg install or raco pkg update with --source, --binary, or --binary-lib to ensure that the package content is consistent with the requested conversion; see also Source, Binary, and Built Packages. Absence of this definition is treated the same as (list 'source #f).
Changed in version 18.104.22.168: Added update-implies.
Changed in version 22.214.171.124: Added distribution-preference.