Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
tools:cpm [2017-02-01 13:21] – created mh | tools:cpm [2018-05-14 11:12] – [Available Packages] mh | ||
---|---|---|---|
Line 2: | Line 2: | ||
===== Overview ===== | ===== Overview ===== | ||
+ | |||
+ | The Curry Package Manager (CPM) is a tool to distribute and | ||
+ | install Curry libraries and applications and manage version dependencies | ||
+ | between them. | ||
+ | These libraries are organized in packages. | ||
+ | There is a central index of all these packages which can | ||
+ | easily be downloaded by CPM. | ||
+ | The individual packages are currently not stored in a central | ||
+ | server but their source can be anywhere. | ||
+ | CPM organizes the automatic access to appropriate versions | ||
+ | of these packages so that a user does not need to know | ||
+ | about these details. | ||
+ | |||
+ | CPM also supports //semantic versioning//, | ||
+ | whether a new minor version of a package is consistent | ||
+ | (w.r.t. its API and behavior) with a previous version of | ||
+ | the same package. | ||
+ | |||
+ | ===== Available Packages ===== | ||
+ | |||
+ | There are more than [[http:// | ||
+ | (including more than 600 modules). | ||
+ | There is a [[http:// | ||
+ | with more detailed information (e.g., API documentation). | ||
+ | These packages can immediately be downloaded or installed when CPM is installed (see below). | ||
+ | |||
+ | |||
+ | ===== Installing the Curry Package Manager ===== | ||
+ | |||
+ | CPM is already part of recent distributions of the Curry systems | ||
+ | [[http:// | ||
+ | [[http:// | ||
+ | If you have some older version of PAKCS or KiCS2, you can also | ||
+ | install CPM from its public repository. | ||
+ | The installation requires that one of the Curry systems PAKCS or KiCS2 | ||
+ | is installed and the executables '' | ||
+ | (if '' | ||
+ | of your Curry system by modifying the definition of '' | ||
+ | in the '' | ||
+ | Then perform the following steps to install CPM: | ||
+ | |||
+ | 1> git clone https:// | ||
+ | 2> cd cpm | ||
+ | 3> make | ||
+ | |||
+ | If this was successful, the binary '' | ||
+ | directory '' | ||
+ | of applications distributed as packages. For convenient use, you should add the | ||
+ | directory '' | ||
+ | the binary '' | ||
+ | link from some path directory to this binary. | ||
+ | |||
+ | ===== Quick Start ===== | ||
+ | |||
+ | Now you can clone a copy of the central package index repository by | ||
+ | |||
+ | > cypm update | ||
+ | |||
+ | Afterwards, you can show a short list of all packages in this index by | ||
+ | |||
+ | > cypm list | ||
+ | |||
+ | The command | ||
+ | |||
+ | > cypm info PACKAGE | ||
+ | |||
+ | can be used to show more information about a package. | ||
+ | |||
+ | In order to use a package in your Curry program which you intend | ||
+ | to develop, you have to start a new project. | ||
+ | Note that your project can also contribute to the Curry packages. | ||
+ | Therefore, to initialize it and use other packages, you need | ||
+ | a package description file in some project directory. | ||
+ | All this can be created by the command '' | ||
+ | |||
+ | > cypm new myproject | ||
+ | |||
+ | This command creates a new project directory '' | ||
+ | containing an initial package description file '' | ||
+ | and a subdirectory '' | ||
+ | If you need some other package for your project, | ||
+ | add it as a dependency in '' | ||
+ | Then run | ||
+ | |||
+ | > cypm install | ||
+ | |||
+ | to install all dependencies of the current package. | ||
+ | Afterwards, start your interactive Curry environment by | ||
+ | |||
+ | > cypm curry | ||
+ | |||
+ | and you will be able to load the modules of the current package | ||
+ | as well as all dependent packages. | ||
+ | In particular, the source directory '' | ||
+ | so that you can directly load any program you have stored | ||
+ | in this directory. | ||
+ | For instance, if the module '' | ||
+ | directory '' | ||
+ | (e.g., KiCS2 or PAKCS) by | ||
+ | |||
+ | > cypm curry :load Main | ||
+ | |||
+ | ===== Manual and Further Documentation ===== | ||
+ | |||
+ | For further information, | ||
+ | |||
+ | A detailed description about CPM and its implementation can be found | ||
+ | in the following thesis: | ||
+ | |||
+ | [[https:// | ||
+ | ===== Uploading and Publishing Packages ===== | ||
+ | |||
+ | Currently, there is no support for automatically uploading | ||
+ | and publishing new packages. | ||
+ | However, if you have developed some package that might be of | ||
+ | interest to other Curry users, please send the package | ||
+ | as a tar or zip file to | ||
+ | |||
+ | packages (AT) curry-language.org | ||
+ | |||
+ | in order to make it publicly available. | ||
+ | |||