Skip to content
This repository

Fix minilib generation on Windows #53

Merged
merged 2 commits into from about 2 years ago

2 participants

Jason R. Coombs Almad
Jason R. Coombs

With this change, the minilib generation no longer produces corrupt zip files on Windows.

Almad Almad merged commit f10e516 into from
Almad Almad closed this
Almad
Owner
Almad commented

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 10 additions and 10 deletions. Show diff stats Hide diff stats

  1. +10 10 paver/misctasks.py
20 paver/misctasks.py
@@ -12,20 +12,20 @@
12 12 def paverdocs():
13 13 """Open your web browser and display Paver's documentation."""
14 14 import webbrowser
15   - webbrowser.open("file://"
  15 + webbrowser.open("file://"
16 16 + (os.path.join(os.path.abspath(_docsdir), 'index.html')))
17   -
  17 +
18 18 @task
19 19 def minilib(options):
20 20 """Create a Paver mini library that contains enough for a simple
21 21 pavement.py to be installed using a generated setup.py. This
22 22 is a good temporary measure until more people have deployed paver.
23 23 The output file is 'paver-minilib.zip' in the current directory.
24   -
  24 +
25 25 Options:
26   -
  26 +
27 27 extra_files
28   - list of other paver modules to include (don't include the .py
  28 + list of other paver modules to include (don't include the .py
29 29 extension). By default, the following modules are included:
30 30 defaults, path, release, setuputils, misctasks, options,
31 31 tasks, easy
@@ -46,14 +46,14 @@ def generate_zip():
46 46 destfile.close()
47 47
48 48 # Write the buffer to disk.
49   - f = open(output_file, "w")
  49 + f = open(output_file, "wb")
50 50 f.write(buf.getvalue())
51 51 f.close()
52 52 dry("Generate %s" % output_file, generate_zip)
53   -
  53 +
54 54 @task
55 55 def generate_setup():
56   - """Generates a setup.py file that uses paver behind the scenes. This
  56 + """Generates a setup.py file that uses paver behind the scenes. This
57 57 setup.py file will look in the directory that the user is running it
58 58 in for a paver-minilib.zip and will add that to sys.path if available.
59 59 Otherwise, it will just assume that paver is available."""
@@ -72,6 +72,6 @@ def write_setup():
72 72 paver.tasks.main()
73 73 """)
74 74 setup.close()
75   -
  75 +
76 76 dry("Write setup.py", write_setup)
77   -
  77 +

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.