Skip to content
This repository has been archived by the owner on Feb 7, 2019. It is now read-only.

Commit

Permalink
consistent version in __init__.py and setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
iromli committed Jun 20, 2015
1 parent dab375f commit f04fcd7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flask_featureflags/__init__.py
Expand Up @@ -21,7 +21,7 @@
from flask import redirect as _redirect
from flask.signals import Namespace

__version__ = u'0.4dev'
__version__ = '0.7-dev'

log = logging.getLogger(u'flask-featureflags')

Expand Down
16 changes: 15 additions & 1 deletion setup.py
@@ -1,4 +1,6 @@
import codecs
import os
import re
from setuptools import setup
from sys import argv

Expand All @@ -17,9 +19,21 @@
install_requires.append('Sphinx')
install_requires.append('Sphinx-PyPI-upload')


def find_version(*file_paths):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, *file_paths), 'r') as f:
version_file = f.read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError('Unable to find version string.')


setup(
name='Flask-FeatureFlags',
version='0.7-dev',
version=find_version('flask_featureflags', '__init__.py'),
url='https://github.com/trustrachel/Flask-FeatureFlags',
license='Apache',
author='Rachel Sanders',
Expand Down

0 comments on commit f04fcd7

Please sign in to comment.