Ah, I ended up getting a reply on that github thread.

The answer is here: 
https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#running-from-source

I have submitted PR #55902 <https://github.com/ansible/ansible/pull/55902> 
to add that link to the README.

Regards,
Matt

On Tuesday, April 30, 2019 at 4:07:08 PM UTC+10, Matthew Davis wrote:
>
> I asked this in github issue #55900 
> <https://github.com/ansible/ansible/issues/55900> but got directed here.
>
> I want to contribute to Ansible.
>
> I have a patch I want to submit. But first I need to run it to make sure 
> it actually works.
>
> How can I run Ansible from source?
>
> The github README and the Contributing to Ansible 
> <https://docs.ansible.com/ansible/latest/community/how_can_I_help.html#review-and-submit-pull-requests>
>  
> doc pages do not explain how.
>
> What I tried:
>
> I looked in `README.rst`, but there are no instructions there.
>
> I see a `Makefile`, and no `config.sh` or `autoconfig.sh`. So I try just 
> `make`.
>
> ```
> ImportError: No module named **packaging.version**
> ```
>
> I see `requirements.txt`. There is no comment in there or anywhere else 
> telling me whether that's for python 2 or 3.
>
> ```
> virtualenv env -p $(which python3)
> . ./env/bin/activate
> pip install -r requirements.txt
> make
> ```
>
> Same error
>
> ```
> pip install packaging
> make
> ```
>
> Now that does build. But why is `packaging` not in `requirements.txt`?
>
> Then I try to find where the build output is.
>
> ```
> $ find ./ -name ansible | xargs file
> ./build/lib/ansible:                   directory
> ./build/scripts-3.6/ansible:           Python script, ASCII text executable
> ./bin/ansible:                         Python script, ASCII text executable
> ./docs/docsite/js/ansible:             directory
> ./lib/ansible:                         directory
> ./packaging/macports/sysutils/ansible: directory
> ./packaging/port/sysutils/ansible:     directory
> ./test/integration/targets/ansible:    directory
> ./test/runner/injector/ansible:        symbolic link to python.py
> ```
> Then `./bin/ansible --version`. That fails with `ModuleNotFoundError: No 
> module named 'ansible'`
>
> Same with `./build/scripts-3.6/ansible --version`.
>
> I want to contribute, but I just can't figure out how.
>
> * What dependencies do I need? 
> * python 2 or 3?
> * do I need to run `setup.py` or something to install the output of the 
> build process into a virtualenv in order to actually test it?
>
> Thanks,
> Matt
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/490b6037-55d1-4658-bc1a-a1b1bd60e467%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to