CLI tool for one-line installation of C++/CMake projects.

Overview

cmakip

When working on virtual environments, Python projects can be installed with a single command invocation, for example pip install --no-deps . . Instead for CMake/C++ projects it is necessary to manually run mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=... .

cmakip is a command line tool to simplify this step, i.e. the compilation and installation of C++/CMake projects when working on environments such as conda environments or Python's virtual environments, similarly to what pip permits to do with Python projects.

Installation

First of all, make sure that you are in a conda environment or a Python virtual environment, then you can install cmakip as:

pip install --no-deps git+https://github.com/ami-iit/cmakip"

Usage

Installation from a directory

cmakip can permit to quickly install a project in a directory, for example:

cd ~
git clone https://github.com/fmtlib/fmt
cd fmt
cmakip install .

This automatically creates a build_cmakip directory in the source folder and then installs it in the appropriate location:

Operating System Environment Type CMAKE_INSTALL_PREFIX
Linux&macOS Conda ${CONDA_PREFIX}
Windows Conda ${CONDA_PREFIX}\Library
Linux&macOS Python venv ${VIRTUAL_ENV}
Windows Python venv Not Supported

A project installed like that can be uninstalled like:

cd ~/fmt
cmakip uninstall .

Installation from a repo

cmakip can also be used to install CMake libraries from a repo:

cmake install git+https://github.com/fmtlib/fmt

This automatically clone the repo in ${CONDA_PREFIX}\src or ${VIRTUAL_ENV}\src, and then installs it.

A library installed like this can be uninstalled simply specifying the repo name:

cmakip uninstall fmt

FAQs

Does cmakip resolve dependencies?

No. In a sense, it is kind of equivalent to pip install --no-deps.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

BSD-3-Clause

You might also like...
[WIP]An ani-cli like cli tool for movies and webseries

mov-cli A cli to browse and watch movies. Installation This project is a work in progress. However, you can try it out python git clone https://github

Unofficial Open Corporates CLI: OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unofficial open corporates python command line tool.
Unofficial Open Corporates CLI: OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unofficial open corporates python command line tool.

Unofficial Open Corporates CLI OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unoff

tox-server is a command line tool which runs tox in a loop and calls it with commands from a remote CLI.

Tox Server tox-server is a command line tool which runs tox in a loop and calls it with commands from a remote CLI. It responds to commands via ZeroMQ

Notion-cli-list-manager - A simple command-line tool for managing Notion databases

A simple command-line tool for managing Notion List databases. ✨

Spotify Offline is a command line tool that allows one to download Spotify playlists in MP3 format.

Spotify Offline v0.0.2 listen to your favorite spotify songs, offline Overview Spotify Offline (spotifyoffline) is a command line tool that allows one

A CLI for creating styled-components for React projects quickly

new-component Ian Cleary (iancleary) Description Welcome! This is a CLI for creating styled-components for React projects quickly. Note: I've rewrote

Python-Stock-Info-CLI: Get stock info through CLI by passing stock ticker.
Python-Stock-Info-CLI: Get stock info through CLI by passing stock ticker.

Python-Stock-Info-CLI Get stock info through CLI by passing stock ticker. Installation Use the following command to install the required modules at on

Yts-cli-streamer - A CLI movie streaming client which works on yts.mx API written in python
Yts-cli-streamer - A CLI movie streaming client which works on yts.mx API written in python

YTSP It is a CLI movie streaming client which works on yts.mx API written in pyt

Comments
  • Support installing multiple projects specified in a text file

    Support installing multiple projects specified in a text file

    pip supports installing projects from a requirements.txt file (see https://pip.pypa.io/en/stable/reference/requirements-file-format/). To quickly install multiple repos, it could make sense to support something similar in cmakip, for example support:

    cmakip install -r cmake_repos_to_install.txt
    

    where cmake_repos_to_install.txt is:

    git+https://github.com/fmtlib/[email protected]
    git+https://github.com/gabime/[email protected]
    git+https://gitlab.com/libeigen/[email protected]
    
    opened by traversaro 1
  • Permit to specify an automatic install prefix different from Conda or virtualenv prefixes

    Permit to specify an automatic install prefix different from Conda or virtualenv prefixes

    At the moment, cmakip only permits to automatically install projects when a Conda or virtualenv prefix is active. In the AMI lab (https://ami.iit.it/) a common practice widespread among the members is to have an instance of the https://github.com/robotology/robotology-superbuild "active" in the system, and install CMake project in the install directory of the "activated" robotology-superbuild. Probably it could make sense to support such a workflow.

    At the moment I can think of two ways of implement this:

      1. Make cmakip aware of the robotology-superbuild in particular, checking if ROBOTOLOGY_SUPERBUILD_INSTALL_PREFIX is defined
      1. Define a new environment variable observed by cmakip, called CMAKIP_INSTALL_PREFIX or similar, and define it in robotology-superbuild's setup.sh scripts.

    I like option 2. to decouple cmakip and robotology-superbuild .

    opened by traversaro 0
  • Permit to pass CMake options to cmakip

    Permit to pass CMake options to cmakip

    At the momement it is not possible to easily pass CMake option to the build created by cmakip. Ideally we would like to be able to do something like that:

    cmake install git+https://github.com/fmtlib/fmt -DFMT_MODULE:BOOL=ON
    
    opened by traversaro 0
Releases(v0.1.0)
Owner
Artificial and Mechanical Intelligence
Artificial and Mechanical Intelligence
WebApp Maker make web apps (Duh). It is open source and make with python and shell.

WebApp Maker make web apps (Duh). It is open source and make with python and shell. This app can take any website and turn it into an app. I highly recommend turning these few websites into webapps:

2 Jan 09, 2022
Interactive Python interpreter for executing commands within Node.js

Python Interactive Interactive Python interpreter for executing commands within Node.js. This module provides a means of using the Python interactive

Louis Lefevre 2 Sep 21, 2022
Calculator for CLI. Made with Python

Calculator for CLI. Made with Python

Brandon Arreguin 2 Jan 07, 2022
Convert markdown to HTML using the GitHub API and some additional tweaks with Python.

Convert markdown to HTML using the GitHub API and some additional tweaks with Python. Comes with full formula support and image compression.

phseiff 70 Dec 23, 2022
A terminal spreadsheet multitool for discovering and arranging data

VisiData v2.6.1 A terminal interface for exploring and arranging tabular data. VisiData supports tsv, csv, sqlite, json, xlsx (Excel), hdf5, and many

Saul Pwanson 6.2k Jan 04, 2023
A VIM-inspired filemanager for the console

ranger 1.9.3 ranger is a console file manager with VI key bindings. It provides a minimalistic and nice curses interface with a view on the directory

12.6k Dec 30, 2022
A CLI for advanced management of your notes with simple commands

PyNoteManager This is a CLI for advanced management of your notes with simple co

3 Dec 30, 2021
Ideas on how to quickly learn to build command-line tools

CLI-Bootcamp Ideas on how to quickly learn to build command-line tools Part 1-Bash Week1: Using Linux Lesson 1: Using Linux Shell Lab Lesson 2: How sh

Noah Gift 10 Apr 18, 2022
Tarstats - A simple Python commandline application that collects statistics about tarfiles

A simple Python commandline application that collects statistics about tarfiles.

Kristian Koehntopp 13 Feb 20, 2022
Postgres CLI with autocompletion and syntax highlighting

A REPL for Postgres This is a postgres client that does auto-completion and syntax highlighting. Home Page: http://pgcli.com MySQL Equivalent: http://

dbcli 10.8k Jan 02, 2023
CLI based diff viewer

Rich Diff CLI based diff viewer

Suresh Kumar 24 Nov 15, 2022
ctree - command line christmas tree

ctree ctree - command line christmas tree It is small python script that prints a christmas tree in terminal. It is colourful and always gives you a d

15 Aug 15, 2022
A CLI tool for creating disposable environments.

dispenv - Disposable Python Environments ⚠️ WIP Need to make an environment to work on a GitHub issue? Want to try out a new package and not leave the

Peter Baumgartner 3 Mar 14, 2022
GetRepo-py is a command line client that queries GitHub API and searches repositories by given arguments

GetRepo-py is a command line client that queries GitHub API and searches repositories by given arguments

Davidcin 3 Feb 14, 2022
Kattis shell for getting examples, testing and submitting.

Kattis shell for getting examples, testing and submitting.

Simon Green Kristensen 15 Sep 30, 2022
CLI tool for one-line installation of C++/CMake projects.

cmakip When working on virtual environments, Python projects can be installed with a single command invocation, for example pip install --no-deps . .

Artificial and Mechanical Intelligence 4 Feb 15, 2022
A Python package for Misty II development

Misty2py Misty2py is a Python 3 package for Misty II development using Misty's REST API. Read the full documentation here! Installation Poetry To inst

Chris Scarred 1 Mar 07, 2022
A useful and easy to use Terminal Timer made with Python.

Terminal SpeedCubeTimer Installation ¡No requirements! Just Download and play Usage Starts timer.py and you will see this. python timer.py Scramble

Achalogy 5 Dec 22, 2022
EODAG is a command line tool and a plugin-oriented Python framework for searching, aggregating results and downloading remote sensed images while offering a unified API for data access regardless of the data provider

EODAG (Earth Observation Data Access Gateway) is a command line tool and a plugin-oriented Python framework for searching, aggregating results and downloading remote sensed images while offering a un

CS GROUP 205 Jan 03, 2023