Piccl
Installer, package manager, build wrapper and version manager for Piccolo (https://github.com/PiccoloLang/piccolo)
Overview
Piccl aims to simplify the process of integrating and developing using Piccolo in your environments. "How?" I hear you ask? Simple!: - Compile the latest versions of Piccolo as a library, and offer to install it for you! - Manage your Piccolo versions conveniently from the command line! - Want more bang for your buck? Build Piccolo libraries and link them against your local versions!
Installing
Piccl itself can be installed quite easily! At the moment we can only provide the awesomeness that is Piccl for our Unix bretheren, but Windows support will be added down the line.
Simply run:
sudo Piccl/Install.py
And you should be ready to go! For more options use the --help
switch.
Piccl requires: - Python 3.9 - git
- cc
compatible compiler (e.g. gcc
or clang
)
Any packages will have their own dependencies which should be listed in their repositories.
Running
In the future, Piccl will run tests to make sure that trunk Piccolo isn't banjaxed, but for now compiler errors will have to suffice on your end ;-;.
Using Piccl is simple! Here's the basic syntax:
piccl [flags]
[flags|suboperations...] [operands]
Each operation has its own set of flags and its own --help
menu.
Versions
Piccolo versions are stored in the Piccl home directory under the Versions
folder. Environments will hold references to installed Piccolo versions in this folder. By default Piccl will hold any versions meeting the following criteria: - Is the latest version - Has an active reference in an environment which is not set to autoupdate - Has been added by the user with the --keep
flag of a version add
operation - Has been registered manually with the config --register-version
operation and flag
Piccl will always hold the latest version of Piccolo and will keep it up-to-date. To add a persistent version use:
piccl version add --keep
to get the Piccolo version referenced by the commit UUID commit
. Without the --keep
command Piccl will delete the version at the next update
operation or after the next operation if autoupdate
is enabled.
For package developers or developers looking to integrate libPiccolo, you can install a version of Piccolo globally using:
piccl version install
Environments
You can use Piccl to manage multiple environments for Piccolo. When performing any operation you can use the --target
flag to specify which environment or version to perform the operation on. Each environment has its own package index and references one installed Piccolo version. By default Piccl will initialize one environment called default
.
For example, to initialize a new environment use:
piccl environment create
This will initialize a new environment with no Piccolo version and an empty package index, to initalize the environment use:
piccl environment update
Which will install the latest Piccolo version if neccesary and add a reference to it in the environment. Note that this command will also update any packages in the environment.
To configure an environment use:
piccl environment config [flags]
For a list of configuration flags use:
piccl environment config --help
Global Configuration
Piccl keeps track of some global configuration in the home directory: - A list of environments - A list of versions - Whether to autoupdate after every operation - Piccl package indexes: Packages - The compiler to use for compiling native code
These can be modified using:
piccl config [flags]
For a list of configuration flags use:
piccl config --help
Packages
While at the moment Piccolo does not natively support libraries and inclusion, nor does it have a shell for running packages, using Repiccl
or another Piccolo shell can provide an interface for libraries and runnable Piccolo modules. To install a package use:
piccl package install
[environment]
If you omit environment
the package will be installed to the default
environment.
The default package index is restricted to Piccl packages, to manage package indexes use:
piccl config --register-package-index
For local package indexes, use a file://
URI with the path to your index. Note that Piccl is not responsible for any malicious programs present on 3rd party package indexes.
Advanced
Piccl keeps track of environments and other persistent data through a folder which by default is located at ~/.config/Piccl
. This can be redirected with the PICCL_HOME
environment variable if you need to manage multiple Piccl configurations. This is not how to handle environments. Note that this will also set the home directory if it is set during the installation. The same effect can be achieved using the --homedir
flag when using Piccl.
If you are a package developer or are developing with Piccolo in an integrated manner, you can set the PICCL_DEBUG
environment variable which will cause all builds to be performed with debug symbols enabled.