Skip to main content

python module name to package name map

Project description

# pymod2pkg

pymod2pkg is a simple python module for translating python module names to corresponding package names which is a common problem in the packaging world.

Note that [rdopkg](https://github.com/redhat-openstack/rdopkg) uses this module to check whether packages corresponding to requirements.txt are available across distros and more.

## Installation

### from source

If you want to hack pymod2pkg or just have the latest version without waiting for next release, I suggest using the git repo directly a la

git clone https://github.com/redhat-openstack/pymod2pkg cd pymod2pkg python setup.py develop –user

### from PyPI

For your convenience, pymod2pkg is also available from the Cheese Shop:

pip install pymod2pkg

## Usage

module2package is probably all you need, it accepts a module name to convert and a distro name (currently irrelevant):

import pymod2pkg

pkg = pymod2pkg.module2package(‘six’, ‘fedora’)

There’s not much more, really, so RTFS.

## Fixing/extending the map

Currently, only one package map for RPM-based systems is provided, but it’d be nice to have all the distros covered and it’s really easy to do so.

See *_PKG_MAP and get_pkg_map, hack it to your liking and send a pull request.

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

pymod2pkg-0.2.tar.gz (6.7 kB view details)

Uploaded Source

File details

Details for the file pymod2pkg-0.2.tar.gz.

File metadata

  • Download URL: pymod2pkg-0.2.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pymod2pkg-0.2.tar.gz
Algorithm Hash digest
SHA256 612049f5a8aa16661ce8f4ccf7c9281591b1fb179237a3d5a152c907bbe0698b
MD5 8706ace797ecf45a3bd0184033c86d5f
BLAKE2b-256 ca333fec58a8152f2671927a0b4913081a6a59b78588d23b1d1b5e2781e2f7f2

See more details on using hashes here.

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