Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
curry
curry-tools
Commits
be83699c
Commit
be83699c
authored
Apr 21, 2017
by
Michael Hanus
Browse files
CPM updated
parent
38014d9c
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
cpm/docs/currysystem_manual.tex
View file @
be83699c
...
...
@@ -43,11 +43,11 @@ but also tools with some binary. In order to install such tools,
one can use the command
%
\begin{curry}
> cpm install
bin
PACKAGE
> cpm install
app
PACKAGE
\end{curry}
%
This command checks out the package in some internal directory
(
\code
{
\$
HOME/.cpm/
bin
_
packages
}
)
(
\code
{
\$
HOME/.cpm/
app
_
packages
}
)
and installs the binary of the tool provided by the package
in
\code
{
\$
HOME/.cpm/bin
}
.
Hence it is recommended to add this directory to your path.
...
...
@@ -58,7 +58,7 @@ can be installed by the following commands:
\begin{curry}
> cpm update
$
\ldots
$
> cpm install
bin
cpm
> cpm install
app
cpm
$
\ldots
$
Package 'cpm-xxx' checked out
$
\ldots
$
$
\ldots
$
INFO Installing executable 'cpm' into '/home/joe/.cpm/bin'
...
...
cpm/docs/manual.tex
View file @
be83699c
...
...
@@ -235,27 +235,28 @@ if \code{\$HOME/.cpm/bin} is in your path
of this default path).
\subsection
{
Installing
Binarie
s of Packages
}
\label
{
sec:install
bin
}
\subsection
{
Installing
Application
s of Packages
}
\label
{
sec:install
app
}
Some packages do not contain only useful libraries
but also tools. In order to install such tools without
but also application programs or tools.
In order to install the executables of such applications without
explicitly using the source code of the package,
one can use the command
\begin{lstlisting}
cpm install
bin
<package>
cpm install
app
<package>
\end{lstlisting}
This command checks out the package in some internal directory
(default:
\code
{
\$
HOME/.cpm/
bin
_
packages
}
, see
(default:
\code
{
\$
HOME/.cpm/
app
_
packages
}
, see
Section~
\ref
{
sec:config
}
)
and installs the binary of the
tool
provided by the package
and installs the binary of the
application
provided by the package
in
\code
{
\$
HOME/.cpm/bin
}
(see also Section~
\ref
{
sec:checkout
}
).
For instance, the most recent version of the web framework Spicey
can be installed by the following command:
%
\begin{lstlisting}
> cpm install
bin
spicey
> cpm install
app
spicey
$
\ldots
$
Package 'spicey-xxx' checked out
$
\ldots
$
$
\ldots
$
INFO Installing executable 'spiceup' into '/home/joe/.cpm/bin'
...
...
@@ -507,10 +508,10 @@ Hence, in order to use such applications, one should have this path
in the personal load path (environment variable
\code
{
PATH
}
).
Default value:
\code
{
\$
HOME/.cpm/bin
}
\item
[\fbox{\code{
bin
_package_path}}]
\item
[\fbox{\code{
app
_package_path}}]
The path to the package cache where packages are checked out if only
their binaries are installed (see Section~
\ref
{
sec:install
bin
}
).
Default value:
\code
{
\$
HOME/.cpm/
bin
_
packages
}
.
their binaries are installed (see Section~
\ref
{
sec:install
app
}
).
Default value:
\code
{
\$
HOME/.cpm/
app
_
packages
}
.
\item
[\fbox{\code{curry_bin}}]
The name of the executable of the Curry system used
...
...
@@ -525,7 +526,7 @@ For instance, to install the binary
of the package
\code
{
spicey
}
in the directory
\code
{
\$
HOME/bin
}
,
one can execute the command
\begin{lstlisting}
> cpm --define bin
_
install
_
path=
$
\$
$
HOME/bin install
bin
spicey
> cpm --define bin
_
install
_
path=
$
\$
$
HOME/bin install
app
spicey
\end{lstlisting}
...
...
@@ -633,17 +634,19 @@ Checks out a specific version of a package
into the local directory
\code
{$
package
$}
in order to test its operations or install a binary of the package..
\item
[\fbox{\code{install
bin
$package$ [--$pre$]
}}
]
Install the
binary
provided by the newest version
\item
[\fbox{\code{install
app
$package$ [--$pre$]
}}
]
Install the
application
provided by the newest version
(compatible to the current compiler) of a package.
The binary is installed into the directory
\code
{
\$
HOME/.cpm/bin
}
The binary of the application is installed into the directory
\code
{
\$
HOME/.cpm/bin
}
(this location can be changed via the
\code
{
\$
HOME/.cpmrc
}
configuration file
or by the CPM option
\code
{
--define
}
, see Section~
\ref
{
sec:config
}
).
\code
{
--
$
pre
$}
enables the installation of pre-release versions.
\item
[\fbox{\code{installbin $package$ $version$}}]
Install the binary provided by a specific version of a package.
The binary is installed into the directory
\code
{
\$
HOME/.cpm/bin
}
\item
[\fbox{\code{installapp $package$ $version$}}]
Install the application provided by a specific version of a package.
The binary of the application is installed into the directory
\code
{
\$
HOME/.cpm/bin
}
(this location can be changed via the
\code
{
\$
HOME/.cpmrc
}
configuration file
or by the CPM option
\code
{
--define
}
, see Section~
\ref
{
sec:config
}
).
...
...
@@ -792,7 +795,7 @@ in all versions.
The compiler compatibility of a package is also relevant when
some version of a package should be examined or installed
(with CPM commands
\code
{
info
}
,
\code
{
checkout
}
,
\code
{
install
}
,
\code
{
install
bin
}
).
\code
{
install
app
}
).
If a newest package should be installed, i.e., no specific version
number is provided, then only the newest version
which is compatible to the current Curry compiler
...
...
@@ -859,7 +862,7 @@ For instance, a possible specification could be as follows:
\end{lstlisting}
%
If a package contains an
\code
{
executable
}
specification,
the command
\code
{
cpm install
}
compiles the main module
the command
\code
{
cpm install
}
also
compiles the main module
and installs the executable in the
\code
{
bin
}
install directory of CPM
(see Section~
\ref
{
sec:config
}
for details).
...
...
cpm/src/CPM/Config.curry
View file @
be83699c
...
...
@@ -6,7 +6,7 @@
module CPM.Config
( Config ( Config, packageInstallDir, binInstallDir, repositoryDir
,
bin
PackageDir, packageIndexRepository, curryExec
,
app
PackageDir, packageIndexRepository, curryExec
, compilerVersion )
, readConfiguration, readConfigurationWithDefault, defaultConfig
, showCompilerVersion ) where
...
...
@@ -41,8 +41,8 @@ data Config = Config {
, binInstallDir :: String
--- Directory where the package repository is stored
, repositoryDir :: String
--- Directory where the
packages with binary installation only are stored
,
bin
PackageDir :: String
--- Directory where the
application packages are stored (cmd 'installapp')
,
app
PackageDir :: String
--- URL to the package index repository
, packageIndexRepository :: String
--- The executable of the Curry system used to compile and check packages
...
...
@@ -58,7 +58,7 @@ defaultConfig = Config
{ packageInstallDir = "$HOME/.cpm/packages"
, binInstallDir = "$HOME/.cpm/bin"
, repositoryDir = "$HOME/.cpm/index"
,
bin
PackageDir = "$HOME/.cpm/
bin
_packages"
,
app
PackageDir = "$HOME/.cpm/
app
_packages"
, packageIndexRepository = packageIndexURI
, curryExec = installDir </> "bin" </> curryCompiler
, compilerVersion = (curryCompiler, curryCompilerMajorVersion,
...
...
@@ -124,7 +124,7 @@ replaceHome cfg = do
packageInstallDir = replaceHome' homeDir (packageInstallDir cfg)
, binInstallDir = replaceHome' homeDir (binInstallDir cfg)
, repositoryDir = replaceHome' homeDir (repositoryDir cfg)
,
bin
PackageDir = replaceHome' homeDir (
bin
PackageDir cfg)
,
app
PackageDir = replaceHome' homeDir (
app
PackageDir cfg)
}
where
replaceHome' h s = concat $ intersperse h $ splitOn "$HOME" s
...
...
@@ -134,7 +134,7 @@ createDirectories cfg = do
createDirectoryIfMissing True (packageInstallDir cfg)
createDirectoryIfMissing True (binInstallDir cfg)
createDirectoryIfMissing True (repositoryDir cfg)
createDirectoryIfMissing True (
bin
PackageDir cfg)
createDirectoryIfMissing True (
app
PackageDir cfg)
--- Merges configuration options from a configuration file or argument options
--- into a configuration record. May return an error using Left.
...
...
@@ -168,7 +168,7 @@ keySetters =
[ ("repository_path" , \v c -> c { repositoryDir = v })
, ("package_install_path", \v c -> c { packageInstallDir = v})
, ("bin_install_path" , \v c -> c { binInstallDir = v})
, ("
bin
_package_path" , \v c -> c {
bin
PackageDir = v})
, ("
app
_package_path" , \v c -> c {
app
PackageDir = v})
, ("curry_bin" , \v c -> c { curryExec = v})
]
...
...
cpm/src/CPM/Main.curry
View file @
be83699c
This diff is collapsed.
Click to expand it.
cpm/vendor/cass/docs/manual.tex
View file @
be83699c
...
...
@@ -29,7 +29,7 @@ Thus, to install the newest version of CASS, use the following commands:
%
\begin{curry}
> cpm update
> cpm install
bin
cass
> cpm install
app
cass
\end{curry}
%
This downloads the newest package, compiles it, and places
...
...
currypp/.cpm/packages/cass/docs/manual.tex
View file @
be83699c
...
...
@@ -29,7 +29,7 @@ Thus, to install the newest version of CASS, use the following commands:
%
\begin{curry}
> cpm update
> cpm install
bin
cass
> cpm install
app
cass
\end{curry}
%
This downloads the newest package, compiles it, and places
...
...
currypp/.cpm/packages/verify/docs/manual.tex
View file @
be83699c
...
...
@@ -38,7 +38,7 @@ Thus, to install the newest version of CurryVerify, use the following commands:
%
\begin{curry}
> cpm update
> cpm install
bin
verify
> cpm install
app
verify
\end{curry}
%
This downloads the newest package, compiles it, and places
...
...
optimize/.cpm/packages/cass/docs/manual.tex
View file @
be83699c
...
...
@@ -29,7 +29,7 @@ Thus, to install the newest version of CASS, use the following commands:
%
\begin{curry}
> cpm update
> cpm install
bin
cass
> cpm install
app
cass
\end{curry}
%
This downloads the newest package, compiles it, and places
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment