Open austinkeller opened 8 years ago
Hi, sorry for the delay, busy here...
I think this is a windows-specific bug (I'm assuming that paths are separated by '/'). I fixed the first culprit, but I don' t have a windows machine to test it. Can you confirm if the bug is gone?
It seems like using \\
in place of /
still isn't behaving right:
(py3) c:\proj\deleteme2>python-boilerplate init
Project's name: test
Author's name: tester
Author's email: test@test.com
Python name: [test]
Your config file was saved as boilerplate.ini. Leave blank to continue or specify a text editor.
Editor:
creating c:\proj\deleteme2\VERSION...
creating c:\proj\deleteme2\.gitignore...
creating c:\proj\deleteme2\README.rst...
creating c:\proj\deleteme2\INSTALL.rst...
creating c:\proj\deleteme2\LICENSE...
creating c:\proj\deleteme2\tasks.py...
creating c:\proj\deleteme2\setup.py...
creating c:\proj\deleteme2\MANIFEST.in...
creating c:\proj\deleteme2\requirements.txt...
creating c:\proj\deleteme2\src\test\__init__.py...
Traceback (most recent call last):
File "c:\users\austin\anaconda2\envs\py3\lib\runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\austin\anaconda2\envs\py3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Austin\Anaconda2\envs\py3\Scripts\python-boilerplate.exe\__main__.py", line 9, in <module>
File "c:\users\austin\anaconda2\envs\py3\lib\site-packages\python_boilerplate\__main__.py", line 11, in main
func(args)
File "c:\users\austin\anaconda2\envs\py3\lib\site-packages\python_boilerplate\commands\parser.py", line 41, in handler
func(**kwargs)
File "c:\users\austin\anaconda2\envs\py3\lib\site-packages\python_boilerplate\commands\parser.py", line 32, in handler
writer.run()
File "c:\users\austin\anaconda2\envs\py3\lib\site-packages\python_boilerplate\commands\init.py", line 109, in run
'%s/__init__.py' % basedir, ignore=True)
File "c:\users\austin\anaconda2\envs\py3\lib\site-packages\python_boilerplate\core.py", line 136, in write
hash = write_template(template, context, ignore=ignore, path=path)
File "c:\users\austin\anaconda2\envs\py3\lib\site-packages\python_boilerplate\jinja.py", line 61, in write_template
with open(path, 'w') as F:
FileNotFoundError: [Errno 2] No such file or directory: 'src\\test\\__init__.py'
I'll try getting a debugger for this running on my Windows machine to get some more helpful information
It is using abspath in the hope that it works on windows now. I hope it finally works :)
Here is the error observed in python 2:
and here is the error observed in python 3 (after manually adding PEP encoding specifier to
__meta__.py
file, see #3 )