packagebuilder

A library for building python packages into binary or source distributions.


Keywords
package, management, resolver, pipenv, requirementslib, pipfile, dependencies, dependency, builder, building
License
ISC
Install
pip install packagebuilder==0.1.0

Documentation

packagebuilder: A library for building python packages into binary or source distributions.

https://api.travis-ci.com/sarugaku/packagebuilder.svg?branch=master https://ci.appveyor.com/api/projects/status/y9kpdaqy4di5nhyk/branch/master?svg=true Documentation Status

Summary

Packagebuilder_ is a library designed for building packages. It takes InstallRequirement objects as inputs and first attempts to build a wheel, but falls back to producing a source distribution if necessary. Invocation is straightforward:

>>> import packagebuilder
>>> import pip_shims
>>> ireq = pip_shims.shims.InstallRequirement.from_line('vistir')
>>> builder = packagebuilder.BuiltDist(ireq, sources=packagebuilder.get_sources())
>>> dist = builder.build()
>>> dist.metadata.run_requires
['requests', 'six', 'backports.weakref; python_version < "3.3"', 'backports.shutil-get-terminal-size; python_version < "3.3"', 'pathlib2; python_version < "3.5"', "yaspin; extra == 'spinner'", "pytest; extra == 'tests'", "pytest-xdist; extra == 'tests'", "pytest-cov; extra == 'tests'", "pytest-timeout; extra == 'tests'", "hypothesis-fspaths; extra == 'tests'", "hypothesis; extra == 'tests'"]

Read the documentation.