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
|
|
|
|
from setuptools import setup
|
|
|
|
|
|
|
|
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():
|
|
|
|
path = '/etc/runbullet'
|
|
|
|
try:
|
|
|
|
os.makedirs(path)
|
|
|
|
except OSError as e:
|
|
|
|
if isinstance(e, PermissionError) \
|
|
|
|
or e.errno == errno.EEXIST and os.path.isdir(path):
|
|
|
|
pass
|
|
|
|
else:
|
|
|
|
raise
|
|
|
|
|
2017-11-03 19:56:12 +01:00
|
|
|
plugins = pkg_files('runbullet/plugins')
|
2017-11-03 15:06:29 +01:00
|
|
|
create_etc_dir()
|
|
|
|
|
2017-11-03 12:34:47 +01:00
|
|
|
setup(
|
|
|
|
name = "runbullet",
|
|
|
|
version = "0.1",
|
|
|
|
author = "Fabio Manganiello",
|
|
|
|
author_email = "info@fabiomanganiello.com",
|
|
|
|
description = ("Runbullet service"),
|
2017-11-03 18:06:58 +01:00
|
|
|
license = "MIT",
|
2017-11-03 12:34:47 +01:00
|
|
|
keywords = "pushbullet notifications automation",
|
2017-11-03 18:06:58 +01:00
|
|
|
url = "https://github.com/BlackLight/runbullet",
|
2017-11-03 15:06:29 +01:00
|
|
|
packages = ['runbullet'],
|
|
|
|
package_data = {'': plugins},
|
|
|
|
scripts = ['runbullet/bin/pusher', 'runbullet/bin/runbullet'],
|
|
|
|
data_files = [
|
|
|
|
('/etc/runbullet', ['runbullet/config.example.yaml'])
|
|
|
|
],
|
|
|
|
long_description = read('README.md'),
|
|
|
|
classifiers = [
|
2017-11-03 12:34:47 +01:00
|
|
|
"Topic :: Utilities",
|
2017-11-03 18:06:58 +01:00
|
|
|
"License :: OSI Approved :: MIT",
|
2017-11-03 12:34:47 +01:00
|
|
|
],
|
2017-11-03 15:06:29 +01:00
|
|
|
install_requires = [
|
|
|
|
'pyyaml'
|
|
|
|
]
|
2017-11-03 12:34:47 +01:00
|
|
|
)
|
|
|
|
|