Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix minilib generation on Windows #53

Merged
merged 2 commits into from

2 participants

@jaraco

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

@Almad Almad was assigned
@Almad Almad merged commit f10e516 into paver:master
@Almad
Owner

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 with 10 additions and 10 deletions.
  1. +10 −10 paver/misctasks.py
View
20 paver/misctasks.py
@@ -12,20 +12,20 @@
def paverdocs():
"""Open your web browser and display Paver's documentation."""
import webbrowser
- webbrowser.open("file://"
+ webbrowser.open("file://"
+ (os.path.join(os.path.abspath(_docsdir), 'index.html')))
-
+
@task
def minilib(options):
"""Create a Paver mini library that contains enough for a simple
pavement.py to be installed using a generated setup.py. This
is a good temporary measure until more people have deployed paver.
The output file is 'paver-minilib.zip' in the current directory.
-
+
Options:
-
+
extra_files
- list of other paver modules to include (don't include the .py
+ list of other paver modules to include (don't include the .py
extension). By default, the following modules are included:
defaults, path, release, setuputils, misctasks, options,
tasks, easy
@@ -46,14 +46,14 @@ def generate_zip():
destfile.close()
# Write the buffer to disk.
- f = open(output_file, "w")
+ f = open(output_file, "wb")
f.write(buf.getvalue())
f.close()
dry("Generate %s" % output_file, generate_zip)
-
+
@task
def generate_setup():
- """Generates a setup.py file that uses paver behind the scenes. This
+ """Generates a setup.py file that uses paver behind the scenes. This
setup.py file will look in the directory that the user is running it
in for a paver-minilib.zip and will add that to sys.path if available.
Otherwise, it will just assume that paver is available."""
@@ -72,6 +72,6 @@ def write_setup():
paver.tasks.main()
""")
setup.close()
-
+
dry("Write setup.py", write_setup)
-
+
Something went wrong with that request. Please try again.