Permalink
Browse files

Remove examples/cairo_snippets/data/romedalen.png and examples which …

…use this

file.
Update wscript to exclude unwanted files from distribution archive.
  • Loading branch information...
1 parent 04d452f commit 131556cb563f153b2f3d192f118c7a5b7d0b79aa Steve Chaplin committed Apr 3, 2011
View
@@ -8,10 +8,8 @@ EXTRA_DIST = \
cairo_snippets/snippets_png.py \
cairo_snippets/snippets_ps.py \
cairo_snippets/snippets_svg.py \
- cairo_snippets/data/romedalen.png \
cairo_snippets/snippets/arc_negative.py \
cairo_snippets/snippets/arc.py \
- cairo_snippets/snippets/clip_image.py \
cairo_snippets/snippets/clip.py \
cairo_snippets/snippets/curve_rectangle.py \
cairo_snippets/snippets/curve_to.py \
@@ -22,8 +20,6 @@ EXTRA_DIST = \
cairo_snippets/snippets/gradient.py \
cairo_snippets/snippets/gradient_mask.py \
cairo_snippets/snippets/group.py \
- cairo_snippets/snippets/imagepattern.py \
- cairo_snippets/snippets/image.py \
cairo_snippets/snippets/__init__.py \
cairo_snippets/snippets/path.py \
cairo_snippets/snippets/set_line_cap.py \
@@ -1 +0,0 @@
-!romedalen.png
Deleted file not rendered
@@ -1,13 +0,0 @@
-snippet_normalize (cr, width, height)
-
-cr.arc (0.5, 0.5, 0.3, 0, 2*M_PI)
-cr.clip ()
-
-image = cairo.ImageSurface.create_from_png ("data/romedalen.png")
-w = image.get_width()
-h = image.get_height()
-
-cr.scale (1.0/w, 1.0/h)
-
-cr.set_source_surface (image, 0, 0)
-cr.paint ()
@@ -1,14 +0,0 @@
-snippet_normalize (cr, width, height)
-
-image = cairo.ImageSurface.create_from_png ("data/romedalen.png")
-w = image.get_width()
-h = image.get_height()
-
-cr.translate (0.5, 0.5)
-cr.rotate (45* M_PI/180)
-cr.scale (1.0/w, 1.0/h)
-cr.translate (-0.5*w, -0.5*h)
-
-cr.set_source_surface (image, 0, 0)
-cr.paint ()
-
@@ -1,23 +0,0 @@
-import math
-
-snippet_normalize (cr, width, height)
-
-image = cairo.ImageSurface.create_from_png ("data/romedalen.png")
-w = image.get_width()
-h = image.get_height()
-
-pattern = cairo.SurfacePattern (image)
-pattern.set_extend (cairo.EXTEND_REPEAT)
-
-cr.translate (0.5, 0.5)
-cr.rotate (M_PI / 4)
-cr.scale (1 / math.sqrt (2), 1 / math.sqrt (2))
-cr.translate (- 0.5, - 0.5)
-
-matrix = cairo.Matrix(xx=w * 5, yy=h * 5)
-pattern.set_matrix (matrix)
-
-cr.set_source (pattern)
-
-cr.rectangle (0, 0, 1.0, 1.0)
-cr.fill ()
View
41 wscript
@@ -65,25 +65,30 @@ 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*',
+ '.waf*',
+
+ '**/*.pdf',
+ '**/*.png',
+ '**/*.pyc',
+ '**/*.ps',
+ '**/*.svg',
+
+ # autoconf specific files
+ '**/Makefile',
+ 'autogen.sh',
+ 'autom4*',
+ 'config.log',
+ # ... many more ...
+ )
+ ctx.excl = ' '.join(exclude)

0 comments on commit 131556c

Please sign in to comment.