Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tools:cpm [2017-02-03 14:21] – [Overview] mh | tools:cpm [2017-05-04 17:42] – [Installing the Curry Package Manager] mh | ||
---|---|---|---|
Line 4: | Line 4: | ||
The Curry Package Manager (CPM) is a tool to distribute and | The Curry Package Manager (CPM) is a tool to distribute and | ||
- | install Curry libraries and manage version dependencies | + | install Curry libraries |
- | between | + | between |
These libraries are organized in packages. | These libraries are organized in packages. | ||
There is a central index of all these packages which can | There is a central index of all these packages which can | ||
Line 19: | Line 19: | ||
(w.r.t. its API and behavior) with a previous version of | (w.r.t. its API and behavior) with a previous version of | ||
the same package. | the same package. | ||
+ | |||
+ | The [[http:// | ||
+ | can immediately be downloaded or installed when CPM is installed (see below). | ||
+ | Using CPM, one can also obtain more detailed information about | ||
+ | individual packages. | ||
===== Installing the Curry Package Manager ===== | ===== Installing the Curry Package Manager ===== | ||
- | The installation | + | CPM is already part of recent distributions of the Curry systems |
- | in installed and the executables '' | + | [[http:// |
- | If '' | + | [[http:// |
- | of the variable | + | If you have some older version of PAKCS or KiCS2, you can also |
- | Otherwise, | + | install CPM from its public repository. |
+ | The installation | ||
+ | is installed and the executables '' | ||
+ | (if '' | ||
+ | of your Curry system by modifying | ||
+ | in the '' | ||
+ | Then perform the following steps to install CPM: | ||
- | 1> git clone https:// | + | 1> git clone https:// |
2> cd cpm | 2> cd cpm | ||
3> make | 3> make | ||
If this was successful, the binary '' | If this was successful, the binary '' | ||
- | directory '' | + | directory '' |
- | in your path or create a symbolic link from some path directory | + | of tools distributed with packages. For convenient |
- | to this binary. | + | directory '' |
+ | the binary | ||
+ | link from some path directory to this binary. | ||
===== Quick Start ===== | ===== Quick Start ===== | ||
Line 44: | Line 57: | ||
> cpm update | > cpm update | ||
- | You can show a short list of all packages in this index by | + | Afterwards, you can show a short list of all packages in this index by |
> cpm list | > cpm list | ||
Line 52: | Line 65: | ||
> cpm info PACKAGE | > cpm info PACKAGE | ||
- | can be used to see more information about a package. | + | can be used to show more information about a package. |
In order to use a package in your Curry program which you intend | In order to use a package in your Curry program which you intend | ||
Line 59: | Line 72: | ||
Therefore, to initialize it and use other packages, you need | Therefore, to initialize it and use other packages, you need | ||
a package description file in some project directory. | a package description file in some project directory. | ||
- | All this can be created by the command '' | + | All this can be created by the command '' |
- | some questions: | + | |
- | > cpm new | + | > cpm new myproject |
- | Create a new package | + | |
- | -------------------- | + | |
- | What is the name of the new package? | + | |
- | What is the first version of the package? [0.0.1] | + | |
- | Who is the author of the package? Joe Curry < | + | |
- | Please provide a short (one line) summary of what the package does: | + | |
- | > This is just for testing. | + | |
- | A new package in the directory ' | + | |
- | Please go into this directory, add dependencies in ' | + | |
- | and run 'cpm install' | + | |
- | As you will see, an initial package description file '' | + | This command creates a new project directory '' |
- | and a subdirectory '' | + | containing |
- | for your project, | + | and a subdirectory '' |
+ | If you need some other package for your project, | ||
+ | add it as a dependency in '' | ||
Then run | Then run | ||
Line 86: | Line 90: | ||
> cpm curry | > cpm curry | ||
- | and you will be able to load the modules of the used packages. | + | and you will be able to load the modules of the current package |
+ | as well as all dependent | ||
In particular, the source directory '' | In particular, the source directory '' | ||
so that you can directly load any program you have stored | so that you can directly load any program you have stored | ||
in this directory. | in this directory. | ||
- | ===== Manual ===== | + | ===== Manual |
For further information, | For further information, | ||
- | ===== Uploading Packages ===== | + | A detailed description about CPM and its implementation can be found |
+ | in the following thesis: | ||
+ | |||
+ | [[https:// | ||
+ | ===== Uploading | ||
Currently, there is no support for automatically uploading | Currently, there is no support for automatically uploading | ||
- | new packages. However, if you have developed that might be of | + | and publishing |
- | interest to other Curry users, please | + | However, if you have developed |
+ | interest to other Curry users, please | ||
+ | as a tar or zip file to | ||
packages (AT) curry-language.org | packages (AT) curry-language.org |