Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package metadata #57

Merged
merged 2 commits into from
Jul 12, 2019
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
14 changes: 0 additions & 14 deletions python_transport/Pipfile

This file was deleted.

38 changes: 15 additions & 23 deletions python_transport/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,15 @@
import os
import re

from wirepas_gateway import __title__
from wirepas_gateway import __version__

from setuptools import setup, find_packages, Extension

here = os.path.abspath(os.path.dirname(__file__))
readme_file = "README.md"
license_file = "LICENSE"

with open(readme_file) as f:
long_description = f.read()

with open(license_file) as f:
license = f.read()


def get_list_files(root, flist=None):
if flist is None:
Expand All @@ -40,8 +35,7 @@ def get_list_files(root, flist=None):

def get_absolute_path(*args):
""" Transform relative pathnames into absolute pathnames """
directory = os.path.dirname(os.path.abspath(__file__))
return os.path.join(directory, *args)
return os.path.join(here, *args)


def get_requirements(*args):
Expand All @@ -57,23 +51,21 @@ def get_requirements(*args):
return sorted(requirements)


about = {}
with open(get_absolute_path("./wirepas_gateway/__about__.py")) as f:
exec(f.read(), about)

setup(
name=__title__,
version=__version__,
description="Wirepas gateway transport service",
name=about["__pkg_name__"],
version=about["__version__"],
description=about["__description__"],
long_description=long_description,
author="Wirepas Oy",
author_email="[email protected]",
url="https://github.com/wirepas/gateway",
license="Apache-2",
classifiers=[
"Development Status :: 5 - Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Topic :: Software Development :: Libraries",
"Programming Language :: Python :: 3",
],
keywords="wirepas connectivity iot mesh",
author=about["__author__"],
author_email=about["__author_email__"],
url=about["__url__"],
license=about["__license__"],
classifiers=about["__classifiers__"],
keywords=about["__keywords__"],
packages=find_packages(exclude=["contrib", "docs", "tests", "examples"]),
install_requires=get_requirements("requirements.txt"),
ext_modules=[
Expand Down
23 changes: 23 additions & 0 deletions python_transport/wirepas_gateway/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"""
.. Copyright:
Wirepas Oy licensed under Apache License, Version 2.0
See file LICENSE for full license details.
"""

__author__ = "Wirepas Ltd"
__author_email__ = "[email protected]"
__classifiers__ = [
"Development Status :: 5 - Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Topic :: Software Development :: Libraries",
"Programming Language :: Python :: 3",
]
__copyright__ = "2019 Wirepas Ltd"
__description__ = "Wirepas gateway transport service that connects the local dbus to a remote MQTT broker."
__license__ = "Apache-2"
__pkg_name__ = "wirepas_gateway"
__title__ = "Wirepas Gateway Transport Service"
__url__ = "https://github.com/wirepas/gateway"
__version__ = "1.2.0rc1"
__keywords__ = "wirepas connectivity iot mesh"
46 changes: 18 additions & 28 deletions python_transport/wirepas_gateway/__init__.py
Original file line number Diff line number Diff line change
@@ -1,38 +1,28 @@
"""
Wirepas Gateway Client
=========================================

This module is property of Wirepas Oy and is meant for its user. Usage
implies knowledge and acceptance of the license agreement provided
through the separate channels.

The goal of this module is to support the exchange of data from a
Wirepas gateway to a Wirepas or user backend system.
Wirepas Gateway
===============

.. Style guidelines:
http://google.github.io/styleguide/pyguide.html

.. Attributes defined from _PEP 484:
https://www.python.org/dev/peps/pep-0484/

.. Copyright:
Wirepas Oy licensed under Apache License, Version 2.0
See file LICENSE for full license details.
"""
try:
from . import dbus
except ImportError:
pass

try:
from . import protocol
except ImportError:
pass

try:
from . import utils
except ImportError:
pass

__title__ = "wirepas_gateway"
__version__ = "1.2.0rc1"
from . import dbus
from . import protocol
from . import utils

from .__about__ import (
__author__,
__author_email__,
__copyright__,
__description__,
__license__,
__pkg_name__,
__title__,
__url__,
__version__,
__keywords__,
)