Fix default author name and email
@kakshay21 is already working on this.
Since Jan 14, 2019.
- Dominant language
- Python
- Stars
- 20
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
- Plone CLI version: 0.3.1.dev0
- Python version: 3.5.6
- Operating System: Manjaro
I was testing plonecli by creating an addon.
I started with plonecli create addon src/collective.todo
➜ plonecli create addon src/collective.todo
RUN: mrbob bobtemplates.plone:addon -O src/collective.todo
Welcome to mr.bob interactive mode. Before we generate a directory structure, some questions need to be answered.
Answer with a question mark to display help.
Values in square brackets at the end of the questions show the default value if there is no answer.
--> Author's name [b'mzfr']:
--> Author's email [b'mehtab.zafar98@gmail.com']:
--> Author's GitHub username: mzfr
--> Package description [An add-on for Plone]: Testing addon
--> Do you want me to initialze a GIT repository in your new package? (y/n) [y]: n
--> Plone version [5.1]: 5.1
git init is disabled!
Generated file structure at /home/mzfr/dev/plonecli/src/collective.todo
Here When I was prompted for Author's name instead of entering anything I simply pressed enter and same for Author's email.
Now when I tried to build by doing plonecli build I got an error:
➜ plonecli build
RUN: virtualenv .
Using base prefix '/usr'
New python executable in /home/mzfr/dev/plonecli/src/collective.todo/bin/python
Installing setuptools, pip, wheel...
done.
RUN: ./bin/pip install -r requirements.txt --upgrade
Collecting setuptools==38.2.4 (from -r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/bb/e0/ea620f9ecbaaaf3ebb288cdbbe8cc20b6a789c17e42d8916662b218e3349/setuptools-38.2.4-py2.py3-none-any.whl (489kB)
100% |████████████████████████████████| 491kB 3.0MB/s
Collecting zc.buildout==2.11.4 (from -r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/5b/87/e6f32bb65bc039aabbf7bc70e10826559e24664fdd395653ffb867e983d1/zc.buildout-2.11.4-py2.py3-none-any.whl (157kB)
100% |████████████████████████████████| 163kB 4.6MB/s
Installing collected packages: setuptools, zc.buildout
Found existing installation: setuptools 40.6.3
Uninstalling setuptools-40.6.3:
Successfully uninstalled setuptools-40.6.3
Successfully installed setuptools-38.2.4 zc.buildout-2.11.4
RUN: ./bin/buildout
Creating directory '/home/mzfr/dev/plonecli/src/collective.todo/eggs'.
Getting distribution for 'mr.developer>=1.38'.
Got mr.developer 1.38.
Creating directory '/home/mzfr/dev/plonecli/src/collective.todo/parts'.
Creating directory '/home/mzfr/dev/plonecli/src/collective.todo/develop-eggs'.
Develop: '/home/mzfr/dev/plonecli/src/collective.todo/.'
Traceback (most recent call last):
File "/tmp/tmpwittrhfd", line 14, in <module>
exec(compile(f.read(), '/home/mzfr/dev/plonecli/src/collective.todo/./setup.py', 'exec'))
File "/home/mzfr/dev/plonecli/src/collective.todo/./setup.py", line 32
author='b'mzfr'',
^
SyntaxError: invalid syntax
While:
Installing.
Processing develop directory '/home/mzfr/dev/plonecli/src/collective.todo/.'.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/home/mzfr/dev/plonecli/src/collective.todo/lib/python3.5/site-packages/zc/buildout/buildout.py", line 2127, in main
getattr(buildout, command)(args)
File "/home/mzfr/dev/plonecli/src/collective.todo/lib/python3.5/site-packages/zc/buildout/buildout.py", line 659, in install
installed_develop_eggs = self._develop()
File "/home/mzfr/dev/plonecli/src/collective.todo/lib/python3.5/site-packages/zc/buildout/buildout.py", line 902, in _develop
zc.buildout.easy_install.develop(setup, dest)
File "/home/mzfr/dev/plonecli/src/collective.todo/lib/python3.5/site-packages/zc/buildout/easy_install.py", line 1067, in develop
call_subprocess(args)
File "/home/mzfr/dev/plonecli/src/collective.todo/lib/python3.5/site-packages/zc/buildout/easy_install.py", line 165, in call_subprocess
% repr(args)[1:-1])
Exception: Failed to run command:
'/home/mzfr/dev/plonecli/src/collective.todo/bin/python', '/tmp/tmpwittrhfd', '-q', 'develop', '-mN', '-d', '/home/mzfr/dev/plonecli/src/collective.todo/develop-eggs/tmp68f0ovilbuild'
In the first traceback we can see that author='b'mzfr'', is causing a problem because b'mzfr' is actually treated as a string so an extra '' are added around that. This same problem is happening with the email.
This was fixed when I removed those extra quotes('') from the name and email i.e
author='b'mzfr'' changes to `author=b'mzfr' and
author='b'mehtab.zafar98@gmail.com'' changes to author=b'mehtab.zafar98@gmail.com'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.