Skip to content

Commit

Permalink
Fix version setting
Browse files Browse the repository at this point in the history
  • Loading branch information
hkupty committed Aug 28, 2014
1 parent b8c2152 commit 07c6d57
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
# -*- coding: utf-8 -*-
from pyboleto import __version__
from setuptools import setup, find_packages
import sys
import os
import re


def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()


def get_version(package):
"""Return package version as listed in `__version__` in `__init__.py`."""
init_py = open(os.path.join(os.path.dirname(__file__),
package, '__init__.py'),
'r').read()
return re.search("^__version__ = ['\"]([^'\"]+)['\"]",
init_py, re.MULTILINE
).group(1)


extra = {}
if sys.version_info >= (3,):
extra['use_2to3'] = True
Expand All @@ -43,7 +33,7 @@ def get_version(package):

setup(
name='pyboleto',
version=get_version('pyboleto'),
version=__version__,
author='Loggi Tecnologia LTDA',
author_email='dev@loggi.com',
url='https://github.com/loggi/pyboleto',
Expand Down

0 comments on commit 07c6d57

Please # to comment.