Patchwork [bitbake-devel] setup.py: Install concurrent too

login
register
mail settings
Submitter Bernhard Reutner-Fischer
Date Feb. 2, 2012, 8:21 a.m.
Message ID <1328170876-12909-2-git-send-email-rep.dot.nop@gmail.com>
Download mbox | patch
Permalink /patch/20557/
State Accepted
Commit 9d06f6cd534fe1814a3f027709b5d2b6c5f68ff2
Headers show

Comments

Bernhard Reutner-Fischer - Feb. 2, 2012, 8:21 a.m.
I was getting:
Traceback (most recent call last):
  File "/scratch/src/oe/bitbake/build/scripts-2.7/bitbake", line 39, in <module>
    from bb import cooker
  File "/scratch/src/oe/bitbake/build/lib/bb/cooker.py", line 35, in <module>
    from concurrent import futures
ImportError: No module named concurrent
Command exited with non-zero status 1

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
 setup.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Chris Larson - Feb. 9, 2012, 11:01 p.m.
On Thu, Feb 2, 2012 at 1:21 AM, Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com> wrote:
> I was getting:
> Traceback (most recent call last):
>  File "/scratch/src/oe/bitbake/build/scripts-2.7/bitbake", line 39, in <module>
>    from bb import cooker
>  File "/scratch/src/oe/bitbake/build/lib/bb/cooker.py", line 35, in <module>
>    from concurrent import futures
> ImportError: No module named concurrent
> Command exited with non-zero status 1
>
> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>


Just as an FYI, this was the wrong approach. setup.py already declared
our dependency on concurrent.futures. If you needed to install it, you
need to install the dependencies as well. If you use it in place in
the source tree, the installed files are irrelevent. Neither of which
require what you tried to do here. Of course, this is irrelevent now
anyway, as we no longer use futures, but I wanted to make this clear.
It was handled the same way we handle all our other dependencies (e.g.
progressbar). We copy it local for those running from the source tree,
and add the dep to setup.py.

Patch

diff --git a/setup.py b/setup.py
index 3f9899e..e86ddd1 100755
--- a/setup.py
+++ b/setup.py
@@ -54,7 +54,8 @@  setup(name='bitbake',
       requires = ["ply", "progressbar", "futures"],
       package_dir = {"": "lib"},
       packages = ["bb.server", "bb.parse.parse_py", "bb.parse", "bb.fetch",
-                  "bb.fetch2", "bb.ui.crumbs", "bb.ui", "bb.pysh", "bb", "prserv"],
+                  "bb.fetch2", "bb.ui.crumbs", "bb.ui", "bb.pysh", "bb",
+                  "prserv", "concurrent", "concurrent.futures"],
       py_modules = ["codegen"],
       scripts = ["bin/bitbake", "bin/bitbake-layers", "bin/bitbake-diffsigs", "bin/bitbake-prserv"],
       data_files = [("share/bitbake", glob("conf/*") + glob("classes/*")),