-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
47 lines (40 loc) · 1.23 KB
/
setup.py
File metadata and controls
47 lines (40 loc) · 1.23 KB
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
import re
from pathlib import Path
from setuptools import setup
try:
import pypandoc
except ImportError:
pypandoc = None
PACKAGE = 'timeout'
SRC_DIR = 'src'
INIT_PATH = Path(__file__).parent / SRC_DIR / PACKAGE / '__init__.py'
README_PATH = Path(__file__).parent / 'README.md'
if pypandoc:
DESCRIPTION = pypandoc.convert(README_PATH.as_posix(), 'rst')
else:
DESCRIPTION = README_PATH.read_text()
VERSION = re.search(
r'''^__version__ *= *["']([.\d]+)["']$''',
INIT_PATH.read_text(),
re.M,
).group(1)
setup(
name='signalled-timeout',
author="Center for Data Science and Public Policy",
author_email='datascifellows@gmail.com',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Natural Language :: English',
'Programming Language :: Python :: 3.5',
],
description="Timeout library for generic interruption of main thread by an "
"exception after a configurable duration",
long_description=DESCRIPTION,
url='https://github.com/dssg/signalled-timeout',
package_dir={'': SRC_DIR},
packages=[PACKAGE],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
version=VERSION,
)