You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by no...@apache.org on 2020/12/29 12:46:40 UTC

[buildstream] branch chandan/extras-require created (now a4c3ff0)

This is an automated email from the ASF dual-hosted git repository.

not-in-ldap pushed a change to branch chandan/extras-require
in repository https://gitbox.apache.org/repos/asf/buildstream.git.


      at a4c3ff0  setup.py: Add plugin requirements as extras

This branch includes the following new commits:

     new a4c3ff0  setup.py: Add plugin requirements as extras

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[buildstream] 01/01: setup.py: Add plugin requirements as extras

Posted by no...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

not-in-ldap pushed a commit to branch chandan/extras-require
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit a4c3ff0597fefb9d49a9111e8f0bbff7fcb0531e
Author: Chandan Singh <cs...@bloomberg.net>
AuthorDate: Fri Nov 15 15:02:06 2019 +0000

    setup.py: Add plugin requirements as extras
    
    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]`.
---
 setup.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/setup.py b/setup.py
index 19779fb..c6dc2ee 100755
--- a/setup.py
+++ b/setup.py
@@ -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={