Commits

Robert Brewer committed 62aa6b1

Fixed wininst bug again.

Comments (0)

Files changed (1)

 # end arguments for setup
 ###############################################################################
 
-def fix_data_files(data_files):
-    """
-    bdist_wininst seems to have a bug about where it installs data files.
-    I found a fix the django team used to work around the problem at
-    http://code.djangoproject.com/changeset/8313 .  This function
-    re-implements that solution.
-    Also see http://mail.python.org/pipermail/distutils-sig/2004-August/004134.html
-    for more info.
-    """
-    def fix_dest_path(path):
-        return '\\PURELIB\\%(path)s' % vars()
-
-    if not 'bdist_wininst' in sys.argv: return
-
-    data_files[:] = [
-        (fix_dest_path(path), files)
-        for path, files in data_files]
-fix_data_files(data_files)
+# wininst may install data_files in Python/x.y instead of the cherrypy package.
+# Django's solution is at http://code.djangoproject.com/changeset/8313
+# See also http://mail.python.org/pipermail/distutils-sig/2004-August/004134.html
+if 'bdist_wininst' in sys.argv or '--format=wininst' in sys.argv:
+    data_files = [(r'\PURELIB\%s' % path, files) for path, files in data_files]
 
 def main():
     if sys.version < required_python_version:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.