Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import codecs
import os
import re
from setuptools import setup
import sys

cmdclass = {}

from tarantool_queue import __version__

try:
from setuptools import setup
except ImportError:
Expand All @@ -16,10 +17,26 @@
except ImportError:
pass


def read(*parts):
filename = os.path.join(os.path.dirname(__file__), *parts)
with codecs.open(filename, encoding='utf-8') as fp:
return fp.read()


def find_version(*file_paths):
version_file = read(*file_paths)
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='tarantool-queue',
version=__version__,
version=find_version('tarantool_queue', '__init__.py'),
description='Python bindings for Tarantool queue script (http://github.com/tarantool/queue)',
long_description=open('README.rst').read(),
long_description=read('README.rst'),
author='Eugine Blikh',
author_email='bigbes@gmail.com',
maintainer='Eugine Blikh',
Expand Down
2 changes: 1 addition & 1 deletion tarantool_queue/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.1.1"
__version__ = "0.1.2"

from tarantool_queue import Task, Tube, Queue
__all__ = [Task, Tube, Queue, __version__]