mirror of https://github.com/explosion/spaCy.git
Make sure paths in copytree and rmtree are strings
This commit is contained in:
parent
fa6e3cefbb
commit
3e134b5b2b
|
@ -26,7 +26,7 @@ def package(input_dir, output_dir, force):
|
||||||
package_path = main_path / model_name
|
package_path = main_path / model_name
|
||||||
|
|
||||||
create_dirs(package_path, force)
|
create_dirs(package_path, force)
|
||||||
shutil.copytree(input_path, package_path / model_name_v)
|
shutil.copytree((input_path, package_path / model_name_v).as_posix())
|
||||||
create_file(main_path / 'meta.json', json.dumps(meta, indent=2))
|
create_file(main_path / 'meta.json', json.dumps(meta, indent=2))
|
||||||
create_file(main_path / 'setup.py', template_setup)
|
create_file(main_path / 'setup.py', template_setup)
|
||||||
create_file(main_path / 'MANIFEST.in', template_manifest)
|
create_file(main_path / 'MANIFEST.in', template_manifest)
|
||||||
|
@ -48,7 +48,7 @@ def check_dirs(input_path, output_path):
|
||||||
def create_dirs(package_path, force):
|
def create_dirs(package_path, force):
|
||||||
if package_path.exists():
|
if package_path.exists():
|
||||||
if force:
|
if force:
|
||||||
shutil.rmtree(package_path)
|
shutil.rmtree(package_path.as_posix())
|
||||||
else:
|
else:
|
||||||
util.sys_exit(package_path.as_posix(),
|
util.sys_exit(package_path.as_posix(),
|
||||||
"Please delete the directory and try again.",
|
"Please delete the directory and try again.",
|
||||||
|
|
Loading…
Reference in New Issue