Making it easier to get submodules

31 views
Skip to first unread message

Marc Abramowitz

unread,
Nov 24, 2014, 7:51:54 PM11/24/14
to ansible...@googlegroups.com
So I had a slight hiccup the other day when I tried to contribute to ansible. I have contributed in the past, but it was before the ansible modules were split out into separate "core" and "extras" git repos.

So when I tried to run the tests, I was missing the proper git submodules.

My attempt at making this easier for people who want to contribute:


Serge raised some concerns about it possibly hurting some other workflows, which I hopefully handled, but it would be good to get more eyes on it.

To be honest, I'm not sure that `hacking/env-setup` is the right place to add this, but this is pirobably because in my ideal world, there would be no `hacking/env-setup` in the first place. I would love to just create a virtualenv and do `pip install -e .`. Last time I tried this, it didn't work because ansible was installing modules globally in /usr/share and such. But I noticed that there were a lot of changes in how stuff is organized since then, so it might be possible now out of the box or perhaps with a little work. If that were true, then I wouldn't need `hacking/env-setup`, but I would still need something to initialize the git submodules. So perhaps there's some other place where that can be done?

Marc

James Martin

unread,
Nov 24, 2014, 9:36:19 PM11/24/14
to ansible...@googlegroups.com
Marc,

Can you post this on the ansible-devel list?

Thanks,

James

Matt Martz

unread,
Nov 24, 2014, 9:37:37 PM11/24/14
to ansible...@googlegroups.com
Honestly, I don't like the change.  For me env-setup is not meant to setup ansible itself, it is just a shortcut to setting the environment vars to run Ansible from a git clone.

If you are running from source and using env-setup you should know how to handle the submodules.

This would actually break my work flow, since I am typically using this for developing ansible itself (including modules).  As such I don't typically have the submodules cloned.  I have an extra step in my work flow to fetch and merge the module repos into my own and add their paths to ANSIBLE_LIBRARY (this env var is set using postactivate from virtualenvwrappers).

I think fixing pip -e would be a good place to start. It largely does work but there are some PYTHONPATH issues that still linger. See https://github.com/ansible/ansible/issues/7092

I not sure with -e, but pip typically handles the submodule stuff itself without issues.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/dfd87bf8-91b7-4b8c-b3e2-b18323515cdc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Matt Martz
@sivel
sivel.net

Reply all
Reply to author
Forward
0 new messages