Giter Site home page Giter Site logo

pypi2deb's Introduction

PyPI to Debian

  • py2dsp - converts PyPI package to Debian source package
  • pypi2debian - converts PyPI repository to Debian repository

features

  • uses PyPI metadata
  • supports Python 2.X, 3.X and PyPy
  • guesses build dependencies
  • reuses existing Debian package names if already packaged in Debian
  • creates -doc package with Sphinx regenerated documentation
  • generates ITP email template
  • easy to customise (profiles, overrides, templates)
  • uses Debian tools to generate files if possible
  • integrates with dh-python's tools
  • asynchronous

examples

  • py2dsp jinja2 will download, unpack and debianize jinja2 in ./result/jinja2-2.8/
  • py2dsp jinja2-2.8.tar.gz will unpack and debianize jinja2 in ./result/jinja2-2.8/
  • py2dsp ./result/jinja2-2.8/ will debianize Jinja2 in provided directory

if debian/changelog didn't exist, above commands will also create jinja2_2.8-0~py2deb.mail file with ITP (intend to package) template

  • pypi2debian will convert PyPI packages to Debian source packages in ./result directory
  • pypi2debian --build-cmd "sbuild -c unstable" as above, but will also try to build these packages using sbuild (if "unstable" schroot is already set up)
  • pypi2debian --python3 --classifiers 'Operating System :: POSIX :: Linux' will create only python3-foo packages for all Linux compatible packages. See classifiers page for possible --classifiers values

overrides

To override pypi2deb's auto detected values and auto generated files use overrides mechanism.

Each package has its own subdirectory in ./overrides dir (can be changed via PYPI2DEB_OVERRIDES_PATH env. variable) - complete files, modified templates (.tpl files) or ctx.json file can be stored there. Each file that doesn't have .tpl extension will be copied to the result directory, including f.e. debian/patches dir.

ctx.json file in overrides/foo/ directory will overwrite auto detected values (see list below). For the same purpose py2dsp section in setup.cfg file can be used.

To provide different templates for all packages, point pypi2deb to them via PYPI2DEB_TEMPLATES_PATH env. variable.

To use different PyPI server - set PYPI_JSON_URL and PYPI_XMLRPC_URL env. variables.

ctx values

  • author - upstream author's name and email
  • binary_arch - binary package's architecture
  • build_depends - build dependencies
  • clean_files - files to remove in clean step
  • copyright - upstream copyrights (one line)
  • creator - name and email used in changelog and copyright files
  • deb_copyright - Debian packaging copyrights
  • deb_license_name - Debian packaging license name
  • debian_revision - 0~pypi2deb by default
  • description - project's raw description
  • distribution - Debian's suite
  • exports - variables exported in debian/rules
  • homepage - project's homepage
  • interpreters - supported Python interpreters (python, python3, pypy)
  • license - license's full text
  • license_name - license name
  • maintainer - maintainer's full name and email
  • name - upstream project name
  • src_name - debianized upstream project name
  • summary - package's short description
  • uploaders - co-maintainers of the package
  • vcs_browser - URL to web-browsable copy of the Version Control System repository
  • vcs_name - VCS name, f.e. Git, Svn, etc.
  • vcs_src - location of the Version Control System
  • version - upstream version
  • with - list of dh's --with extensions
  • docs
    • sphinx_dir - directory with documentation (Sphinx)
    • files - list of files / dirs to be installed as documentation
    • examples - list of example files / dirs
    • examples_dir - relative path to directory with examples

pypi2deb's People

Contributors

geofft avatar p1otr avatar philpep avatar shanavas786 avatar sumpfralle avatar vincentbernat avatar yarikoptic avatar

Watchers

 avatar  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.