import io import re from setuptools import find_packages from setuptools import setup def _process_requirements(requirements): return list( filter(lambda x: x != '', map(lambda x: x.strip(), requirements)), ) def _process_packages(packages): return list( map(lambda x: 'homehub_iformicarium.{package}'.format(package=x), packages), ) with io.open('README.md', 'rt', encoding='utf8') as f: readme = f.read() with io.open('requirements.txt', 'rt', encoding='utf8') as f: requirements = _process_requirements(f.read().split('\n')) with io.open('homehub_iformicarium/__init__.py', 'rt', encoding='utf8') as f: version = re.search(r"""__version__ = '(.*?)'""", f.read()).group(1) packages = ['homehub_iformicarium'] packages.extend(_process_packages(find_packages( 'homehub_iformicarium', exclude=[ 'testing', 'testing.*', 'tests', 'tests.*', ], ))) setup( name='homehub_iformicarium', version=version, license='Apache License Version 2.0', author='BTHLabs', author_email='contact@bthlabs.pl', maintainer='BTHLabs', maintainer_email='contact@bthlabs.pl', description='BTHLabs HomeHub - iFormicarium Integration', long_description=readme, classifiers=[ 'License :: OSI Approved :: Apache Software License', ], packages=packages, include_package_data=True, python_requires='>=3.7', install_requires=requirements, )