Fix import error in setup.py

This commit is contained in:
Eitot 2016-01-15 03:22:02 +01:00
parent fbf4e3ec2e
commit fed6203d36

View file

@ -16,7 +16,7 @@
## ##
############################################################################### ###############################################################################
import re from scour import __version__
from setuptools import setup, find_packages from setuptools import setup, find_packages
LONGDESC = """ LONGDESC = """
@ -31,19 +31,9 @@ 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 = verstr, version = __version__,
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,