2017-11-03 12:41:15 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2017-11-03 15:06:29 +01:00
|
|
|
import errno
|
2017-11-03 12:34:47 +01:00
|
|
|
import os
|
2017-11-09 05:04:48 +01:00
|
|
|
from setuptools import setup, find_packages
|
2017-11-03 12:34:47 +01:00
|
|
|
|
|
|
|
def read(fname):
|
|
|
|
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
|
|
|
|
2017-11-03 15:06:29 +01:00
|
|
|
def pkg_files(dir):
|
|
|
|
paths = []
|
|
|
|
for (path, dirs, files) in os.walk(dir):
|
|
|
|
for file in files:
|
|
|
|
paths.append(os.path.join('..', path, file))
|
|
|
|
return paths
|
|
|
|
|
|
|
|
def create_etc_dir():
|
2017-12-11 20:30:57 +01:00
|
|
|
path = '/etc/platypush'
|
2017-11-03 15:06:29 +01:00
|
|
|
try:
|
|
|
|
os.makedirs(path)
|
|
|
|
except OSError as e:
|
2017-11-03 23:14:19 +01:00
|
|
|
if isinstance(e, PermissionError):
|
2017-12-11 20:30:57 +01:00
|
|
|
print('WARNING: Could not create /etc/platypush')
|
2017-11-03 23:14:19 +01:00
|
|
|
elif e.errno == errno.EEXIST and os.path.isdir(path):
|
2017-11-03 15:06:29 +01:00
|
|
|
pass
|
|
|
|
else:
|
|
|
|
raise
|
|
|
|
|
2017-12-11 20:30:57 +01:00
|
|
|
plugins = pkg_files('platypush/plugins')
|
|
|
|
backend = pkg_files('platypush/backend')
|
2017-11-03 15:06:29 +01:00
|
|
|
create_etc_dir()
|
|
|
|
|
2017-11-03 12:34:47 +01:00
|
|
|
setup(
|
2017-12-11 20:30:57 +01:00
|
|
|
name = "platypush",
|
2018-01-15 22:46:41 +01:00
|
|
|
version = "0.7.0",
|
2017-11-03 12:34:47 +01:00
|
|
|
author = "Fabio Manganiello",
|
|
|
|
author_email = "info@fabiomanganiello.com",
|
2017-12-11 20:30:57 +01:00
|
|
|
description = ("Platypush service"),
|
2017-11-03 18:06:58 +01:00
|
|
|
license = "MIT",
|
2017-11-03 22:54:08 +01:00
|
|
|
python_requires = '>= 3',
|
2017-11-03 12:34:47 +01:00
|
|
|
keywords = "pushbullet notifications automation",
|
2017-12-11 20:30:57 +01:00
|
|
|
url = "https://github.com/BlackLight/platypush",
|
2017-11-09 05:04:48 +01:00
|
|
|
packages = find_packages(),
|
2017-11-03 22:54:08 +01:00
|
|
|
entry_points = {
|
|
|
|
'console_scripts': [
|
2018-01-04 16:11:54 +01:00
|
|
|
'platypush=platypush:main',
|
|
|
|
'pusher=platypush.pusher:main',
|
2017-11-03 22:54:08 +01:00
|
|
|
],
|
|
|
|
},
|
2017-11-03 15:06:29 +01:00
|
|
|
data_files = [
|
2017-12-11 20:30:57 +01:00
|
|
|
('/etc/platypush', ['platypush/config.example.yaml'])
|
2017-11-03 15:06:29 +01:00
|
|
|
],
|
|
|
|
long_description = read('README.md'),
|
|
|
|
classifiers = [
|
2017-11-03 12:34:47 +01:00
|
|
|
"Topic :: Utilities",
|
2017-11-03 23:09:19 +01:00
|
|
|
"License :: OSI Approved :: MIT License",
|
2017-11-03 22:54:08 +01:00
|
|
|
"Development Status :: 3 - Alpha",
|
2017-11-03 12:34:47 +01:00
|
|
|
],
|
2017-11-03 15:06:29 +01:00
|
|
|
install_requires = [
|
2017-11-09 05:04:48 +01:00
|
|
|
'pyyaml',
|
2017-12-12 20:14:02 +01:00
|
|
|
'requires',
|
2017-11-03 22:54:08 +01:00
|
|
|
],
|
2017-12-12 20:14:02 +01:00
|
|
|
extras_require = {
|
|
|
|
'Support for Apache Kafka backend': ['kafka-python'],
|
2018-01-04 18:32:50 +01:00
|
|
|
'Support for Pushbullet backend': ['requests', 'websocket-client'],
|
2018-01-04 02:45:23 +01:00
|
|
|
'Support for HTTP backend': ['flask'],
|
2018-01-09 18:44:45 +01:00
|
|
|
'Support for HTTP poll backend': ['frozendict'],
|
2018-01-23 23:23:42 +01:00
|
|
|
'Support for database plugin': ['sqlalchemy', 'python-dateutil'],
|
2017-12-12 20:14:02 +01:00
|
|
|
'Support for Philips Hue plugin': ['phue'],
|
2017-12-16 02:27:51 +01:00
|
|
|
'Support for MPD/Mopidy music server plugin': ['python-mpd2'],
|
2017-12-12 20:14:02 +01:00
|
|
|
'Support for Belkin WeMo Switch plugin': ['ouimeaux'],
|
2017-12-27 00:39:06 +01:00
|
|
|
'Support for text2speech plugin': ['mplayer'],
|
2017-12-27 10:18:51 +01:00
|
|
|
'Support for OMXPlayer plugin': ['omxplayer'],
|
|
|
|
'Support for YouTube in the OMXPlayer plugin': ['youtube-dl'],
|
2018-01-09 18:44:45 +01:00
|
|
|
'Support for Google Assistant': ['google-assistant-library'],
|
2018-01-17 03:16:59 +01:00
|
|
|
'Support for the Google APIs': ['google-api-python-client'],
|
2018-01-11 19:31:44 +01:00
|
|
|
'Support for most of the HTTP poll backends': ['python-dateutil'],
|
2018-01-15 02:41:54 +01:00
|
|
|
'Support for Last.FM scrobbler plugin': ['pylast'],
|
2018-01-06 22:56:46 +01:00
|
|
|
# 'Support for Flic buttons': ['git+ssh://git@github.com/50ButtonsEach/fliclib-linux-hci']
|
2017-12-12 20:14:02 +01:00
|
|
|
},
|
2017-11-03 12:34:47 +01:00
|
|
|
)
|
|
|
|
|