switch wx.svg to use wxPython's version number, instead of its own

This commit is contained in:
Robin Dunn
2019-11-01 14:40:02 -07:00
parent 59362e8907
commit 840ba95f30
3 changed files with 14 additions and 16 deletions

View File

@@ -19,7 +19,10 @@ try:
except ImportError:
have_cython = False
VERSION = "0.1.0"
# Create a buildtools.config.Configuration object, to get the VERSION
from buildtools.config import Config
cfg = Config(noWxConfig=True)
DESCRIPTION = 'Wrapper for nanosvg library, plus code for integrating with wxPython'
LONG_DESCRIPTION = ''
AUTHOR = 'Robin Dunn'
@@ -32,12 +35,7 @@ PLATFORMS = "WIN32,WIN64,OSX,POSIX"
HERE = os.path.abspath(os.path.dirname(__file__))
PACKAGE = 'wx.svg'
PACKAGEDIR = 'wx/svg'
with open(os.path.join(HERE, PACKAGEDIR, '_version.py'), 'w') as f:
f.write(textwrap.dedent("""\
# Generated from {}
__version__ = '{}'
""".format(__file__, VERSION)))
BUILD_OPTIONS = { 'build_base' : 'build/wxsvg' }
if have_cython:
SOURCE = os.path.join(PACKAGEDIR, '_nanosvg.pyx')
@@ -61,8 +59,8 @@ else:
modules = [module]
setup(name = 'nanosvg',
version = VERSION,
setup(name = 'wx.svg',
version = cfg.VERSION,
description = DESCRIPTION,
long_description = LONG_DESCRIPTION,
author = AUTHOR,
@@ -70,6 +68,7 @@ setup(name = 'nanosvg',
url = URL,
download_url = DOWNLOAD_URL,
license = LICENSE,
packages = [PACKAGE],
#packages = [PACKAGE],
ext_modules = modules,
options = { 'build' : BUILD_OPTIONS, },
)

View File

@@ -84,7 +84,6 @@ will be adjusted accordingly.::
import wx
from six.moves import zip_longest
from ._version import __version__
from ._nanosvg import *
# All the supported renderers now support gradient transforms, more or less, but

View File

@@ -1107,7 +1107,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__ {
* @property
* def stops(self): # <<<<<<<<<<<<<<
* """
* A generator that iterates over the :classL`SVGgradientStop` objects contained in the SVGgradient
* A generator that iterates over the :class:`SVGgradientStop` objects contained in the SVGgradient
*/
struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__ {
PyObject_HEAD
@@ -9688,7 +9688,7 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_11SVGgradient_5stops_2generator2(__
* @property
* def stops(self): # <<<<<<<<<<<<<<
* """
* A generator that iterates over the :classL`SVGgradientStop` objects contained in the SVGgradient
* A generator that iterates over the :class:`SVGgradientStop` objects contained in the SVGgradient
*/
/* Python wrapper */
@@ -9760,7 +9760,7 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_11SVGgradient_5stops_2generator2(__
if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 599, __pyx_L1_error)
/* "wx/svg/_nanosvg.pyx":603
* A generator that iterates over the :classL`SVGgradientStop` objects contained in the SVGgradient
* A generator that iterates over the :class:`SVGgradientStop` objects contained in the SVGgradient
* """
* self._check_ptr() # <<<<<<<<<<<<<<
* for i in range(self._ptr.nstops):
@@ -9830,7 +9830,7 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_11SVGgradient_5stops_2generator2(__
* @property
* def stops(self): # <<<<<<<<<<<<<<
* """
* A generator that iterates over the :classL`SVGgradientStop` objects contained in the SVGgradient
* A generator that iterates over the :class:`SVGgradientStop` objects contained in the SVGgradient
*/
/* function exit code */
@@ -12756,7 +12756,7 @@ static struct PyGetSetDef __pyx_getsets_2wx_3svg_8_nanosvg_SVGgradient[] = {
{(char *)"spread", __pyx_getprop_2wx_3svg_8_nanosvg_11SVGgradient_spread, 0, (char *)0, 0},
{(char *)"fx", __pyx_getprop_2wx_3svg_8_nanosvg_11SVGgradient_fx, 0, (char *)0, 0},
{(char *)"fy", __pyx_getprop_2wx_3svg_8_nanosvg_11SVGgradient_fy, 0, (char *)0, 0},
{(char *)"stops", __pyx_getprop_2wx_3svg_8_nanosvg_11SVGgradient_stops, 0, (char *)"\n A generator that iterates over the :classL`SVGgradientStop` objects contained in the SVGgradient\n ", 0},
{(char *)"stops", __pyx_getprop_2wx_3svg_8_nanosvg_11SVGgradient_stops, 0, (char *)"\n A generator that iterates over the :class:`SVGgradientStop` objects contained in the SVGgradient\n ", 0},
{0, 0, 0, 0, 0}
};