diff --git a/README.md b/README.md
index ea7df6a..4a1150a 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ PROS CLI can be installed directly from source with the following prerequisites:
- PIP (default in Python 3.5)
- Setuptools (default in PYthon 3.5)
-Clone this repository, then run `pip install --executable
`. Pip will install all the dependencies necessary.
+Clone this repository, then run `pip install -e `. Pip will install all the dependencies necessary.
## About this project
This python project contains 4 modules: proscli, prosconductor, prosconfig, and prosflasher
@@ -35,4 +35,4 @@ These files are serialized by jsonpickle.
### prosflasher
prosflasher contains the logic necessary to upload binaries to the VEX Cortex Microcontroller. In the future, we'd like
-to reinclude the ability to manipulate the file system.
\ No newline at end of file
+to reinclude the ability to manipulate the file system.
diff --git a/proscli/conductor_management.py b/proscli/conductor_management.py
index c6e0b66..fcabbce 100644
--- a/proscli/conductor_management.py
+++ b/proscli/conductor_management.py
@@ -23,8 +23,8 @@
def create_template(cfg, name, version, depot, location, ignore, upgrade_files):
first_run(cfg)
template = local.create_template(utils.Identifier(name, version, depot), location=location)
- template.template_ignore = ignore
- template.upgrade_paths = upgrade_files
+ template.template_ignore = list(ignore)
+ template.upgrade_paths = list(upgrade_files)
template.save()
click.echo(jsonpickle.encode(template))
click.echo('Created template at {}'.format(template.save_file))
diff --git a/prosconductor/providers/local.py b/prosconductor/providers/local.py
index 30707e7..022300c 100644
--- a/prosconductor/providers/local.py
+++ b/prosconductor/providers/local.py
@@ -117,10 +117,12 @@ def create_project(identifier, dest, pros_cli=None):
copytree(config.directory, dest)
for root, dirs, files in os.walk(dest):
for d in dirs:
+ d = os.path.relpath(os.path.join(root, d), config.directory)
if any([fnmatch.fnmatch(d, p) for p in config.template_ignore]):
verbose('Removing {}'.format(d))
os.rmdir(os.path.join(root, d))
for f in files:
+ f = os.path.relpath(os.path.join(root, f), config.directory)
if any([fnmatch.fnmatch(f, p) for p in config.template_ignore]):
verbose('Removing {}'.format(f))
os.remove(os.path.join(root, f))
@@ -144,27 +146,27 @@ def upgrade_project(identifier, dest, pros_cli=None):
config = TemplateConfig(file=filename)
for root, dirs, files in os.walk(config.directory):
for d in dirs:
+ f = os.path.relpath(os.path.join(root, d), config.directory)
if any([fnmatch.fnmatch(d, p) for p in config.upgrade_paths]):
verbose('Upgrading {}'.format(d))
- relpath = os.path.relpath(os.path.join(root, d), config.directory)
- shutil.copytree(os.path.join(config.directory, relpath), os.path.join(proj_config.directory, relpath))
+ shutil.copytree(os.path.join(config.directory, f), os.path.join(proj_config.directory, f))
for f in files:
+ f = os.path.relpath(os.path.join(root, f), config.directory)
if any([fnmatch.fnmatch(f, p) for p in config.upgrade_paths]):
verbose('Upgrading {}'.format(f))
- relpath = os.path.relpath(os.path.join(root, f), config.directory)
- shutil.copyfile(os.path.join(config.directory, relpath), os.path.join(proj_config.directory, relpath))
+ shutil.copyfile(os.path.join(config.directory, f), os.path.join(proj_config.directory, f))
for root, dirs, files in os.walk(proj_config.directory):
for d in dirs:
+ d = os.path.relpath(os.path.join(root, d), proj_config.directory)
if any([fnmatch.fnmatch(d, p) for p in config.remove_paths]):
verbose('Removing {}'.format(d))
- relpath = os.path.relpath(os.path.join(root, d), proj_config.directory)
- shutil.rmtree(os.path.join(proj_config.directory, relpath))
+ shutil.rmtree(os.path.join(proj_config.directory, d))
for f in files:
+ f = os.path.relpath(os.path.join(root, f), proj_config.directory)
if any([fnmatch.fnmatch(f, p) for p in config.remove_paths]):
verbose('Removing {}'.format(f))
- relpath = os.path.relpath(os.path.join(root, f), proj_config.directory)
- os.remove(os.path.join(proj_config.directory, relpath))
+ os.remove(os.path.join(proj_config.directory, f))
proj_config.kernel = config.identifier.version
proj_config.save()