Skip to content

Commit

Permalink
Fix post-start cleanup path references
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamu committed Jan 17, 2018
1 parent 8cb0fb3 commit 76acedc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ $ pinax tools

## Change Log

### 1.1.1

* Fix post-start cleanup path references

### 1.1.0

* Drop Python 3.3 support
Expand Down
20 changes: 11 additions & 9 deletions pcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,19 @@ def start_project(project, name, dev, location):
sys.exit(1)


def output_instructions(project, name):
def output_instructions(project):
if "instructions" in project:
click.echo(project["instructions"])


def cleanup(name):
# @@@ Should this be indicated in the project dict instead of hard coded?
os.remove(os.path.join(name, "LICENSE"))
os.remove(os.path.join(name, "CONTRIBUTING.md"))
os.remove(os.path.join(name, "update.sh"))
managepy = os.path.join(name, "manage.py")
def cleanup(name, location):
if not location:
# if location was not specified, start_project used `name` for new subdir
location = name
os.remove(os.path.join(location, "LICENSE"))
os.remove(os.path.join(location, "CONTRIBUTING.md"))
os.remove(os.path.join(location, "update.sh"))
managepy = os.path.join(location, "manage.py")
st = os.stat(managepy)
os.chmod(managepy, st.st_mode | stat.S_IEXEC)

Expand Down Expand Up @@ -144,8 +146,8 @@ def start(config, dev, location, project, name):
pip_install("Django")
start_project(projects[project], name, dev, location)
click.echo("Finished")
output_instructions(projects[project], name)
cleanup(name)
output_instructions(projects[project])
cleanup(name, location)
else:
click.echo("There are no releases for {}. You need to specify the --dev flag to use.".format(project))
except KeyError:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import find_packages, setup

VERSION = "1.1.0"
VERSION = "1.1.1"
LONG_DESCRIPTION = """
.. image:: http://pinaxproject.com/pinax-design/patches/pinax-blank.svg
:target: https://pypi.python.org/pypi/pinax-cli/
Expand Down

0 comments on commit 76acedc

Please sign in to comment.