[openstack-dev] [oslo][all] config sample tools on os x
Sergey Lukjanov
slukjanov at mirantis.com
Wed Feb 19 23:17:14 UTC 2014
Hey stackers,
tools/config/generate_sample.sh isn't working on OS X due to the getopt
usage. Any recipes / proposals to fix it? I have a workaround at least.
TL;DR
So, as I said tools/config/generate_sample.sh isn't working on OS X.
Specifically it just couldn't parse command line arguments w/o any errors,
just ignoring them. The reason of such behavior is significant difference
between GNU getopt and BSD one (used in OS X). Probably, it could be easily
fixed, but I don't know both of them.
The main issue is that many projects are
using tools/config/check_uptodate.sh in pep8 tox env to ensure that their
config sample is always uptodate. So, "tox -e pep8" command always failing
for such projects.
Workaround:
* install GNU getopt by using homebrew (brew install gnu-getopt) or
macports (port install getopts);
* add it to the PATH before the actual getopt before running tox;
* if you'd like to make it default just add it to your bashrc/zshrc/etcrc,
for example, for brew you should add: export PATH=$(brew --prefix
gnu-getopt)/bin:$PATH
Thanks.
--
Sincerely yours,
Sergey Lukjanov
Savanna Technical Lead
Mirantis Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140220/b45be53e/attachment.html>
More information about the OpenStack-dev
mailing list