diff options
author | Steve Chaplin <> | 2011-04-03 10:22:59 +0800 |
---|---|---|
committer | Steve Chaplin <> | 2011-04-03 10:22:59 +0800 |
commit | 131556cb563f153b2f3d192f118c7a5b7d0b79aa (patch) | |
tree | b295c8ac624579a8be6346960c78091d899f57d1 | |
parent | 04d452fafbc59c24e28bc4ce9db25557cf4c2435 (diff) | |
download | py2cairo-131556cb563f153b2f3d192f118c7a5b7d0b79aa.tar.gz |
Remove examples/cairo_snippets/data/romedalen.png and examples which use this
file.
Update wscript to exclude unwanted files from distribution archive.
-rw-r--r-- | examples/Makefile.am | 4 | ||||
-rw-r--r-- | examples/cairo_snippets/data/.gitignore | 1 | ||||
-rw-r--r-- | examples/cairo_snippets/data/romedalen.png | bin | 80944 -> 0 bytes | |||
-rwxr-xr-x | examples/cairo_snippets/snippets/clip_image.py | 13 | ||||
-rwxr-xr-x | examples/cairo_snippets/snippets/image.py | 14 | ||||
-rwxr-xr-x | examples/cairo_snippets/snippets/imagepattern.py | 23 | ||||
-rw-r--r-- | wscript | 41 |
7 files changed, 23 insertions, 73 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am index a15a963..b9606f4 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -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 \ diff --git a/examples/cairo_snippets/data/.gitignore b/examples/cairo_snippets/data/.gitignore deleted file mode 100644 index 9622ba3..0000000 --- a/examples/cairo_snippets/data/.gitignore +++ /dev/null @@ -1 +0,0 @@ -!romedalen.png diff --git a/examples/cairo_snippets/data/romedalen.png b/examples/cairo_snippets/data/romedalen.png Binary files differdeleted file mode 100644 index 0c41eb0..0000000 --- a/examples/cairo_snippets/data/romedalen.png +++ /dev/null diff --git a/examples/cairo_snippets/snippets/clip_image.py b/examples/cairo_snippets/snippets/clip_image.py deleted file mode 100755 index 39a84ab..0000000 --- a/examples/cairo_snippets/snippets/clip_image.py +++ /dev/null @@ -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 () diff --git a/examples/cairo_snippets/snippets/image.py b/examples/cairo_snippets/snippets/image.py deleted file mode 100755 index ccadc4f..0000000 --- a/examples/cairo_snippets/snippets/image.py +++ /dev/null @@ -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 () - diff --git a/examples/cairo_snippets/snippets/imagepattern.py b/examples/cairo_snippets/snippets/imagepattern.py deleted file mode 100755 index 5d07c07..0000000 --- a/examples/cairo_snippets/snippets/imagepattern.py +++ /dev/null @@ -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 () @@ -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) |