swc-windows-installer.py: Rework paths in main()
authorW. Trevor King <wking@tremily.us>
Mon, 21 Oct 2013 05:31:24 +0000 (22:31 -0700)
committerW. Trevor King <wking@tremily.us>
Mon, 21 Oct 2013 17:16:38 +0000 (10:16 -0700)
Based on Ethan's path handling in 833d0ee (Add a Nano installer for
Windows, 2013-09-17), while still retaining the entry-point creation
for IPython and nose.

setup/swc-windows-installer.py

index 341fac6676d6600c1d9db1922982dc0ad66e9a46..aba6b56199c8399abf837420da1110570d006b6d 100755 (executable)
@@ -93,11 +93,13 @@ def make_posix_path(windows_path):
 
 
 def main():
-    python_scripts_directory = "C:\\Anaconda\\Scripts\\"
-    #python_scripts_directory = "./scripts/"
-    create_ipython_entry_point(python_scripts_directory)
-    create_nosetests_entry_point(python_scripts_directory)
-    install_nano(python_scripts_directory)
+    home_dir = os.path.expanduser('~')
+    nano_dir = os.path.join(home_dir, '.nano')
+    bin_dir = os.path.join(home_dir, '.swc-bin')
+    create_ipython_entry_point(python_scripts_directory=bin_dir)
+    create_nosetests_entry_point(python_scripts_directory=bin_dir)
+    install_nano(installation_directory=nano_dir)
+    update_bash_profile(extra_paths=(bin_dir, nano_dir))
 
 
 if __name__ == '__main__':