Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
kon-foo committed Aug 15, 2018
0 parents commit ade2d01
Show file tree
Hide file tree
Showing 6 changed files with 398 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# pyenv
.python-version

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2018 Lucas Langholf

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# wittyPy
## A Python Wrapper for the [WittyPi 2](http://www.uugear.com/product/wittypi2/) Realtime Clock for the RaspberryPi.
36 changes: 36 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import setuptools
import re
import os

def find_version_author_mail():
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, "wittyPy/__init__.py"), 'r') as fp:
version_file = fp.read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
author_match = re.search(r"^__author__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
author, mail = re.split(r'<',author_match.group(1))
return version_match.group(1), author.rstrip(), re.sub('>', '', mail)

version, author, mail = find_version_author_mail()

with open("README.md", "r") as fh:
long_description = fh.read()

setuptools.setup(
name="wittyPy",
version=version,
author=author,
author_email=mail,
description="A Wrapper for the WittyPi2 Realtime Clock for the RaspberryPi",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/elpunkt/wittyPy",
packages=setuptools.find_packages(),
classifiers=(
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: Raspbian OS",
),
)
3 changes: 3 additions & 0 deletions wittyPy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .wittyPy import WittyPi, WittyTime
__version__ = '0.1'
__author__ = "Lucas Langholf <lucas@elpunkt.eu>"
Loading

0 comments on commit ade2d01

Please sign in to comment.