Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tools:cpm [2017-02-01 18:28] – [Quick Start] mhtools:cpm [2018-11-27 10:12] 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 and applications and manage version dependencies 
-between these libraries.+between them.
 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 15: Line 15:
 about these details. about these details.
  
-Currentlythere is no support for automatically uploading +CPM also supports //semantic versioning//i.e., it is able to check 
-new packagesHowever, if you have developed an interesting package, +whether a new minor version of a package is consistent 
-please write to ''packages (ATcurry-language.org'' in order to make +(w.r.t. its API and behavior) with a previous version of 
-it available to other users.+the same package. 
 + 
 +===== Available Packages ===== 
 + 
 +There are more than [[http://www.informatik.uni-kiel.de/~curry/cpm/ | 90 packages available]] 
 +(including more than 600 modules)
 +There is a [[http://www.informatik.uni-kiel.de/~curry/cpm/ | table of all packages]] 
 +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 ===== ===== Installing the Curry Package Manager =====
  
-The installation assumes that one of the Curry systems PAKCS or KiCS2 +CPM is already part of recent distributions of the Curry systems 
-in installed and the executables ''curry'' and ''git'' are in your path. +[[http://www.informatik.uni-kiel.de/~pakcs/|PAKCS]] (Version 1.15.0 or higher) and 
-If ''curry'' is not in your path, you must adapt the definition +[[http://www-ps.informatik.uni-kiel.de/kics2/|KiCS2]] (Version 0.6.0 or higher). 
-of the variable ''CURRY'' in the ''Makefile'' before step 3. +If you have some older version of PAKCS or KiCS2, you can also 
-Otherwise, perform the following steps to install CPM:+install CPM from its public repository. 
 +The installation requires that one of the Curry systems PAKCS or KiCS2 
 +is installed and the executables ''curry'' and ''git'' are in your path 
 +(if ''curry'' is not in your path, you can also specify the root location 
 +of your Curry system by modifying the definition of ''CURRYROOT'' 
 +in the ''Makefile'' before executing ''make'' in step 3)
 +Then perform the following steps to install CPM:
  
-    1> git clone https://git.ps.informatik.uni-kiel.de/curry/cpm.git+    1> git clone https://git.ps.informatik.uni-kiel.de/curry-packages/cpm.git
     2> cd cpm     2> cd cpm
     3> make     3> make
  
-If this was successful, the binary ''cpm'' has been generated in the +If this was successful, the binary ''cypm'' has been generated in the 
-directory ''bin''. For conventient use, put this binary somewhere +directory ''~/.cpm/bin''. This is also the directory where CPM installs binaries 
-in your path or create a symbolic link from some path directory +of applications distributed as packages. For convenient use, you should add the 
-to this binary.+directory ''~/.cpm/bin'' to your path. Alternatively, you can also put 
 +the binary ''~/.cpm/bin/cypm'' somewhere in your path or create a symbolic 
 +link from some path directory to this binary.
  
 ===== Quick Start  ===== ===== Quick Start  =====
Line 40: Line 58:
 Now you can clone a copy of the central package index repository by Now you can clone a copy of the central package index repository by
  
-    > cpm update+    > cypm 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+    > cypm list
  
 The command The command
  
-    > cpm info PACKAGE+    > cypm 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 57: Line 75:
 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 ''cpm new'' and answering +All this can be created by the command ''cypm new'':
-some questions:+
  
-    > cpm new +    > cypm new myproject
-    Create a new package +
-    -------------------- +
-    What is the name of the new package? myproject +
-    What is the first version of the package? [0.0.1]  +
-    Who is the author of the package? Joe Curry <joe@curry.com> +
-    Please provide a short (one line) summary of what the package does: +
-    > This is just for testing. +
-    A new package in the directory 'myproject' has been created. +
-    Please go into this directory, add dependencies in 'package.json', +
-    and run 'cpm install' to install all dependencies.+
  
-As you will see, an initial package description file ''package.json'' +This command creates a new project directory ''myproject'' 
-and a subdirectory ''src'' has been created. If you need some package +containing an initial package description file ''package.json'' 
-for your project, write it as a dependency in ''package.json''.+and a subdirectory ''src'' (together with other template files). 
 +Change into the new project directory: 
 + 
 +    > cd myproject 
 + 
 +If you need some other packages for your project, 
 +add them as a dependency in ''package.json''.
 Then run Then run
  
-    > cpm install+    > cypm install
  
 to install all dependencies of the current package. to install all dependencies of the current package.
 Afterwards, start your interactive Curry environment by Afterwards, start your interactive Curry environment by
  
-    > cpm curry+    > cypm 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 packages.
 In particular, the source directory ''src'' is added to your path In particular, the source directory ''src'' is added to your path
 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.
 +For instance, if the module ''Main.curry'' is stored in the
 +directory ''src'', you can load it into your Curry system
 +(e.g., KiCS2 or PAKCS) by
 +
 +    > cypm curry :load Main
 +
 +===== Manual and Further Documentation =====
 +
 +For further information, look into the {{tools:cpm:manual.pdf | manual of CPM}}.
 +
 +A detailed description about CPM and its implementation can be found
 +in the following thesis:
 +
 +[[https://www.informatik.uni-kiel.de/~mh/lehre/abschlussarbeiten/msc/Oberschweiber.pdf |  A Package Manager for Curry (Jonas Oberschweiber, CAU Kiel, September 2016)]]
 +===== 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.
  
-For further information, look into the manual of CPM. 
  
/srv/dokuwiki/currywiki/data/pages/tools/cpm.txt · Last modified: 2020-03-14 18:06 by mh
Back to top
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0