diff --git a/.travis.yml b/.travis.yml index c2fdde809..d65efb7ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,6 @@ before_install: install: # nose is already installed # numpy is already installed - - pip install cython - pip install -r dev_requirements.txt - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install -r requirements-2.6.txt; fi - pip install coveralls diff --git a/CHANGES.txt b/CHANGES.txt index dd514f43b..b56bb34f7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,16 @@ Enable CHANGELOG ================ +Enable 4.5.1 (April 9, 2015) +============================ + +Fixes +----- + +* PR #182: Fix enable setup under recent versions of setuptools +* PR #180: Fixed sphinx warnings +* PR #178: Fix Travis-CI build and version file setup for kiva and enable + Enable 4.5.0 (March 23, 2015) ============================= diff --git a/README.rst b/README.rst index c4172b9bf..a26853822 100644 --- a/README.rst +++ b/README.rst @@ -4,7 +4,7 @@ enable: low-level drawing and interaction http://github.enthought.com/enable -.. image:: https://api.travis-ci.org/enthought/enable.png?branch=master +.. image:: https://travis-ci.org/enthought/enable.svg?branch=master :target: https://travis-ci.org/enthought/enable :alt: Build status @@ -64,17 +64,36 @@ Kiva currently implements the following features: - RGB, RGBA, or grayscale color depths - transparency - Prerequisites ------------- -You must have the following libraries installed before building or installing -the Enable project: +You must have the following libraries installed before building +the Enable/Kiva project: + +- `Setuptools `_ +- `Numpy `_ +- `SWIG `_ +- (on Linux) X11-devel (development tools for X11) +- (on Mac OS X) `Cython `_ + +Enable/Kiva also have the following requirements: + +.. rubric:: Runtime: + +- `Numpy `_ +- `PIL `_ +- `traits 4.5.0 `_ +- `traitsui 4.4.0 `_ +- `pyface 4.5.0 `_ + +.. rubric:: Optional: -* `distribute `_ -* `SWIG `_ -* `Cython `_ -* `Numpy `_ -* `ReportLab Toolkit `_ for PDF - backend support in Kiva. -* (on Linux) X11-devel (development tools for X11) +- `apptools 4.3.0 `_ +- (Qt backend) `PySide `_ or `PyQt4 `_ +- (WX backend) `WxPython version 2.8.11.0 `_ +- (GL backend) `pyglet version 1.1.4 `_ +- (GL backend) `pygarrayimage `_ +- (SVG backend) `PyParsing `_ +- (PDF backend) `ReportLab Toolkit version 3.1 `_ +- (Cairo backend) `PyCairo 1.10.0 `_ +- (Constrained layout) `kiwisolver `_ diff --git a/dev_requirements.txt b/dev_requirements.txt index 919fcfe98..fbecefcd4 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -1,5 +1,6 @@ --allow-external PIL --allow-unverified PIL +numpy coverage PIL pyparsing @@ -7,8 +8,8 @@ PyPDF2 https://bitbucket.org/pyglet/pyglet/get/pyglet-1.1.4.zip pygarrayimage reportlab<=3.1 --e git+http://github.com/enthought/traits.git#egg=traits --e git+http://github.com/enthought/pyface.git#egg=pyface --e git+http://github.com/enthought/traitsui.git#egg=traitsui --e git+http://github.com/enthought/apptools.git#egg=apptools --e git+http://github.com/nucleic/kiwi.git#egg=kiwisolver +kiwisolver +git+http://github.com/enthought/traits.git#egg=traits +git+http://github.com/enthought/pyface.git#egg=pyface +git+http://github.com/enthought/traitsui.git#egg=traitsui +git+http://github.com/enthought/apptools.git#egg=apptools diff --git a/docs/source/enable_basic_tools.rst b/docs/source/enable_basic_tools.rst index 0c455f12f..f75711995 100644 --- a/docs/source/enable_basic_tools.rst +++ b/docs/source/enable_basic_tools.rst @@ -30,7 +30,7 @@ state changes. By default, the tool responds to clicks that are within the associated component, but subclasses can override this behaviour by replacing the -:py:method:`is_clickable` method with something else. +:py:meth:`is_clickable` method with something else. It will commonly be the case that components or :py:class:`ButtonTool` subclasses which draw may wish to respond to user interactions by drawing diff --git a/docs/source/enable_constraints_layout.rst b/docs/source/enable_constraints_layout.rst index 62b010314..e20bdf4fc 100644 --- a/docs/source/enable_constraints_layout.rst +++ b/docs/source/enable_constraints_layout.rst @@ -23,7 +23,7 @@ to the :class:`Component` class which define a simple box model: * :attr:`h_center`: The vertical center line between the left and right edges * :attr:`v_center`: The horizontal center line between the top and bottom edges -Additionally, there are some constraints which only exist on +Additionally, there are some constraints which only exist on :class:`ConstraintsContainer`: * :attr:`contents_height`: The height of the container. @@ -37,7 +37,9 @@ Additionally, there are some constraints which only exist on These variables can be used in linear inequality expressions which make up the layout constraints of a container: + :: + def build_hierarchy(): container = ConstraintsContainer() one = Component() @@ -48,27 +50,29 @@ layout constraints of a container: one.layout_height == two.layout_height, # ... and so on ... ] - + return container For more complicated layouts, the :attr:`layout_constraints` trait on a :class:`ConstraintsContainer` can be a :class:`callable`. The function is passed a reference to the container and should return a list of :class:`LinearContraints` objects or layout helper instances (as described below). + :: - def create_container(self): + + def create_container(self): self.container = ConstraintsContainer() self.container.add(self.bar) self.container.layout_constraints = self.my_layout_constraints - + def my_layout_constraints(self, container): cns = [] - + if self.foo: cns.append(self.foo.layout_height <= 300) cns.append(hbox(self.foo, self.bar)) cns.append(self.bar.layout_width == 250) - + return cns If :attr:`layout_constraints` is callable, it will be invoked each time a @@ -85,25 +89,25 @@ also available in Enable. The layout helpers are: :data:`spacer`: Creates space between two adjacent components. .. function:: horizontal(*components[, spacing=10]) - + Takes a list of components and lines them up using their left and right edges. - + :param components: A sequence of :class:`Component` or :class:`spacer` objects. :param spacing: How many pixels of inter-element spacing to use :type spacing: integer >= 0 .. function:: vertical(*components[, spacing=10]) - + Takes a list of components and lines them up using their top and bottom edges. - + :param components: A sequence of :class:`Component` or :class:`spacer` objects. :param spacing: How many pixels of inter-element spacing to use :type spacing: integer >= 0 .. function:: hbox(*components[, spacing=10, margins=...]) - + Like :func:`horizontal`, but ensures the height of components matches the container. - + :param components: A sequence of :class:`Component` or :class:`spacer` objects. :param spacing: How many pixels of inter-element spacing to use :type spacing: integer >= 0 @@ -112,9 +116,9 @@ also available in Enable. The layout helpers are: of the box. The default is 0. .. function:: vbox(*components[, spacing=10, margins=...]) - + Like :func:`vertical`, but ensures the width of components matches the container. - + :param components: A sequence of :class:`Component` or :class:`spacer` objects. :param spacing: How many pixels of inter-element spacing to use :type spacing: integer >= 0 @@ -123,9 +127,9 @@ also available in Enable. The layout helpers are: of the box. The default is 0. .. function:: align(anchor, *components[, spacing=10]) - + Aligns a single constraint across multiple components. - + :param anchor: The name of a constraint variable that exists on all of the `components`. :param components: A sequence of :class:`Component` objects. Spacers are not allowed. @@ -133,9 +137,9 @@ also available in Enable. The layout helpers are: :type spacing: integer >= 0 .. function:: grid(*rows[, row_align='', row_spacing=10, column_align='', column_spacing=10, margins=...]) - + Creates an NxM grid of components. Components may span multiple columns or rows. - + :param rows: A sequence of sequences of :class:`Component` objects :param row_align: The name of a constraint variable on an item. If given, it is used to add constraints on the alignment of items diff --git a/enable/__init__.py b/enable/__init__.py index 01bd857b0..16f49fb1d 100644 --- a/enable/__init__.py +++ b/enable/__init__.py @@ -3,11 +3,21 @@ """ A multi-platform object drawing library. Part of the Enable project of the Enthought Tool Suite. """ +import sys +from ._version import full_version as __version__ -from kiva._version import full_version as __version__ +__all__ = [ + '__version__', +] __requires__ = [ + 'numpy', + 'traits', 'traitsui', 'PIL', - 'kiwisolver', + 'pyface', ] + +# Cython is only necessary to build the quartz backend. +if sys.platform == 'darwin': + __requires__.append('cython') diff --git a/setup.py b/setup.py index dd8bfe7ae..74f54f156 100644 --- a/setup.py +++ b/setup.py @@ -32,12 +32,11 @@ from numpy.distutils.core import setup - MAJOR = 4 MINOR = 5 -MICRO = 0 +MICRO = 1 -IS_RELEASED = True +IS_RELEASED = False VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO) @@ -76,7 +75,7 @@ def _minimal_ext_cmd(cmd): return git_revision, git_count -def write_version_py(filename='kiva/_version.py'): +def write_version_py(filename): template = """\ # THIS FILE IS GENERATED FROM ENABLE SETUP.PY version = '{version}' @@ -192,7 +191,8 @@ def run(self): if __name__ == "__main__": - write_version_py() + write_version_py(filename='enable/_version.py') + write_version_py(filename='kiva/_version.py') from enable import __version__, __requires__ # Build the full set of packages by appending any found by setuptools' @@ -245,6 +245,5 @@ def run(self): 'enable': ['tests/primitives/data/PngSuite/*.png'], }, platforms=["Windows", "Linux", "Mac OS-X", "Unix", "Solaris"], - setup_requires=['cython'], zip_safe=False, **config)