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

String escaping in setup.py #11

Open
danohu opened this issue Nov 24, 2019 · 1 comment
Open

String escaping in setup.py #11

danohu opened this issue Nov 24, 2019 · 1 comment

Comments

@danohu
Copy link

danohu commented Nov 24, 2019

My surname contains an apostrophe.
The setup.py template uses this without escaping:

author='{{cookiecutter.full_name}}',

This leads to a SytaxError when I try to make use of setup.py:

python setup.py develop
File "setup.py", line 36
author='Dan O'Huiginn',
^
SyntaxError: invalid syntax

It looks like the same is true of all the other data included in setup.py

I looked around at how other cookiecutters handle this. Most don't, but the least-bad was:
cookiecutter-pypackage:

author="{{ cookiecutter.full_name.replace('"', '\"') }}",

@wdm0006
Copy link
Owner

wdm0006 commented Dec 10, 2019

That makes sense to me, would you like to issue a pull request?

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