Commit Graph

74 Commits (ab624ad0317205b76e3f3d6d65c2250b6ef6db06)

Author SHA1 Message Date
Matt Clay ab624ad031
ansible-test - Remove generation of egg-info (#83786)
Also remove egg-info generation from hacking/env-setup scripts.
1 year ago
htol d7fbde4ea9
Make "~/.ansible" path configurable (#76114)
* replace hardcoded '~/.ansible' to C.ANSIBLE_HOME
* rename previously existing env ANSIBLE_HOME in env-setup script
* modify cache dir monkeypatching in galaxy api unit tests
* update "version_added" to 2.14 for ANSIBLE_HOME
* fix description of collections with proper use of ANSIBLE_HOME

Co-authored-by: htol <github@h-tol.net>
Co-authored-by: stefanwascoding <stefan@syntaxhelden.de>
4 years ago
Pascal Höhnel 7cd94dd452
Fix unsafe handling of variable PYTHON_BIN (#76767)
The previous state lead to errors, when cloning the repo to a path with spaces in it.
4 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>
4 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.
4 years ago
Vincent Bernat 4afc228108
hacking: replace use of "which" with "command -v" (#71278)
"command -v" is the POSIX compliant way to get the path to a command.
It returns the path to the command if it exists and exits with a
non-zero status when it does not, without any output. "which" is not
POSIX and it can have various different effects. With Zsh, it says
"python not found" on stdout.

See:
 - https://pubs.opengroup.org/onlinepubs/009695399/utilities/command.html

Signed-off-by: Vincent Bernat <vincent@bernat.ch>
5 years ago
Matt Clay 7323d5dd0d Fix references to old egg-info directory. 6 years ago
Matt Clay f3d1f9544b
Make ansible-test available in the bin directory. (#45876) 7 years ago
Michael Scherer 83db157c35 Add a default man path (#45689)
It seems that on some Linux distribution (Fedora 28, Debian), man will
not fallback on a default path if MANPATH is set. So using the env-setup
script will prevent man from working.
7 years ago
Matt Clay 0392dbeba1 Fix path handling in hacking/env-setup. 7 years ago
Troy Murray 15ce7c5bab change OS X to macOS (#41294)
* change OS X to macOS

<!--- Your description here -->

+label: docsite_pr

* Update all Mac OS X references to be macOS

* Drop extra Mac
8 years ago
Matt Martz 8e523089ef Speed up env-setup (#24133) 9 years ago
Matt Clay 48e82b4ca8 Add `test/runner` to $PATH in `hacking/env-setup`. (#22387) 9 years ago
Michael Scherer 619f3d13ef Add detection of python3 to hacking/env-setup (#17357)
People can still override the detection using PYTHON_BIN
9 years ago
Josh Smift 81d7e132f9 force deletion of .pyc files (#17109) 9 years ago
Matt Davis 525c0469d2 tweak hacking/env-setup to work under ash (#17054) 9 years ago
Patrik Lundin 9f9944e355 Replace -delete with portable -exec rm {} \;
Needed on OpenBSD which does not support -delete.
10 years ago
Brian Coca 4a206cdde9 force egg deletion 10 years ago
James Cammarata a431121f9f Tweak to hacking path fix to go back to subshell use 10 years ago
EC bcdb4e78ae Allow env-setup to use spaces in full path 10 years ago
Luke Rohde cba4642d8d Use find ... -delete instead of non-portable globbing 10 years ago
Luke Rohde 647e48f776 Delete all compiled python files when running hacking/env-setup 10 years ago
Jody Frankowski bc1e1d2cdc Fix rm call in hacking/env-setup. Since it is sourced from a user shell,
rm can have an alias to 'rm -i', which will make sourcing hang when '-q'
is enabled.
10 years ago
Abhijit Menon-Sen 114070c226 Add missing $ 10 years ago
bryan hunt 7a76fcb159 merged 11 years ago
Sheldon Hearn c800a1c68a Preserve OLDPWD 11 years ago
Matt Martz 104b2036f7 egg_info is now written directly to lib 11 years ago
Toshio Kuratomi caf2a96ef9 Merge pdksh fix to v2 11 years ago
Patrik Lundin 731b268cd6 env-setup: Don't use ${.sh.file} if shell is pdksh
The default ksh in OpenBSD throws the following error:
===
$ . hacking/env-setup
ksh: hacking/env-setup[23]: ${.sh.file}": bad substitution
[...]
===

The same error can be seen on Linux if pdksh is used.
11 years ago
Toshio Kuratomi 7c86db3187 Add KSH compat
cherry picked from https://github.com/ansible/ansible/pull/6899
11 years ago
rpe-github 0a73067153 Use basename -- $0 in case $0 starts with a dash.
For example, pdksh $0 contains '-ksh'.
11 years ago
Marco Ippolito 23da2f6415 Redundant file descriptor specifier 11 years ago
Marco Ippolito 4cd5be396d BUG! Incorrect order of redirection AND incorrect redirection syntax
The replaced code only created a text file called `1' in the
current directory, it did *not* redirect output.
11 years ago
Marco Ippolito bc0f0f838e More elegant output using here-document syntax
POSIX section 2.7.4 defines here-documents.
11 years ago
Marco Ippolito 7eb278e797 Identified two verbosity levels: info, silent
Conflicts:
	hacking/env-setup
11 years ago
Marco Ippolito 9bc1e1a4a0 Reserve capitalised identifiers for system variables
Conflicts:
	hacking/env-setup
11 years ago
Marco Ippolito 53fadd371b No need to prepend `.' to a relative path 11 years ago
Toshio Kuratomi 566a8d1b9d Fix issue with mixing quoting and glo9bbing. 11 years ago
Toshio Kuratomi 365af69c3e More quotes and reimplement without pushd/popd 11 years ago
Toshio Kuratomi dde32a826f Set default values for shell variables that we use
Fixes #9991
11 years ago
Toshio Kuratomi 09e556e9a4 Get rid of bash compound command to make more portable 11 years ago
Toshio Kuratomi 245f934629 Remove shebang and execute perms for env-setup since it must be sourced 11 years ago
Marco Ippolito b688570380 Corrected quoting of parameter expansions in hacking/env-setup
Conflicts:
	hacking/env-setup
11 years ago
Marco Ippolito b8921706f8 Prefer modern-style Bash command substitution in hacking/env-setup
Conflicts:
	hacking/env-setup
11 years ago
Marco Ippolito 31c8523371 Updated shebang from #!/bin/bash to #!/usr/bin/env bash (more flexible) 11 years ago
Brian Coca 88443d6dcf Merge pull request #7306 from abadger/feature/egg-info
Feature/egg info
11 years ago
Bryan Hunt e5f651c458 export ANSIBLE_HOME so it can be used in scripts
In order that scripts like this can work 
```
#!/bin/bash
ansible -vvvv tag_instance_type_foo-training -i "${ANSIBLE_HOME}/plugins/inventory/ec2.py" --private-key=~/Downloads/foo-training.pem -u ec2-user -m ping
```
11 years ago
Michael DeHaan 7f6ab89b5b hacking/env-setup no longer needs to set library since modules appear as git submodules. 11 years ago
Toshio Kuratomi 6a6060ac55 Teach env-setup how to create egg-info for ansible so that pkg_resources works 12 years ago
willthames e2d04f7e96 Allow hacking/env-setup module path to use config file library path
hacking/env-setup now adds the configured library path in ANSIBLE_CONFIG
to the ANSIBLE_LIBRARY environment variable in addition to the previous
default of ANSIBLE_HOME/library.

This replaces #5950.
12 years ago