Skip to content

Installing Qi for Development

Siddhartha Kasivajhula edited this page Oct 11, 2022 · 1 revision

These instructions will cover installing Qi directly from a local Git repo.

You could install Qi either in a default scope such as User scope (meaning it will available to the current user of the operating system), or, if you prefer, you could also install it in a virtual environment specific to the project. These options are covered below, in turn.

Installing in User Scope

For most users, this will be the most straightforward installation. Using this option means that Qi will be installed so that it is linked directly to the cloned instance of the Git repo on your local machine. It means that any changes you make there will be reflected in all code on your machine that depends on Qi. Likewise, updating Qi would just be a matter of git pull.

Uninstall any version of Qi you already have

  raco pkg remove --force qi

Install from source

After cloning the repo and changing to the repo directory:

  make install

Installing in a Virtual Environment

[This option is experimental and the details are yet to be worked out, as virtual environments aren't commonly used in Racket at the moment. The instructions below aren't quite right, so if you'd prefer to do it this way, then please see the relevant discussion on the raco-pkg-env repo first. TL;DR - for now, you can probably just set the PLTUSERHOME environment variable to approximate a virtual environment.]

This uses the raco-pkg-env package to create and manage virtual environments in Racket. You may prefer this option if you already have a version of Qi installed in the User scope and would prefer to do development in an isolated environment. Remember, if you go with this option, you will need to activate the virtual environment (described below) before you can use the development workflows below.

Install raco-pkg-env

  raco pkg install raco-pkg-env

Clone the Qi Repo

  git clone [email protected]:countvajhula/qi.git
  cd qi

Create and Activate the Virtual Environment

  raco pkg-env _env
  source _env/activate.sh

Install Qi Into the Virtual Environment

  make install
Clone this wiki locally