forked from Nextdoor/ndscheduler
-
Notifications
You must be signed in to change notification settings - Fork 6
/
setup.py
87 lines (71 loc) · 2.46 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
#!/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 :: 3.6
Programming Language :: Python :: 3.7
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="Matthias Homann (original: Nextdoor Engineering)",
author_email="[email protected]",
url="https://github.com/palto42/ndscheduler",
license="BSD 2-Clause 'Simplified' License",
keywords="scheduler nextdoor cron python",
packages=find_packages(),
include_package_data=True,
tests_require=["funcsigs", "mock >= 1.1.2", "nose", ],
test_suite="nose.collector",
python_requires=">=3.6.4",
install_requires=[
"APScheduler >= 3.0.0",
"SQLAlchemy >= 1.0.0",
"future >= 0.15.2",
"tornado >= 6",
"python-dateutil >= 2.2",
"bcrypt >= 3.1.7", # for user authentication
"confuse >= 1.1.0", # for yaml config support
# python-ldap is only required if LDAP authentication is used
# "python-ldap >= 3.3.1",
],
classifiers=classifiers,
cmdclass={"clean": CleanHook},
)