From 75234e4934799a28009460a574b64e2fec54fdb6 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Wed, 19 Feb 2014 23:05:45 +0000 Subject: [PATCH 1/3] Created basic setup.py --- .gitignore | 5 +++-- CHANGES.md | 0 businesshours/__init__.py | 2 ++ setup.py | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 CHANGES.md diff --git a/.gitignore b/.gitignore index 71eb871..23d2d7e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .idea -.pyc +*.pyc build/ -dist/ \ No newline at end of file +dist/ +*.egg-info \ No newline at end of file diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..e69de29 diff --git a/businesshours/__init__.py b/businesshours/__init__.py index ff6de8c..69e9744 100644 --- a/businesshours/__init__.py +++ b/businesshours/__init__.py @@ -1 +1,3 @@ +__version__ = '0.1' + from .core import calc_business_hours \ No newline at end of file diff --git a/setup.py b/setup.py index e69de29..702922a 100644 --- a/setup.py +++ b/setup.py @@ -0,0 +1,37 @@ +from setuptools import setup +import io +import businesshours + + +def read(*filenames, **kwargs): + encoding = kwargs.get('encoding', 'utf-8') + sep = kwargs.get('sep', '\n') + buf = [] + for filename in filenames: + with io.open(filename, encoding=encoding) as f: + buf.append(f.read()) + return sep.join(buf) + +long_description = read('README.md', 'CHANGES.md') + +setup( + name='businesshours', + version=businesshours.__version__, + url='http://github.com/nikdoof/businesshours/', + license='Apache Software License', + author='Andrew Williams', + author_email='andy@tensixtyone.com', + description='Support functions to help calculate working time.', + long_description=long_description, + packages=['businesshours'], + platforms='any', + classifiers = [ + 'Programming Language :: Python', + 'Development Status :: 4 - Beta', + 'Natural Language :: English', + 'Intended Audience :: Developers', + 'Operating System :: OS Independent', + 'Topic :: Software Development :: Libraries :: Python Modules', + ], + test_suite="businesshours.tests", +) \ No newline at end of file From df8dad91a5eb3d71eb3f27ecfba02e1d225eb455 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Wed, 19 Feb 2014 23:06:23 +0000 Subject: [PATCH 2/3] Add basic TravisCI configuration. --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..665347c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: python +python: + - "2.7" + - "3.3" +install: + - "pip install coverage" +script: + - "coverage run --source=businesshours setup.py test" From 84b9bcd212f7c5684ef32d954d52fdb2c331946c Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Wed, 19 Feb 2014 23:16:30 +0000 Subject: [PATCH 3/3] README, CHANGES, and LICENSE update. --- CHANGES.md | 4 ++++ LICENSE | 12 ++++++++++++ README.md | 14 ++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index e69de29..61ade9c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -0,0 +1,4 @@ +v0.1 Release +------------ + +* Initial release \ No newline at end of file diff --git a/LICENSE b/LICENSE index e69de29..0d7a701 100644 --- a/LICENSE +++ b/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2014, Andrew Williams +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/README.md b/README.md index e69de29..d3c30fc 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,14 @@ + +BusinessHours +============= + +[![Build Status](https://travis-ci.org/nikdoof/businesshours.png)](https://travis-ci.org/nikdoof/businesshours) + +```businesshours``` is a small Python module that contains tools to assist with calculating business/working hours. This project was made to solve a particular problem I was facing, and while it probably doesn't cover the edge cases it works "good enough". + +Patches/issues/pulls are welcome. + +License +------- + +This code is released under the BSD Three Clause license, for further information please consult the ```LICENSE``` file. \ No newline at end of file