diff options
author | Chandan Singh <csingh43@bloomberg.net> | 2019-11-15 15:02:06 +0000 |
---|---|---|
committer | Chandan Singh <csingh43@bloomberg.net> | 2019-11-15 17:27:55 +0000 |
commit | a4c3ff0597fefb9d49a9111e8f0bbff7fcb0531e (patch) | |
tree | bd9354259da6e023a75b94d9cb5993fa1e329cde | |
parent | 0eac8421e3f65833774ed1d1476ed8ceb9fd20e4 (diff) | |
download | buildstream-chandan/extras-require.tar.gz |
setup.py: Add plugin requirements as extraschandan/extras-require
Currently, there isn't an easy way to install BuildStream along with its
plugin dependencies, using pip.
Add plugin requirements as extras
(https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies)
so that they can be installed by specifying the relevant extras to
`pip`.
This repository has only one plugin - `deb` source - that has external
dependencies, i.e. `arpy`. With this patch, one should be able to
install BuildStream and dependencies for the `deb` plugin using
something like `pip instal BuildStream[deb]`.
-rwxr-xr-x | setup.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -301,6 +301,14 @@ with open('requirements/dev-requirements.in') as dev_reqs: with open('requirements/requirements.in') as install_reqs: install_requires = install_reqs.read().splitlines() +# Dependencies of plugins. These are not strict requirements for installing +# BuildStream so add them as extras. +# +# This is a mapping between the plugin name and its dependencies. +extras_require = { + "deb": ["arpy"], +} + ##################################################### # Prepare package description from README # ##################################################### @@ -469,6 +477,7 @@ setup(name='BuildStream', install_requires=install_requires, entry_points=bst_install_entry_points, tests_require=dev_requires, + extras_require=extras_require, ext_modules=cythonize( BUILD_EXTENSIONS, compiler_directives={ |