Skip to content

Commit

Permalink
Make a proper package
Browse files Browse the repository at this point in the history
  • Loading branch information
Šarūnas Navickas committed Nov 13, 2015
1 parent 72601cf commit 1014722
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 3 deletions.
1 change: 1 addition & 0 deletions Manifest.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include requirements
Empty file added requirements
Empty file.
1 change: 1 addition & 0 deletions robust/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__all__ = ["tools", "version"]
4 changes: 2 additions & 2 deletions robust/tests.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest
from tools import retry, timeout
from exception import ContinuousFailureException, TimeoutException
from robust.tools import retry, timeout
from robust.exception import ContinuousFailureException, TimeoutException


class RetryCase(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion robust/tools.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from functools import wraps
from exception import ContinuousFailureException, TimeoutException
from robust.exception import ContinuousFailureException, TimeoutException


def _fail(ex, on_fail=None):
Expand Down
5 changes: 5 additions & 0 deletions robust/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
VERSION = (1, 0, 0)


def get_version():
return ".".join(map(lambda x: str(x), VERSION))
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
description-file = README.md
24 changes: 24 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-
from setuptools import setup
from pip.req import parse_requirements
from pip.exceptions import InstallationError

from robust.version import get_version

try:
install_reqs = list(parse_requirements("requirements", session={}))
except InstallationError:
# There are no requirements
install_reqs = []

setup(name="pyrobustness",
version=get_version(),
description="A simple util library for creating applications which needs to keep running, despite abnormalities",
author="Šarūnas Navickas",
author_email="[email protected]",
license="MIT",
packages=["robust"],
install_requires=[str(ir.req) for ir in install_reqs],
test_suite="nose.collector",
tests_require=["nose"])

0 comments on commit 1014722

Please sign in to comment.