Skip to main content

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

Either:

$ pip install unixpackage

Or:

$ sudo pip install unixpackage

unixpackage is entirely self contained and has no dependencies. It is safe to use sudo pip install with it.

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

Or install using “polite mode”:

$ unixpackage install libpq-dev --polite
The following command must be run to continue. I am attempting to run it now:


       sudo apt-get install -y libpq-dev


You can also run this command in another window and then hit Ctrl-C to continue.

[sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  postgresql-doc-9.3
The following NEW packages will be installed:
  libpq-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/140 kB of archives.
After this operation, 741 kB of additional disk space will be used.
Selecting previously unselected package libpq-dev.
(Reading database ... 231796 files and directories currently installed.)
Preparing to unpack .../libpq-dev_9.3.9-0ubuntu0.14.04_amd64.deb ...
Unpacking libpq-dev (9.3.9-0ubuntu0.14.04) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up libpq-dev (9.3.9-0ubuntu0.14.04) ...
Post-install package check for libpq-dev successful!

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"])

# Install package if not already installed (in polite mode)
unixpackage.install(["libpq-dev"], polite=True)

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

Package Library

Package names and their equivalents are downloaded from https://github.com/unixpackage/unixpackage.github.io via the generated website:

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

These files are cached in the ~/.unixpackage directory.

To add more packages you want to be installable in a UNIX-independent way, fork and submit a pull request to this repository: http://github.com/unixpackage/unixpackage.github.io

Want to help?

See CONTRIBUTING.rst

Release files for unixpackage 0.4.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unixpackage 0.4.7
File Size Uploaded
unixpackage-0.4.7.tar.gz 64.5 kB Details

Release files / unixpackage-0.4.7.tar.gz

Download URL unixpackage-0.4.7.tar.gz
Size 64.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4e44f93256fb0ee76e0f1dbdd133f867a5759098109196108a52461005bf9b3f
BLAKE2b-256 checksum
How to use checksums
0a0f7c960d5ffcecc4bd82a1c618a8fa095ca593523992d2b60a5e317f4e6b1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.4.7 This release

1 release file

0.4.6

1 release file

0.4.5

1 release file

0.4.4

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.9

1 release file

0.3.8

1 release file

0.3.7

1 release file

0.3.6

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page