from setuptools import setup
from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
    long_description = f.read()

requires = []
def _load_requires(path):
    return requires + [pkg.rstrip('\r\n') for pkg in open(path).readlines()]
    
setup(
    name='Toami',
    version='0.1',
    description='SNMP asyncronous collector',
    long_description=long_description,
    url='https://github.com/hichtakk/snmp-collector',
    author='hichtakk',
    author_email='hichtakk@gmail.com',
    license='apache',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache License',
        'Programming Language :: Python :: 3.5'
    ],
    keywords='network snmp',
    install_requires=_load_requires('requirements.txt'),
    package_data={
        'sample': ['config.json.sample']
    }
)

@@ -50,27 +50,283 @@
 pen%0A
-from os import path
+import os%0Aimport re%0A%0Aversion = ''%0Awith open('toami/__init__.py', 'r') as fd:%0A    version = re.search(r'%5E__version__%5Cs*=%5Cs*%5B%5C'%22%5D(%5B%5E%5C'%22%5D*)%5B%5C'%22%5D',%0A                        fd.read(), re.MULTILINE).group(1)%0Aif not version:%0A    raise RuntimeError('Cannot find version information')
 %0A%0Ahe
@@ -330,16 +330,19 @@
 %0Ahere = 
+os.
 path.abs
@@ -346,16 +346,19 @@
 abspath(
+os.
 path.dir
@@ -379,24 +379,27 @@
 )%0Awith open(
+os.
 path.join(he
@@ -637,13 +637,15 @@
 ion=
-'0.1'
+version
 ,%0A  

modify setup.py for package version specification