Skip to content

Commit

Permalink
Add support for -sdk-site-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ddevault committed Oct 14, 2014
1 parent 665a3ee commit 4b18bbb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions init.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def execute(project_name=None, emulator=None, debugger=None, assembler=None, pla
root = os.getcwd()
exists = setup_root(root, project_name)
proj = Project(root)
site_packages = []
if exists and not project_name:
project_name = proj.get_config("name")
print("Found existing project: " + project_name)
Expand All @@ -23,6 +24,8 @@ def execute(project_name=None, emulator=None, debugger=None, assembler=None, pla
emulator=proj.get_config("-sdk-debugger")
if proj.get_config("-sdk-assembler"):
emulator=proj.get_config("-sdk-assembler")
if proj.get_config("-sdk-site-packages"):
site_packages=proj.get_config("-sdk-site-packages").split(" ")
template_vars = {
'project_name': project_name,
'assembler': assembler,
Expand Down Expand Up @@ -65,6 +68,9 @@ def execute(project_name=None, emulator=None, debugger=None, assembler=None, pla
if not "core/init" in packages:
packages.append("core/init") # init is the only package that's actually required
cmd_install(packages, site_only=True, init=True)
if len(site_packages) != 0:
print("Installing site packages...")
cmd_install(site_packages, site_only=True, init=True)
if which('git') != None:
if not os.path.exists(os.path.join(root, ".git")):
print("Initializing new git repository...")
Expand Down
1 change: 1 addition & 0 deletions templates/variables.make
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ FAT:={{ fat }}
OUT:=bin/
ROOT:=$(OUT)root/
BIN:=$(ROOT)bin/
LIB:=$(ROOT)lib/
ETC:=$(ROOT)etc/
VAR:=$(ROOT)var/
SHARE:=$(ROOT)share/
Expand Down

0 comments on commit 4b18bbb

Please sign in to comment.