Commit Graph

18 Commits (496f51ceacdebb76a91bda2973ae35f5afae90de)

Author SHA1 Message Date
Philip Douglass e6f63be7a4
Honor `--quiet` parameter properly in fish shell (#77180)
* The `^` stderr redirection is deprecated
* Setting `-q` for `setup.py` in `gen_egg_info` is redundant
3 years ago
Matt Martz 66a83314b9
Modernize install (#76021)
Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Matt Davis <mrd@redhat.com>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
3 years ago
Sam Doran 93e72c96f0
Update hacking `env_setup` to prefer Python 3 (#75213)
* env_setup - Prefer Python3

Prefer the 'python3' executable over 'python'.

* Add shebang for syntax detection

While the script isn't executable and we recommend sourcing it, having a shebang allows
variuos text editors to detect that it is a shell script and apply proper syntax highlighting.
3 years ago
Sam Doran 4de516d35f Do not set ANSIBLE_LIBRARY in env-setup.fish (#63688)
Setting this env var was removed from env-setup back in 2014. Not sure why it is in this setup script and it interferes with the defult search path
5 years ago
Elijah Lynn 19c6448459 Fix "no matches for wildcard" error in env-setup.fish script. (#58345)
See https://github.com/ansible/ansible/pull/58345#discussion_r297288979
5 years ago
Matt Clay f3d1f9544b
Make ansible-test available in the bin directory. (#45876) 6 years ago
Sam Doran aa19563388 Improve fish environment setup (#26151)
* Add test runner to PATH

* Add Python3 support

* Updating env-setup.fish to use more portable '-exec' rather than '-delete'

* Create gen_egg_info function

Move code into a function similar to env-setup.

Silence all output when run with -q
7 years ago
Sam Doran cf8639ff62 Fish hacking setup fix (#18084)
* Remove old egg-info files before creating new ones

Currently, setup.py generates egg files then they are deleted. This change
fixes this behavior and matches that in env-setup.

* Do not try to move ansible*egg-info to lib/

setup.py creates the ansible.egg-info in lib/ so this step is unnecessary. Matches env-setup behavior.

* Better test for number of arguments in argv

This prevents an erronous error message from being thrown since set -q returns an error code with the number of variables not defined, resulting in a non-zero exit if no arguments are passed.

Indent case statement within switch statement.
8 years ago
André Pinto fa4011c6c3 Do not corrupt $MANPATH when it's not present (#16300)
Fixes #16299
9 years ago
Brett Inman 1f89a46b52 Make -q flag totally quiet for env-setup.fish
The first echo and setup.py steps are not quiet and result in output that is annoying if your Fish is configured to source the file.
9 years ago
Luke Rohde cba4642d8d Use find ... -delete instead of non-portable globbing 9 years ago
Luke Rohde 647e48f776 Delete all compiled python files when running hacking/env-setup 9 years ago
Brian Coca 88443d6dcf Merge pull request #7306 from abadger/feature/egg-info
Feature/egg info
10 years ago
Michael Salmon e827ec702e Fix issue #8578. Setting envvar in ""'s ensures the PYTHONPATH is set to
include the lib/ directory.

Before - PYTHONPATH is empty.. ansible fails to run

    $ source hacking/env-setup.fish
    Appending PYTHONPATH

    Setting up Ansible to run out of checkout...

    PATH=/Volumes/opt/src/ansible/bin /usr/local/share/python3 /usr/local/bin
    /usr/bin /bin /usr/sbin /sbin /usr/local/bin /opt/X11/bin /usr/bin /sbin
    /usr/local/bin /Users/ms/bin/
    PYTHONPATH=
    ANSIBLE_LIBRARY=/Volumes/opt/src/ansible/library
    ...

    Traceback (most recent call last):
      File "/Volumes/opt/src/ansible/bin/ansible", line 25, in <module>
          from ansible.runner import Runner
          ImportError: No module named ansible.runner

After change - it's set.. ansible runs.

    source hacking/env-setup.fish
    Appending PYTHONPATH

    Setting up Ansible to run out of checkout...

    PATH=/Volumes/opt/src/ansible/bin /usr/local/share/python3 /usr/local/bin
    /usr/bin /bin /usr/sbin /sbin /usr/local/bin /opt/X11/bin /usr/bin /sbin
    /usr/local/bin /Users/ms/bin/
    PYTHONPATH=/Volumes/opt/src/ansible/lib:
    ANSIBLE_LIBRARY=/Volumes/opt/src/ansible/library
    ....

    $ ansible
    Usage: ansible <host-pattern> [options]
10 years ago
Toshio Kuratomi 6a6060ac55 Teach env-setup how to create egg-info for ansible so that pkg_resources works 11 years ago
Jharrod LaFon 996f87d898 Fixed usage comment to fish syntax for sourcing a file 11 years ago
Jharrod LaFon d0fe447fd1 Fixed incorrectly set PYTHONPATH 11 years ago
Jharrod LaFon dbfcd78790 Added an env-setup file for Fish 11 years ago