summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
Diffstat (limited to 'wscript')
-rw-r--r--wscript34
1 files changed, 16 insertions, 18 deletions
diff --git a/wscript b/wscript
index 5403a7c..e167b59 100644
--- a/wscript
+++ b/wscript
@@ -65,25 +65,23 @@ def build(ctx):
)
-def dist_hook():
- # remove unwanted files from the archive
-
- # individual files
- for f in [
+def dist(ctx):
+ # exclude these files from the distribution archive
+ exclude = (
'RELEASING',
'examples/cairo_snippets/c_to_python.py',
'doc/html_docs_create.sh',
'doc/html_docs_upload.sh',
- ]:
- os.remove(f)
-
- # rm examples/*.{pdf,png,ps,svg}
- D='examples'
- for f in os.listdir(D):
- if f.endswith(('.pdf', '.png', '.ps', '.svg')):
- os.remove(os.path.join(D, f))
-
- D='examples/cairo_snippets/snippets'
- for f in os.listdir(D):
- if f.endswith(('.pdf', '.png', '.ps', '.svg')):
- os.remove(os.path.join(D, f))
+
+ '.git/',
+ '**/.gitignore',
+ '**/.lock-w*',
+ '.waf3*',
+
+ '**/*.pdf',
+ '**/*.png',
+ '**/*.pyc',
+ '**/*.ps',
+ '**/*.svg',
+ )
+ ctx.excl = ' '.join(exclude)