Giter VIP home page Giter VIP logo

pyp2rpm's Introduction

Logo

======= pyp2rpm

Tool to convert a package from PyPI to RPM SPECFILE or to generate SRPM. Under heavy development, see TODO file for list of planned features. pyp2rpm currently ships with Fedora and Mageia specific templates.

Usage

The simplest use case is running:

pyp2rpm package_name

This downloads the package from PyPI and outputs the RPM SPECFILE.

Or:

pyp2rpm package_name --srpm

This downloads the package from PyPI and creates SRPM file.

All of the options are (print this by running pyp2rpm -h):

usage: pyp2rpm [-h] [-v VERSION] [-d SAVE_DIR] [-r RPM_NAME] 
               [-t TEMPLATE] [-o DISTRO] [-b BASE_PYTHON] 
               [-p PYTHON_VERSION] [--srpm] [--proxy PROXY] PACKAGE

Convert PyPI package to RPM specfile or SRPM.

arguments:
  PACKAGE             Provide PyPI name of the package or path to compressed 
                      source file.

optional arguments:
  -h, --help          show this help message and exit
  -v VERSION          Version of the package to download (ignored for local files).
  -d SAVE_DIR         Where to save the package file (default: "~/rpmbuild")
  -r RPM_NAME         Name of rpm package (overrides calculated name)
  -t TEMPLATE         Template file (jinja2 format) to render (default: "fedora"). 
                      Search order is 1) filesystem, 2) default templates.
  -o DISTRO           Default distro whose conversion rules to use 
                      (default: "fedora"). Default templates have their rules 
                      associated and ignore this.
  -b BASE_PYTHON      Base Python version to package for (default: "2").
  -p PYTHON_VERSIONS  Additional Python versions to include in the specfile 
                      (e.g -p3 for %{?with_python3}). Can be specified multiple times
                      (default: "3"). Specify additional version or use -b
                      explicitly to disable default. 
  --srpm              When used pyp2rpm will produce srpm instead of printing 
                      specfile into stdout.
  --proxy PROXY       Specify proxy in the form proxy.server:port.
  --venv / --no-venv  Enable / disable metadata extraction from virtualenv

To run the unit tests, cd into the checked out directory and run:

PYTHONPATH=$(pwd) py.test

or run:

python setup.py test

Example usage

alt tag

Contributing

We will gladly accept any pull request or recommendation. With complex pull requests, please include unit tests in pytest, use flexmock if you need mocking.

pyp2rpm is licensed under MIT license.

pyp2rpm's People

Contributors

bkabrda avatar glensc avatar hroncok avatar joequant avatar marbu avatar mcyprian avatar michaelmraka avatar pixelb avatar pombredanne avatar rkuska avatar rsuste avatar synfo avatar xsuchy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.