Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plonecli_autocomplete.sh script gets mangled by setup.py scripts stanza #55

Open
fredvd opened this issue Jun 14, 2019 · 2 comments
Open

Comments

@fredvd
Copy link
Sponsor Member

fredvd commented Jun 14, 2019

  • Plone CLI version: 1.1
  • Python version: 2.7.16
  • Operating System: OSX 10.14

When I install plonecli in a tools builout using:

[plonecli]
recipe = zc.recipe.egg
eggs = plonecli

the plone_autocomplete.sh gets procesed by the setup.py scripts attribute at

scripts=['plonecli_autocomplete.sh'],

and the resulting bin/plonecli_autocomplete.sh is mangled. The first line is missing and replaced by a shebang to the local python executable and python syspath code is added at the end:

#!/Users/fred/buildouts/my.tools.buildout/bin/python2.7
    COMPREPLY=( $( env COMP_WORDS="${COMP_WORDS[*]}" \
                   COMP_CWORD=$COMP_CWORD \
                   _PLONECLI_COMPLETE=complete $1 ) )
    return 0
}

complete -F _plonecli_completion -o default plonecli;


import sys
sys.path[0:0] = [
  '/Users/fred/buildouts/my.tools.buildout/src/bobtemplates.plone',
  '/Users/fred/.buildout/eggs/plonecli-1.1-py2.7.egg',
  '/Users/fred/.buildout/eggs/zest.releaser-6.18.2-py2.7.egg',
  '/Users/fred/.buildout/eggs/virtualenv-15.1.0-py2.7.egg',
  '/Users/fred/.buildout/eggs/mr.bob-0.1.2-py2.7.egg',
  '/Users/fred/.buildout/eggs/Click-7.0-py2.7.egg',
  '/Users/fred/.buildout/eggs/twine-1.11.0-py2.7.egg',
  '/Users/fred/.buildout/eggs/six-1.11.0-py2.7.egg',
  '/Users/fred/.buildout/eggs/requests-2.18.4-py2.7.egg',
  '/Users/fred/.buildout/eggs/colorama-0.3.9-py2.7.egg',
  '/Users/fred/.buildout/eggs/Jinja2-2.10-py2.7.egg',
  '/Users/fred/.buildout/eggs/case_conversion-2.1.0-py2.7.egg',
  '/Users/fred/.buildout/eggs/lxml-4.1.1-py2.7-macosx-10.12-x86_64.egg',
  '/Users/fred/.buildout/eggs/tqdm-4.19.6-py2.7.egg',
  '/Users/fred/.buildout/eggs/requests_toolbelt-0.8.0-py2.7.egg',
  '/Users/fred/.buildout/eggs/pkginfo-1.4.2-py2.7.egg',
  '/Users/fred/.buildout/eggs/certifi-2018.1.18-py2.7.egg',
  '/Users/fred/.buildout/eggs/urllib3-1.22-py2.7.egg',
  '/Users/fred/.buildout/eggs/idna-2.6-py2.7.egg',
  '/Users/fred/.buildout/eggs/chardet-3.0.4-py2.7.egg',
  '/Users/fred/.buildout/eggs/MarkupSafe-1.0-py2.7-macosx-10.12-x86_64.egg',
  '/Users/fred/.buildout/eggs/regex-2018.8.29-py2.7-macosx-10.13-x86_64.egg',
  '/Users/fred/buildouts/my.tools.buildout/lib/python2.7/site-packages',
  ]




@fredvd
Copy link
Sponsor Member Author

fredvd commented Jun 14, 2019

Hmm, this seems to be caused by buildout. pip install plonecli in a virtualenv has the bin/plonecli_autocomplete.sh copied pristine without the modifications.

@MrTango
Copy link
Contributor

MrTango commented Nov 20, 2020

hm, there is actually no point in installing plonecli in buildout, i would say.
pip3 install plonecli --user is the way i recommend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants