summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--INSTALL36
-rw-r--r--Makefile.am1
-rw-r--r--NEWS11
-rw-r--r--README2
-rw-r--r--RELEASING69
-rw-r--r--configure.ac4
-rwxr-xr-xdoc/conf.py2
-rwxr-xr-xsetup.py136
-rw-r--r--src/cairomodule.c4
-rw-r--r--src/context.c4
-rw-r--r--src/font.c4
-rw-r--r--src/matrix.c4
-rw-r--r--src/path.c4
-rw-r--r--src/pattern.c4
-rw-r--r--src/surface.c5
-rw-r--r--src/wscript2
-rw-r--r--wscript6
18 files changed, 155 insertions, 144 deletions
diff --git a/.gitignore b/.gitignore
index 43b67a8..a7667ed 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@
aclocal.m4
autom4te.cache
autoscan.log
+build
config.cache
config.h
config.h.in
diff --git a/INSTALL b/INSTALL
index 0867878..8592e2c 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,31 +1,31 @@
-GNU Autotools - install method 1 - preferred method
---------------------------------
+Waf - recommended install method
+---
+$ ./waf --help # shows available waf options
+$ ./waf configure
+$ ./waf build
+$ ./waf install
+
+
+GNU Autotools - alternative install method
+-------------
Using the same install method of install as cairo - GNU autotools.
- $ python -c "import sys; print sys.prefix"
- # make a note of the python prefix
- $ ./configure --prefix=<python_prefix>
- $ make
- $ make install # may require superuser access
+$ python -c "import sys; print sys.prefix"
+ # make a note of the python prefix
+$ ./configure --prefix=<python_prefix>
+$ make
+$ make install # may require superuser access
To build from CVS, use this line instead of the configure line above:
- $ ./autogen.sh --prefix=<python_prefix>
+$ ./autogen.sh --prefix=<python_prefix>
If you're installing to another prefix than the one where Python is installed
Python will not be able to find the cairo module until you add
$prefix/lib/pythonX.Y/site-packages to the PYTHONPATH variable.
-Waf - install method 2 - alternative install method
-----------------------
-$ ./waf --help # shows available waf options
-$ ./waf configure
-$ ./waf build
-$ ./waf install
-
-
-Python distutils - install method 3 - alternative install method
------------------------------------
+Python distutils - alternative install method
+----------------
$ python setup.py install
diff --git a/Makefile.am b/Makefile.am
index 147f546..b2de1ac 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -59,7 +59,6 @@ release-upload: release-check $(tar_file) $(md5_file)
scp $(tar_file) $(md5_file) $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR)
mv $(tar_file) $(md5_file) releases
ssh $(RELEASE_UPLOAD_HOST) "rm -f $(RELEASE_UPLOAD_DIR)/LATEST-$(PACKAGE)-[0-9]* && ln -s $(tar_file) $(RELEASE_UPLOAD_DIR)/LATEST-$(PACKAGE)-$(VERSION)"
- cvs tag RELEASE_$(PYCAIRO_VERSION_MAJOR)_$(PYCAIRO_VERSION_MINOR)_$(PYCAIRO_VERSION_MICRO)
release-publish: release-upload releases/$(md5_file)
@echo ""
diff --git a/NEWS b/NEWS
index f4f49a1..f72c28e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,14 @@
+Overview of changes from pycairo 1.8.6 to pycairo 1.8.8
+=======================================================
+General Changes:
+ Pycairo 1.8.8 requires cairo 1.8.8 (or later).
+ Move from CVS to git.
+ Add support for the waf build tool.
+
+Updated methods
+ The PDF/PS/SVGSurface constructors now accept None as a filename.
+
+
Overview of changes from pycairo 1.8.4 to pycairo 1.8.6
=======================================================
General Changes:
diff --git a/README b/README
index 858e0ed..90fcbb0 100644
--- a/README
+++ b/README
@@ -3,7 +3,7 @@ http://www.cairographics.org/pycairo
Dependencies
------------
- cairo >= 1.8.6
+ cairo >= 1.8.8
Python >= 2.6
Compiling
diff --git a/RELEASING b/RELEASING
index 99b6b4d..5ece7a4 100644
--- a/RELEASING
+++ b/RELEASING
@@ -1,42 +1,25 @@
Here are the steps to follow to create a new pycairo release:
-1) Ensure that there are no local, uncommitted modifications. The best
- thing to do here may be to begin with a fresh checkout from CVS:
+1) Fill out an entry in the NEWS file
+Sift through the information in 'git log' since the last release. Summarize
+major changes briefly in a style similar to other entries in NEWS.
- cvs -d cairographics.org:/cvs/cairo co pycairo
-
- But it's probably good enough if "cvs -q update -Ad" generates no
- output.
-
-2) Fill out an entry in the NEWS file
-
- Sift through the information in ChangeLog since the last release. Summarize
- major changes briefly in a style similar to other entries in NEWS.
-
-3) Increment version numbers in:
- cairo/cairomodule.c
- configure.ac
- doc/conf.py
- README
- setup.py
-
- Increment pycairo_major/minor/micro_version in configure.ac
- Increase the cairo_required_version - to an even numbered version.
- Increment pycairo_major/minor version to match the cairo major/minor
- version that pycairo requires (and increment the micro version if
- necessary for any subsequent pycairo updates).
-
-(install fresh copy, run examples, run any other tests)
+2) Increment pycairo version number in:
+ configure.ac
+ doc/conf.py
+ README
+ setup.py
+ wscript
-4) Commit the changes to NEWS, configure.ac etc
+ Increment pycairo_major/minor/micro_version in configure.ac
+ Increase the cairo_required_version - to an even numbered version.
+ Increment pycairo_major/minor version to match the cairo major/minor
+ version that pycairo requires (and increment the micro version if
+ necessary for any subsequent pycairo updates).
- Don't forget to fill out the ChangeLog just like with any other commit.
- It's especially important to mention the new version number in the
- ChangeLog.
- Add a '=== Pycairo x.x.x ===' header to ChangeLog
- Do "cvs -q update -Ad" to confirm there are no uncommitted changes.
+(install fresh copy, run tests and examples)
-5) Run "make distcheck" and verify that it gives in no warnings or errors and
+3) Run "make distcheck" and verify that it gives in no warnings or errors and
ends with a message of the form:
===============================================
@@ -44,7 +27,16 @@ Here are the steps to follow to create a new pycairo release:
pycairo-X.Y.Z.tar.gz
===============================================
-6) Edit Makefile.am and select either 'snapshot' or 'release'.
+4) Commit the changes to NEWS, configure.ac etc
+It's especially important to mention the new version number in the git commit
+comment.
+Add a '=== Pycairo x.x.x ===' header.
+
+$ git tag v 1.x.x
+
+push the changes to the freedesktop server.
+
+5) Edit Makefile.am and select either 'snapshot' or 'release'.
Run "make release-publish" which will perform the following steps for you:
* Check that the version number ends with an even micro component
@@ -55,22 +47,21 @@ Here are the steps to follow to create a new pycairo release:
* scp both files to appear on http://cairographics.org/releases
* Place local copies of the files in the releases directory
* Create a LATEST-package-version file (after deleting any old one)
- * Tag the entire source tree with a tag of the form RELEASE_X_Y_Z
* Provide some text for the release announcement (see below).
-7) Verify that the tar file arrived at the website.
+6) Verify that the tar file arrived at the website.
Check tar file has read permissions for all.
Update the pycairo webpage to reference the new release.
Update http://cheeseshop.python.org entry for pycairo.
-8) Edit:
- cairo/cairomodule.c
+7) Edit:
configure.ac
setup.py
+ wscript
to increment pycairo_version_micro to the next larger (odd) number and
commit.
-9) Send a message to cairo-announce@cairographics.org
+8) Send a message to cairo-announce@cairographics.org
and CC python-announce-list@python.org
to announce the new release using the text provided from
"make release-publish".
diff --git a/configure.ac b/configure.ac
index aac6ec2..dca9651 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ AC_PREREQ(2.59)
# the pycairo version number
m4_define(pycairo_version_major, 1)
m4_define(pycairo_version_minor, 8)
-m4_define(pycairo_version_micro, 7)
+m4_define(pycairo_version_micro, 8)
m4_define(pycairo_version, pycairo_version_major.pycairo_version_minor.pycairo_version_micro)
# versions of packages we require
@@ -19,7 +19,7 @@ AC_DEFINE(PYCAIRO_VERSION_MINOR, pycairo_version_minor, [pycairo minor version])
AC_DEFINE(PYCAIRO_VERSION_MICRO, pycairo_version_micro, [pycairo macro version])
AC_CONFIG_SRCDIR([src/pycairo.h])
-AC_CONFIG_HEADERS(config.h)
+AC_CONFIG_HEADERS(src/config.h)
AM_INIT_AUTOMAKE([1.9.6 -Wall])
diff --git a/doc/conf.py b/doc/conf.py
index 748ec99..b0a861a 100755
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -48,7 +48,7 @@ copyright = u'2008, Steve Chaplin'
# The short X.Y version.
version = '1.8'
# The full version, including alpha/beta/rc tags.
-release = '1.8.6'
+release = '1.8.8'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/setup.py b/setup.py
index 4bcdbda..1830142 100755
--- a/setup.py
+++ b/setup.py
@@ -3,48 +3,43 @@
import distutils.core as dic
import distutils.dir_util as dut
import distutils.file_util as fut
+import io
import subprocess
import sys
-pycairo_version = '1.8.7'
-cairo_version_required = '1.8.6'
+pycairo_version = '1.8.8'
+cairo_version_required = '1.8.8'
+pkgconfig_file = 'pycairo.pc'
+config_file = 'src/config.h'
+
def call(command):
- pipe = subprocess.Popen(command, shell=True,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- pipe.wait()
- return pipe
+ pipe = subprocess.Popen(command, shell=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ pipe.wait()
+ return pipe
def pkg_config_version_check(pkg, version):
- pipe = call('pkg-config --print-errors --exists "%s >= %s"' %
- (pkg, version))
- if pipe.returncode == 0:
- print '%s >= %s detected' % (pkg, version)
- else:
- print pipe.stderr.read()
- raise SystemExit('Error: %s >= %s not found' % (pkg, version))
+ pipe = call('pkg-config --print-errors --exists "%s >= %s"' %
+ (pkg, version))
+ if pipe.returncode == 0:
+ print '%s >= %s detected' % (pkg, version)
+ else:
+ print pipe.stderr.read()
+ raise SystemExit('Error: %s >= %s not found' % (pkg, version))
def pkg_config_parse(opt, pkg):
- pipe = call("pkg-config %s %s" % (opt, pkg))
- output = pipe.stdout.read()
- opt = opt[-2:]
- return [x.lstrip(opt) for x in output.split()]
-
+ pipe = call("pkg-config %s %s" % (opt, pkg))
+ output = pipe.stdout.read()
+ opt = opt[-2:]
+ return [x.lstrip(opt) for x in output.split()]
-if sys.version_info < (2,6):
- raise SystemExit('Error: Python >= 2.6 is required')
-
-pkg_config_version_check ('cairo', cairo_version_required)
-if sys.platform == 'win32':
- runtime_library_dirs = []
-else:
- runtime_library_dirs = pkg_config_parse('--libs-only-L', 'cairo')
-pkgconfig_file='pycairo.pc'
-print 'creating %s' % pkgconfig_file
-fo = open (pkgconfig_file, 'w')
-fo.write ("""\
+def createPcFile(PcFile):
+ print 'creating %s' % PcFile
+ with open(PcFile, 'w') as fo:
+ fo.write ("""\
prefix=%s
Name: Pycairo
@@ -54,31 +49,62 @@ Requires: cairo
Cflags: -I${prefix}/include/pycairo
Libs:
""" % (sys.prefix, pycairo_version)
- )
-fo.close()
+ )
+
+def createConfigFile(ConfigFile):
+ print 'creating %s' % ConfigFile
+ v = pycairo_version.split('.')
+
+ with open(ConfigFile, 'w') as fo:
+ fo.write ("""\
+// Configuration header created by setup.py - do not edit
+#ifndef _CONFIG_H
+#define _CONFIG_H 1
+
+#define PYCAIRO_VERSION_MAJOR %s
+#define PYCAIRO_VERSION_MICRO %s
+#define PYCAIRO_VERSION_MINOR %s
+#define VERSION "%s"
+
+#endif // _CONFIG_H
+""" % (v[0], v[1], v[2], pycairo_version)
+ )
+
+
+if sys.version_info < (2,6):
+ raise SystemExit('Error: Python >= 2.6 is required')
+
+pkg_config_version_check ('cairo', cairo_version_required)
+if sys.platform == 'win32':
+ runtime_library_dirs = []
+else:
+ runtime_library_dirs = pkg_config_parse('--libs-only-L', 'cairo')
+
+createPcFile(pkgconfig_file)
+createConfigFile(config_file)
+
cairo = dic.Extension(
- name = 'cairo._cairo',
- sources = ['cairo/cairomodule.c',
- 'cairo/pycairo-context.c',
- 'cairo/pycairo-font.c',
- 'cairo/pycairo-matrix.c',
- 'cairo/pycairo-path.c',
- 'cairo/pycairo-pattern.c',
- 'cairo/pycairo-surface.c',
- ],
- include_dirs = pkg_config_parse('--cflags-only-I', 'cairo'),
- library_dirs = pkg_config_parse('--libs-only-L', 'cairo'),
- libraries = pkg_config_parse('--libs-only-l', 'cairo'),
- runtime_library_dirs = runtime_library_dirs,
- )
+ name = 'cairo._cairo',
+ sources = ['src/cairomodule.c',
+ 'src/context.c',
+ 'src/font.c',
+ 'src/matrix.c',
+ 'src/path.c',
+ 'src/pattern.c',
+ 'src/surface.c',
+ ],
+ include_dirs = pkg_config_parse('--cflags-only-I', 'cairo'),
+ library_dirs = pkg_config_parse('--libs-only-L', 'cairo'),
+ libraries = pkg_config_parse('--libs-only-l', 'cairo'),
+ runtime_library_dirs = runtime_library_dirs,
+ )
dic.setup(
- name = "pycairo",
- version = pycairo_version,
- description = "python interface for cairo",
- packages = ['cairo'],
- ext_modules = [cairo],
- data_files=[('include/pycairo',['cairo/pycairo.h']),
- ('lib/pkgconfig',[pkgconfig_file])],
- )
+ name = "pycairo",
+ version = pycairo_version,
+ description = "python interface for cairo",
+ ext_modules = [cairo],
+ data_files=[('include/pycairo',['src/pycairo.h']),
+ ('lib/pkgconfig',[pkgconfig_file])],
+ )
diff --git a/src/cairomodule.c b/src/cairomodule.c
index 4b5fc04..386ddab 100644
--- a/src/cairomodule.c
+++ b/src/cairomodule.c
@@ -31,9 +31,7 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include "config.h"
#include "private.h"
/* to read CAIRO_PS_LEVEL_* constants */
diff --git a/src/context.c b/src/context.c
index 641addc..e2c08b5 100644
--- a/src/context.c
+++ b/src/context.c
@@ -31,9 +31,7 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include "config.h"
#include "private.h"
diff --git a/src/font.c b/src/font.c
index 0bde25f..97cf1b3 100644
--- a/src/font.c
+++ b/src/font.c
@@ -31,9 +31,7 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include "config.h"
#include "private.h"
diff --git a/src/matrix.c b/src/matrix.c
index b4a5bf1..eefeab9 100644
--- a/src/matrix.c
+++ b/src/matrix.c
@@ -31,9 +31,7 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include "config.h"
#include "private.h"
diff --git a/src/path.c b/src/path.c
index bd22152..97ca35c 100644
--- a/src/path.c
+++ b/src/path.c
@@ -31,9 +31,7 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include "config.h"
#include "private.h"
diff --git a/src/pattern.c b/src/pattern.c
index 204d300..229e218 100644
--- a/src/pattern.c
+++ b/src/pattern.c
@@ -31,9 +31,7 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include "config.h"
#include "private.h"
diff --git a/src/surface.c b/src/surface.c
index 25ad126..1fdb92c 100644
--- a/src/surface.c
+++ b/src/surface.c
@@ -31,10 +31,7 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
+#include "config.h"
#include "private.h"
diff --git a/src/wscript b/src/wscript
index 7822407..0680c1c 100644
--- a/src/wscript
+++ b/src/wscript
@@ -20,7 +20,7 @@ def build(bld):
features = 'cc cshlib pyext',
source = 'cairomodule.c context.c font.c path.c pattern.c matrix.c surface.c',
target = '_cairo',
- includes = '. ..', # '..' for config.h
+ includes = '.',
uselib = 'CAIRO',
install_path = '${PYTHONDIR}/cairo',
)
diff --git a/wscript b/wscript
index 7b048b8..c65b75d 100644
--- a/wscript
+++ b/wscript
@@ -1,10 +1,9 @@
# -*- python -*-
-import io
import os
APPNAME='pycairo'
-VERSION='1.8.7'
+VERSION='1.8.8'
srcdir = '.'
blddir = '../%s-build' % APPNAME
@@ -45,8 +44,7 @@ def configure(conf):
conf.define('PYCAIRO_VERSION_MINOR', version[1])
conf.define('PYCAIRO_VERSION_MICRO', version[2])
- conf.env.append_value('CCDEFINES', 'HAVE_CONFIG_H') # remove later - always have_config
- conf.write_config_header('config.h')
+ conf.write_config_header('src/config.h')
def build(bld):