forked from Nextdoor/ndscheduler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
91 lines (76 loc) · 2.48 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import multiprocessing # To make python setup.py test happy
import os
import shutil
import subprocess
from distutils.command.clean import clean
from setuptools import find_packages
from setuptools import setup
multiprocessing
PACKAGE = 'ndscheduler'
__version__ = None
exec(open(os.path.join('ndscheduler', 'version.py')).read()) # set __version__
# -*- Hooks -*-
class CleanHook(clean):
def run(self):
clean.run(self)
def maybe_rm(path):
if os.path.exists(path):
shutil.rmtree(path)
maybe_rm('ndscheduler.egg-info')
maybe_rm('build')
maybe_rm('.venv')
maybe_rm('dist')
maybe_rm('.eggs')
subprocess.call('rm -rf *.egg', shell=True)
subprocess.call('rm -f datastore.db', shell=True)
subprocess.call('find . -name "*.pyc" -exec rm -rf {} \;',
shell=True)
# -*- Classifiers -*-
classes = """
Development Status :: 5 - Production/Stable
License :: OSI Approved :: BSD License
Topic :: System :: Distributed Computing
Topic :: Software Development :: Object Brokering
Programming Language :: Python
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: Implementation :: CPython
Operating System :: OS Independent
"""
classifiers = [s.strip() for s in classes.split('\n') if s]
# -*- %%% -*-
setup(
name=PACKAGE,
version=__version__,
description='ndscheduler: A cron-replacement library from Nextdoor',
long_description=open('README.md').read(),
author='Nextdoor Engineering',
author_email='[email protected]',
url='https://github.com/Nextdoor/ndscheduler',
download_url='http://pypi.python.org/pypi/ndscheduler#downloads',
license='Apache License, Version 2',
keywords='scheduler nextdoor cron python',
packages=find_packages(),
include_package_data=True,
extras_require={'python_version<"3.3"': ['funcsigs']},
tests_require=[
'funcsigs',
'mock >= 1.1.2',
'nose',
],
test_suite='nose.collector',
install_requires=[
'APScheduler >= 3.0.0',
'SQLAlchemy >= 1.0.0',
'future >= 0.15.2',
'tornado < 6',
'python-dateutil >= 2.2',
],
classifiers=classifiers,
cmdclass={'clean': CleanHook},
)