Skip to main content

One command to install equivalent packages in Ubuntu, Debian, CentOS, Fedora, Red Hat and Mac OS X.

Project description

UnixPackage is a UNIX independent way of installing packages. Specify the Ubuntu package name (e.g. libpq-dev), and it will install the equivalent on your system (e.g. postgresql-libs on Arch).

Install

Make sure that you have pip installed (any version). Then run:

$ pip install unixpackage

Simple Usage

Run:

$ unixpackage install libpq-dev

On Arch this will run:

$ sudo pacman -S postgresql-libs

On Debian and Ubuntu:

$ sudo apt-get install libpq-dev

On Mac OS X:

$ brew install postgresql

On Red Hat/CentOS/Fedora:

$ sudo yum install postgresql-devel

Other usage

You can also just print the command to install rather than running it:

$ unixpackage show libpq-dev libssl-dev
sudo pacman -S postgresql-libs openssl

Or just check to see if it is installed:

$ unixpackage check libpq-dev openssl
Installed

Python API

There is also a python API for the above commands:

import unixpackage
import sys

# Install package if not already installed
unixpackage.install(["libpq-dev"])

# Check if packages are installed
if unixpackage.packages_installed(["libpq-dev"]):
    sys.stdout.write("libpq-dev installed")

Where does it get the package names from?

Here : http://unixpackage.github.io/libpq-dev.json

To add packages, fork this repository and submit a pull request to this repository: http://github.com/unixpackage/unixpackage.github.io

Raising an issue if you want packages added is also welcome.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unixpackage-0.3.tar.gz (6.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page