1
0
mirror of https://github.com/linkedin/oncall.git synced 2025-11-25 23:02:31 +02:00
Files
oncall/setup.py

78 lines
2.1 KiB
Python
Raw Normal View History

2017-05-02 15:57:25 -07:00
#!/usr/bin/env python
# -*- coding:utf-8 -*-
2017-05-23 15:30:57 -07:00
import setuptools
2017-05-02 15:57:25 -07:00
import re
2017-05-02 16:39:46 -07:00
2017-05-02 15:57:25 -07:00
with open('src/oncall/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)
with open('README.md', 'r') as fd:
long_description = fd.read()
2017-05-23 15:30:57 -07:00
setuptools.setup(
2017-05-02 15:57:25 -07:00
name='oncall',
version=version,
description='Oncall is a calendar tool designed for scheduling and managing on-call shifts',
long_description=long_description,
long_description_content_type="text/markdown",
url='https://github.com/linkedin/oncall',
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Programming Language :: Python :: 3'
],
2017-05-02 15:57:25 -07:00
package_dir={'': 'src'},
2017-05-19 18:07:35 -07:00
packages=setuptools.find_packages('src'),
include_package_data=True,
2017-05-02 16:39:46 -07:00
install_requires=[
Py3 (#290) * Py3 migration * Update to Python 3 for CircleCI * Fix auth bugs for python 3 Also fix notifier bug to check for active users * Update notifier exception handling Ignore role:target lookup failures from Iris, since these don't represent problems with the underlying system, just that people have inactive users on-call in the future. * Add get_id param option (#246) * add get_id param option * removed superfluous select and simplified logic * Flake8 typo (#247) * Hide confusing team settings in an advanced dropdown * Fix test fixtures * Add "allow duplicate" scheduler in UI Already in backend, so enable in FE too * Add Dockerfile to run oncall in a container * Move deps into a virtualenv. Run app not as super user. Mimick prod setup by using uwsgi * Fix issue with Dockerfile not having MANIFEST.in and wrong passwords in (#257) config * Update to ubuntu:18.04 and python3 packages and executables * Open config file as utf8 The default configuration file has utf8 characters, and python3 attempts to open the file as ASCII unless an alternate encoding is specified * Switch to the python3 uwsgi plugin * Update print and os.execv statements for python3 Python3 throws an exception when the first argument to os.execv is empty: ValueError: execv() arg 2 first element cannot be empty The module documentation suggests that the first element should be the name of the executed program: https://docs.python.org/3.7/library/os.html#os.execv * Map config.docker.yaml in to the container as a volume ./ops/entrypoint.py has the start of environment variable support to specify a configuration file, but it is incomplete until we update ./ops/daemons/uwsgi-docker.yaml or add environment support to oncall-notifier and oncall-scheduler. This commit allows users to map a specific configuration file in to their container and have it used by all oncall programs. * Convert line endings to match the rest of the project. * Add mysql port to docker configuration * Assume localhost mysql for default config.yaml * Update python-dev package and MySQL root password * Use password when configuring mysql The project has started using a password on the mysql instance. Once password auth is consistently working we can consider extracting the hardcoded password into an env file that is optionally randomly generated on initial startup. * Fix preview for round-robin (#269) * #275 fix for Python3 and Gunicorn load config * Fixed E303 flake8 * Change encoding & collation + test unicode name Co-authored-by: Daniel Wang <dwang159@gmail.com> Co-authored-by: ahm3djafri <42748963+ahm3djafri@users.noreply.github.com> Co-authored-by: TK <tkahnoski+github@gmail.com> Co-authored-by: Tim Freund <tim@freunds.net> Co-authored-by: Rafał Zawadzki <bluszcz@bluszcz.net>
2020-01-15 15:38:25 -08:00
'falcon==1.4.1',
2017-05-02 16:39:46 -07:00
'falcon-cors',
'greenlet==0.4.16',
'asn1crypto==1.0.0',
Py3 (#290) * Py3 migration * Update to Python 3 for CircleCI * Fix auth bugs for python 3 Also fix notifier bug to check for active users * Update notifier exception handling Ignore role:target lookup failures from Iris, since these don't represent problems with the underlying system, just that people have inactive users on-call in the future. * Add get_id param option (#246) * add get_id param option * removed superfluous select and simplified logic * Flake8 typo (#247) * Hide confusing team settings in an advanced dropdown * Fix test fixtures * Add "allow duplicate" scheduler in UI Already in backend, so enable in FE too * Add Dockerfile to run oncall in a container * Move deps into a virtualenv. Run app not as super user. Mimick prod setup by using uwsgi * Fix issue with Dockerfile not having MANIFEST.in and wrong passwords in (#257) config * Update to ubuntu:18.04 and python3 packages and executables * Open config file as utf8 The default configuration file has utf8 characters, and python3 attempts to open the file as ASCII unless an alternate encoding is specified * Switch to the python3 uwsgi plugin * Update print and os.execv statements for python3 Python3 throws an exception when the first argument to os.execv is empty: ValueError: execv() arg 2 first element cannot be empty The module documentation suggests that the first element should be the name of the executed program: https://docs.python.org/3.7/library/os.html#os.execv * Map config.docker.yaml in to the container as a volume ./ops/entrypoint.py has the start of environment variable support to specify a configuration file, but it is incomplete until we update ./ops/daemons/uwsgi-docker.yaml or add environment support to oncall-notifier and oncall-scheduler. This commit allows users to map a specific configuration file in to their container and have it used by all oncall programs. * Convert line endings to match the rest of the project. * Add mysql port to docker configuration * Assume localhost mysql for default config.yaml * Update python-dev package and MySQL root password * Use password when configuring mysql The project has started using a password on the mysql instance. Once password auth is consistently working we can consider extracting the hardcoded password into an env file that is optionally randomly generated on initial startup. * Fix preview for round-robin (#269) * #275 fix for Python3 and Gunicorn load config * Fixed E303 flake8 * Change encoding & collation + test unicode name Co-authored-by: Daniel Wang <dwang159@gmail.com> Co-authored-by: ahm3djafri <42748963+ahm3djafri@users.noreply.github.com> Co-authored-by: TK <tkahnoski+github@gmail.com> Co-authored-by: Tim Freund <tim@freunds.net> Co-authored-by: Rafał Zawadzki <bluszcz@bluszcz.net>
2020-01-15 15:38:25 -08:00
'gevent==1.4.0',
2017-05-02 16:39:46 -07:00
'ujson',
'sqlalchemy',
'PyYAML',
'PyMYSQL',
'phonenumbers',
'jinja2',
'streql',
'webassets',
'beaker',
2021-01-26 12:54:40 -08:00
'cryptography',
2017-05-02 16:39:46 -07:00
'python-ldap',
'pytz',
'irisclient',
'slackclient==1.3.1',
'icalendar',
'pymsteams',
'idna==2.10'
2017-05-02 16:39:46 -07:00
],
2017-07-12 18:14:52 -07:00
extras_require={
'ldap': ['python-ldap'],
'prometheus': ['prometheus_client'],
2017-07-12 18:14:52 -07:00
'dev': [
'pytest',
'pytest-mock',
'requests',
'gunicorn',
'flake8',
'Sphinx==1.5.6',
'sphinxcontrib-httpdomain',
'sphinx_rtd_theme',
'sphinx-autobuild',
],
},
2017-05-02 15:57:25 -07:00
entry_points={
'console_scripts': [
'oncall-dev = oncall.bin.run_server:main',
'oncall-user-sync = oncall.bin.user_sync:main',
2017-05-02 15:57:25 -07:00
'build_assets = oncall.bin.build_assets:main',
'oncall-scheduler = oncall.bin.scheduler:main',
'oncall-notifier = oncall.bin.notifier:main'
]
}
)