Permalink
Browse files

Reorganizing

  • Loading branch information...
1 parent 630b810 commit cb342aec74e65c35581107b3ed517ecc8534ee39 Ram Rachum committed Aug 8, 2009
Showing 2,083 changed files with 123,994 additions and 72 deletions.
View
@@ -1,41 +0,0 @@
-; Script generated by the Inno Setup Script Wizard.
-; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
-
-[Setup]
-; NOTE: The value of AppId uniquely identifies this application.
-; Do not use the same AppId value in installers for other applications.
-; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
-AppId={{657B90EF-9B12-4E9C-A7C1-1120845C2C75}
-AppName=PythonTurtle
-AppVerName=PythonTurtle 0.1
-AppPublisher=cool-RR and friends
-AppPublisherURL=http://www.pythonturtle.com
-AppSupportURL=http://www.pythonturtle.com
-AppUpdatesURL=http://www.pythonturtle.com
-DefaultDirName={pf}\PythonTurtle
-DefaultGroupName=PythonTurtle
-LicenseFile=MIT license 2009 Ram Rachum.txt
-OutputBaseFilename=pythonturtle
-Compression=lzma
-SolidCompression=yes
-OutputDir=.
-
-[Languages]
-Name: "english"; MessagesFile: "compiler:Default.isl"
-
-[Tasks]
-Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
-
-[Files]
-Source: "src\dist\pythonturtle.exe"; DestDir: "{app}"; Flags: ignoreversion
-Source: "src\dist\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
-; NOTE: Don't use "Flags: ignoreversion" on any shared system files
-
-[Icons]
-Name: "{group}\PythonTurtle"; Filename: "{app}\pythonturtle.exe"
-Name: "{group}\{cm:UninstallProgram,PythonTurtle}"; Filename: "{uninstallexe}"
-Name: "{commondesktop}\PythonTurtle"; Filename: "{app}\pythonturtle.exe"; Tasks: desktopicon
-
-[Run]
-Filename: "{app}\pythonturtle.exe"; Description: "{cm:LaunchProgram,PythonTurtle}"; Flags: nowait postinstall skipifsilent
-
@@ -0,0 +1,3 @@
+cd src
+py2app_setup.py py2app
+cd..
@@ -0,0 +1,41 @@
+; Script generated by the Inno Setup Script Wizard.
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
+
+[Setup]
+; NOTE: The value of AppId uniquely identifies this application.
+; Do not use the same AppId value in installers for other applications.
+; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
+AppId={{657B90EF-9B12-4E9C-A7C1-1120845C2C75}
+AppName=PythonTurtle
+AppVerName=PythonTurtle 0.1
+AppPublisher=cool-RR and friends
+AppPublisherURL=http://www.pythonturtle.com
+AppSupportURL=http://www.pythonturtle.com
+AppUpdatesURL=http://www.pythonturtle.com
+DefaultDirName={pf}\PythonTurtle
+DefaultGroupName=PythonTurtle
+LicenseFile=..\MIT license 2009 Ram Rachum.txt
+OutputBaseFilename=pythonturtle
+Compression=lzma
+SolidCompression=yes
+OutputDir=".."
+
+[Languages]
+Name: "english"; MessagesFile: "compiler:Default.isl"
+
+[Tasks]
+Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
+
+[Files]
+Source: "..\win_dist\pythonturtle.exe"; DestDir: "{app}"; Flags: ignoreversion
+Source: "..\win_dist\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
+; NOTE: Don't use "Flags: ignoreversion" on any shared system files
+
+[Icons]
+Name: "{group}\PythonTurtle"; Filename: "{app}\pythonturtle.exe"
+Name: "{group}\{cm:UninstallProgram,PythonTurtle}"; Filename: "{uninstallexe}"
+Name: "{commondesktop}\PythonTurtle"; Filename: "{app}\pythonturtle.exe"; Tasks: desktopicon
+
+[Run]
+Filename: "{app}\pythonturtle.exe"; Description: "{cm:LaunchProgram,PythonTurtle}"; Flags: nowait postinstall skipifsilent
+
@@ -0,0 +1,34 @@
+"""
+Module for finding out the directory of the program we are running,
+be it a Python script or an executable.
+Use homedirectory.do() to set this path as the current os path and to
+add it to sys.path.
+"""
+
+import os
+import sys
+
+def _are_we_frozen():
+ """Returns whether we are frozen via py2exe.
+ This will affect how we find out where we are located."""
+
+ return hasattr(sys, "frozen")
+
+
+def our_path():
+ """ This will get us the program's directory,
+ even if we are frozen using py2exe"""
+
+ if _are_we_frozen():
+ return os.path.dirname(unicode(sys.executable, sys.getfilesystemencoding( )))
+
+ return os.path.dirname(unicode(__file__, sys.getfilesystemencoding( )))
+
+def do():
+ """
+ Sets the directory containing our program as the current directory in os,
+ as well as adding it to sys.path.
+ """
+ path=our_path()
+ os.chdir(path)
+ sys.path.append(path)
@@ -0,0 +1,19 @@
+"""
+This is a setup.py script generated by py2applet
+
+Usage:
+ python setup.py py2app
+"""
+
+from setuptools import setup
+
+APP = ['pythonturtle.py']
+DATA_FILES = []
+OPTIONS = {'argv_emulation': True}
+
+setup(
+ app=APP,
+ data_files=DATA_FILES,
+ options={'py2app': OPTIONS},
+ setup_requires=['py2app'],
+)
@@ -0,0 +1,40 @@
+import os
+import sys
+from distutils.core import setup
+import py2exe
+
+import homedirectory
+our_path = homedirectory.our_path()
+
+def smart_join(*args):
+ temp = os.path.join(*args)
+ optimized = os.path.realpath(temp)
+ return str(optimized) # to convert from unicode to ascii
+
+path_to_root = smart_join(our_path, "..", "..")
+path_to_src = smart_join(path_to_root, "src")
+path_to_resources = smart_join(path_to_src, "resources")
+
+
+
+os.chdir(path_to_src)
+sys.path.append(path_to_src)
+
+data_files=[]
+for files in os.listdir(path_to_resources):
+ f1 = smart_join(path_to_resources, files)
+ if os.path.isfile(f1): # skip directories
+ f2 = 'resources', [f1]
+ data_files.append(f2)
+
+
+path_to_script = smart_join(path_to_src, "pythonturtle.py")
+path_to_icon = smart_join(path_to_resources, "icon.ico")
+path_to_dist = smart_join(path_to_root, "win_dist")
+
+options_for_py2exe = {"dist_dir": path_to_dist} # Put more options here?
+
+setup(windows=[{"script": path_to_script,
+ "icon_resources": [(0, path_to_icon)]}],
+ data_files=data_files,
+ options={"py2exe": options_for_py2exe})
@@ -0,0 +1,4 @@
+cd plumbing
+py2exe_setup.py py2exe
+rd /s /q build
+cd..
View
@@ -1,2 +0,0 @@
-cd src
-setup.py py2exe
@@ -0,0 +1,19 @@
+
+def __load():
+ import imp, os, sys
+ ext = '_bsddb.pyd'
+ for path in sys.path:
+ if not path.endswith('lib-dynload'):
+ continue
+ ext = os.path.join(path, ext)
+ if os.path.exists(ext):
+ #print "py2app extension module", __name__, "->", ext
+ mod = imp.load_dynamic(__name__, ext)
+ #mod.frozen = 1
+ break
+ else:
+ raise ImportError, repr(ext) + " not found"
+ else:
+ raise ImportError, "lib-dynload not found"
+__load()
+del __load
@@ -0,0 +1,19 @@
+
+def __load():
+ import imp, os, sys
+ ext = '_ctypes.pyd'
+ for path in sys.path:
+ if not path.endswith('lib-dynload'):
+ continue
+ ext = os.path.join(path, ext)
+ if os.path.exists(ext):
+ #print "py2app extension module", __name__, "->", ext
+ mod = imp.load_dynamic(__name__, ext)
+ #mod.frozen = 1
+ break
+ else:
+ raise ImportError, repr(ext) + " not found"
+ else:
+ raise ImportError, "lib-dynload not found"
+__load()
+del __load
@@ -0,0 +1,19 @@
+
+def __load():
+ import imp, os, sys
+ ext = '_ctypes_test.pyd'
+ for path in sys.path:
+ if not path.endswith('lib-dynload'):
+ continue
+ ext = os.path.join(path, ext)
+ if os.path.exists(ext):
+ #print "py2app extension module", __name__, "->", ext
+ mod = imp.load_dynamic(__name__, ext)
+ #mod.frozen = 1
+ break
+ else:
+ raise ImportError, repr(ext) + " not found"
+ else:
+ raise ImportError, "lib-dynload not found"
+__load()
+del __load
@@ -0,0 +1,19 @@
+
+def __load():
+ import imp, os, sys
+ ext = '_elementtree.pyd'
+ for path in sys.path:
+ if not path.endswith('lib-dynload'):
+ continue
+ ext = os.path.join(path, ext)
+ if os.path.exists(ext):
+ #print "py2app extension module", __name__, "->", ext
+ mod = imp.load_dynamic(__name__, ext)
+ #mod.frozen = 1
+ break
+ else:
+ raise ImportError, repr(ext) + " not found"
+ else:
+ raise ImportError, "lib-dynload not found"
+__load()
+del __load
@@ -0,0 +1,19 @@
+
+def __load():
+ import imp, os, sys
+ ext = '_hashlib.pyd'
+ for path in sys.path:
+ if not path.endswith('lib-dynload'):
+ continue
+ ext = os.path.join(path, ext)
+ if os.path.exists(ext):
+ #print "py2app extension module", __name__, "->", ext
+ mod = imp.load_dynamic(__name__, ext)
+ #mod.frozen = 1
+ break
+ else:
+ raise ImportError, repr(ext) + " not found"
+ else:
+ raise ImportError, "lib-dynload not found"
+__load()
+del __load
@@ -0,0 +1,19 @@
+
+def __load():
+ import imp, os, sys
+ ext = '_msi.pyd'
+ for path in sys.path:
+ if not path.endswith('lib-dynload'):
+ continue
+ ext = os.path.join(path, ext)
+ if os.path.exists(ext):
+ #print "py2app extension module", __name__, "->", ext
+ mod = imp.load_dynamic(__name__, ext)
+ #mod.frozen = 1
+ break
+ else:
+ raise ImportError, repr(ext) + " not found"
+ else:
+ raise ImportError, "lib-dynload not found"
+__load()
+del __load
@@ -0,0 +1,19 @@
+
+def __load():
+ import imp, os, sys
+ ext = '_multiprocessing.pyd'
+ for path in sys.path:
+ if not path.endswith('lib-dynload'):
+ continue
+ ext = os.path.join(path, ext)
+ if os.path.exists(ext):
+ #print "py2app extension module", __name__, "->", ext
+ mod = imp.load_dynamic(__name__, ext)
+ #mod.frozen = 1
+ break
+ else:
+ raise ImportError, repr(ext) + " not found"
+ else:
+ raise ImportError, "lib-dynload not found"
+__load()
+del __load
@@ -0,0 +1,19 @@
+
+def __load():
+ import imp, os, sys
+ ext = '_socket.pyd'
+ for path in sys.path:
+ if not path.endswith('lib-dynload'):
+ continue
+ ext = os.path.join(path, ext)
+ if os.path.exists(ext):
+ #print "py2app extension module", __name__, "->", ext
+ mod = imp.load_dynamic(__name__, ext)
+ #mod.frozen = 1
+ break
+ else:
+ raise ImportError, repr(ext) + " not found"
+ else:
+ raise ImportError, "lib-dynload not found"
+__load()
+del __load
@@ -0,0 +1,19 @@
+
+def __load():
+ import imp, os, sys
+ ext = '_sqlite3.pyd'
+ for path in sys.path:
+ if not path.endswith('lib-dynload'):
+ continue
+ ext = os.path.join(path, ext)
+ if os.path.exists(ext):
+ #print "py2app extension module", __name__, "->", ext
+ mod = imp.load_dynamic(__name__, ext)
+ #mod.frozen = 1
+ break
+ else:
+ raise ImportError, repr(ext) + " not found"
+ else:
+ raise ImportError, "lib-dynload not found"
+__load()
+del __load
@@ -0,0 +1,19 @@
+
+def __load():
+ import imp, os, sys
+ ext = '_ssl.pyd'
+ for path in sys.path:
+ if not path.endswith('lib-dynload'):
+ continue
+ ext = os.path.join(path, ext)
+ if os.path.exists(ext):
+ #print "py2app extension module", __name__, "->", ext
+ mod = imp.load_dynamic(__name__, ext)
+ #mod.frozen = 1
+ break
+ else:
+ raise ImportError, repr(ext) + " not found"
+ else:
+ raise ImportError, "lib-dynload not found"
+__load()
+del __load
Oops, something went wrong.

0 comments on commit cb342ae

Please sign in to comment.