Update affected st2tests package.
# See the License for the specific language governing permissions and
# limitations under the License.
-import re
import os.path
from setuptools import setup, find_packages
from dist_utils import fetch_requirements
from dist_utils import apply_vagrant_workaround
+from dist_utils import get_version_string
ST2_COMPONENT = 'st2tests'
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
@@ -34,21 +34,10 @@ install_reqs, dep_links = fetch_requirements(REQUIREMENTS_FILE)
# which would result in setup.py requiring eventlet and other dependencies to run.
-def get_version_string():
- with open(INIT_FILE, 'r') as fp:
- content = fp.read()
- version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
- content, re.M)
- if version_match:
- return version_match.group(1)
-
- raise RuntimeError('Unable to find version string.')
-
-
apply_vagrant_workaround()
setup(
name=ST2_COMPONENT,
- version=get_version_string(),
+ version=get_version_string(INIT_FILE),
description='{}'.format(ST2_COMPONENT),
author='StackStorm',
author_email='info@stackstorm.com',
