cleanups; bump version

This commit is contained in:
Tobias Oberstein 2015-11-16 18:05:35 +01:00
parent 27d5cd3881
commit e903475289
4 changed files with 26 additions and 5 deletions

View file

@ -13,3 +13,9 @@ publish: clean
python setup.py sdist upload python setup.py sdist upload
python setup.py bdist_egg upload python setup.py bdist_egg upload
python setup.py bdist_wininst upload python setup.py bdist_wininst upload
test_version:
PYTHONPATH=. python -m scour.scour --version
test_help:
PYTHONPATH=. python -m scour.scour --help

View file

@ -1,6 +1,6 @@
############################################################################### ###############################################################################
## ##
## Copyright (C) 2013 Tavendo GmbH ## Copyright (C) 2010 Jeff Schiller, 2010 Louis Simard, 2013-2015 Tavendo GmbH
## ##
## Licensed under the Apache License, Version 2.0 (the "License"); ## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License. ## you may not use this file except in compliance with the License.
@ -15,3 +15,5 @@
## limitations under the License. ## limitations under the License.
## ##
############################################################################### ###############################################################################
__version__ = u'0.31'

View file

@ -76,9 +76,11 @@ try:
except ImportError: except ImportError:
pass pass
APP = 'scour' from scour import __version__
VER = '0.30'
COPYRIGHT = 'Copyright Jeff Schiller, Louis Simard, 2010' APP = u'scour'
VER = __version__
COPYRIGHT = u'Copyright Jeff Schiller, Louis Simard, 2010'
NS = {'SVG': 'http://www.w3.org/2000/svg', NS = {'SVG': 'http://www.w3.org/2000/svg',
'XLINK': 'http://www.w3.org/1999/xlink', 'XLINK': 'http://www.w3.org/1999/xlink',

View file

@ -16,6 +16,7 @@
## ##
############################################################################### ###############################################################################
import re
from setuptools import setup, find_packages from setuptools import setup, find_packages
LONGDESC = """ LONGDESC = """
@ -30,9 +31,19 @@ Authors:
- Tobias Oberstein (maintainer) - Tobias Oberstein (maintainer)
""" """
VERSIONFILE = "scour/__init__.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = u['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
setup ( setup (
name = 'scour', name = 'scour',
version = '0.30', version = verstr,
description = 'Scour SVG Optimizer', description = 'Scour SVG Optimizer',
# long_description = open("README.md").read(), # long_description = open("README.md").read(),
long_description = LONGDESC, long_description = LONGDESC,