# Help Wanted: Vendoring Python Modules

**URL:** <https://discourse.chef.io/t/help-wanted-vendoring-python-modules/18866>\
**Category:** Habitat Help\
**Created:** [October 1, 2018, 11:33am UTC](https://discourse.chef.io/t/help-wanted-vendoring-python-modules/18866 "2018-10-01T11:33:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![bixu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bixu/32/2907_2.png) [@bixu](https://discourse.chef.io/u/bixu)\
**Post date:** [October 1, 2018, 11:33am UTC](https://discourse.chef.io/t/help-wanted-vendoring-python-modules/18866/1 "2018-10-01T11:33:26Z")

</div>

Hi Inhabitants,  
I've started a project to vendor bigger Python modules, which at smartB has really improved our build times. PRs are wanted/welcome!

> **[bixu/python\_modules](https://github.com/bixu/python_modules)**
>
> Vendoring Python modules as Habitat packages. Contribute to bixu/python\_modules development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![bdangit](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bdangit/32/1466_2.png) [@bdangit](https://discourse.chef.io/u/bdangit)\
**Post date:** [October 2, 2018, 2:59am UTC](https://discourse.chef.io/t/help-wanted-vendoring-python-modules/18866/2 "2018-10-02T02:59:26Z")

</div>

Sometime ago we talked about having an origin just for python mods like this. My concern is what’s the benefit of submitting to here vs just pushing up to core?

---

<div class="post-metadata">

**Author:** ![bixu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bixu/32/2907_2.png) [@bixu](https://discourse.chef.io/u/bixu)\
**Post date:** [October 2, 2018, 5:53am UTC](https://discourse.chef.io/t/help-wanted-vendoring-python-modules/18866/3 "2018-10-02T05:53:17Z")

</div>

@bdangit, the `core` origin would be a great long-term home for these. I wanted to start here to see if the work is useful and get some stability and good patterns in place. Would more than happy to see this all go further upstream. @eeyun, thoughts?

---

<div class="post-metadata">

**Author:** ![bixu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bixu/32/2907_2.png) [@bixu](https://discourse.chef.io/u/bixu)\
**Post date:** [October 2, 2018, 1:27pm UTC](https://discourse.chef.io/t/help-wanted-vendoring-python-modules/18866/4 "2018-10-02T13:27:36Z")

</div>

Also, @georgemarshall, I’d love to get feedback from you on this work if vendoring is something you are interested in still.

---

<div class="post-metadata">

**Author:** ![eeyun1](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/eeyun1/32/2658_2.png) [@eeyun1](https://discourse.chef.io/u/eeyun1)\
**Post date:** [October 4, 2018, 1:41pm UTC](https://discourse.chef.io/t/help-wanted-vendoring-python-modules/18866/5 "2018-10-04T13:41:10Z")

</div>

Sorry for the delayed response on this!

I think having larger python modules packaged as py-FOO or python-FOO is actually probably a fairly good idea. A year ago I likely wouldn’t have thought so but considering that all other major distros do this (well at least arch and ubuntu) it probably makes sense. The difficult bit will be determining where to draw the line on what is reasonable to package separately and what’s not. Any ideas?

---

<div class="post-metadata">

**Author:** ![bixu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bixu/32/2907_2.png) [@bixu](https://discourse.chef.io/u/bixu)\
**Post date:** [October 4, 2018, 4:20pm UTC](https://discourse.chef.io/t/help-wanted-vendoring-python-modules/18866/6 "2018-10-04T16:20:48Z")

</div>

I’d leave this up to operator pain. Make it easy to vendor new modules and describe how to test them, and that process can be used for community-contributed PRs.

If I had to do this quantitatively, I’d vendor any module taking seconds over a threshold to install in a Habitat build.

The other major reason to vendor would be problems with compiled extensions related to external dependencies, but that I’d also let developer pain drive.

---

<div class="post-metadata">

**Author:** ![bixu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bixu/32/2907_2.png) [@bixu](https://discourse.chef.io/u/bixu)\
**Post date:** [October 5, 2018, 2:26pm UTC](https://discourse.chef.io/t/help-wanted-vendoring-python-modules/18866/7 "2018-10-05T14:26:45Z")

</div>

So, @eeyun & @bdangit, would you like to see these in a PR to `core`?

If so, I think we need a naming convention that makes sense. It does indeed look like Ubuntu/Debian do it like `<language_name>-<vendored_module_name>`. Until `hab pkg search` is fixed I think it makes sense to use names that people can at least guess, and `apt` still seems widespread, so it makes sense to me to follow that naming convention (plus the convention itself seems pretty sane).

---

<div class="post-metadata">

**Author:** ![eeyun1](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/eeyun1/32/2658_2.png) [@eeyun1](https://discourse.chef.io/u/eeyun1)\
**Post date:** [October 8, 2018, 3:23pm UTC](https://discourse.chef.io/t/help-wanted-vendoring-python-modules/18866/8 "2018-10-08T15:23:42Z")

</div>

Yeah I think I’m good with that personally. It’s possible other maintainers will disagree but I’m willing to advocate for it.

---

<div class="post-metadata">

**Author:** ![bixu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bixu/32/2907_2.png) [@bixu](https://discourse.chef.io/u/bixu)\
**Post date:** [October 8, 2018, 3:36pm UTC](https://discourse.chef.io/t/help-wanted-vendoring-python-modules/18866/9 "2018-10-08T15:36:27Z")

</div>

But does this mean you want to see a PR? 😉

---

<div class="post-metadata">

**Author:** ![bdangit](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bdangit/32/1466_2.png) [@bdangit](https://discourse.chef.io/u/bdangit)\
**Post date:** [October 8, 2018, 3:47pm UTC](https://discourse.chef.io/t/help-wanted-vendoring-python-modules/18866/10 "2018-10-08T15:47:50Z")

</div>

Yes. The reason is that the core-plans team is a bit larger community and while not everyone would be a pythonista, they can at least vet `plan.sh` semantics/style/best practices/etc.

A while back we had, @georgemarshall and a few others had consensus around `py3-<vendored_module_name>` or `py2-<vendored_module_name>`.

shore up the pr! Give us `py3-scipy` and `py3-tensorflow` 😄
