OpenMTC/apps/mqttConnector/setup-mqttconnector.py
aor-fokus 1052fd4a08
Release 1.3 (#30)
* Test debian stretch+python3 (#18)

* changes starting with python3 explicit

* removes python modules which are not available for python3

* exchanges fyzz query parsing with rdflib functionality

* fixes interop tests

* replaces reduce with for loop in nodb driver

* simple python2 -> python3 conversions

* adds changes for handling different string handling in python3

* test stretch building with travis

* installing python-setuptools in docker

* installing python-setuptools in docker

* changing python2 to python3 in docker makefiles

* changing python2 to python3 and some other test changes

* push docker only in master branche

* running version of openmtc

* fix some port problems

* porting path library completly now

* restoring travis.yml

* testing new travis.yml

* add sudo

* updating travis OS from trusty to xenial

* upgrade pip before

* show running docker logs

* show more logs

* for debugging

* showlogs of docker after failure

* testing new travis.yml

* finish travis.yml

* Adding roadmap (#26)

* adding roadmap

* adding a nicer view for some documents

* creating contributions.md (#27)

* travis only building on master branch (#25)

* deleting some typo

* another typo

* adding a contributer

* bump version to 1.3.0

* better link for contributions

* Port and fix simple apps

* add version tag
2019-02-14 15:41:53 +01:00

83 lines
2.2 KiB
Python
Executable File

#!/usr/bin/env python3
from setuptools import setup
from distutils.core import setup
from glob import glob
import sys
from utils import get_packages, get_pkg_files, OpenMTCSdist, move_config_files
# name and dir
NAME = "mqttconnector"
BASE_DIR = "."
# import pkg
sys.path.append(BASE_DIR + "/src")
pkg = __import__(NAME)
# setup name and version
SETUP_NAME = "openmtc-" + NAME
SETUP_VERSION = pkg.__version__
SETUP_DESCRIPTION = pkg.__description__
# meta
SETUP_AUTHOR = pkg.__author_name__
SETUP_AUTHOR_EMAIL = pkg.__author_mail__
SETUP_URL = "http://www.openmtc.org"
SETUP_LICENSE = "Fraunhofer FOKUS proprietary"
# requirements
SETUP_REQUIRES = pkg.__requires__
SETUP_INSTALL_REQUIRES = pkg.__requires__
# packages
PACKAGES = [NAME]
PACKAGE_DIR = {"": BASE_DIR + "/src"}
all_packages = []
for package in PACKAGES:
all_packages.extend(get_packages(package, PACKAGE_DIR))
# scripts
SETUP_SCRIPTS = glob(BASE_DIR + "/bin/*")
# package data
PACKAGE_DATA = {NAME: get_pkg_files(BASE_DIR, NAME)}
# data files
CONFIG_FILES = ("config.json",)
CONFIG_DIR = "/etc/openmtc/" + NAME
CONFIG_DIST_FILES = (BASE_DIR + "/etc/conf/config.json.dist",)
DATA_FILES = [(CONFIG_DIR, CONFIG_DIST_FILES)]
# cmd class
CMD_CLASS = {'sdist': OpenMTCSdist}
if __name__ == "__main__":
if 'bdist_wheel' in sys.argv:
raise RuntimeError("This setup.py does not support wheels")
############################################################################
# setup
setup(name=SETUP_NAME,
version=SETUP_VERSION,
description=SETUP_DESCRIPTION,
author=SETUP_AUTHOR,
author_email=SETUP_AUTHOR_EMAIL,
url=SETUP_URL,
license=SETUP_LICENSE,
requires=SETUP_REQUIRES,
install_requires=SETUP_INSTALL_REQUIRES,
package_dir=PACKAGE_DIR,
packages=all_packages,
scripts=SETUP_SCRIPTS,
package_data=PACKAGE_DATA,
data_files=DATA_FILES,
cmdclass=CMD_CLASS
)
############################################################################
# install
if "install" in sys.argv:
# only do this during install
move_config_files(CONFIG_DIR, CONFIG_FILES)