-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
61 lines (50 loc) · 1.66 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
# -*- coding: utf-8 -*-
import os
import sys
import re
from setuptools import setup, find_packages
def get_version():
"""
Returns version string by using regex to parse package init file for __version__ variable
"""
import re
vfile = os.path.join( 'src', 'bdcapi', '__init__.py' )
regex = r'^(?:__version__)(?:\s*)=(?:\s*)(?:[\'"]([^\'"]*)[\'"]).*$'
with open(vfile, 'rt') as fp:
for line in fp.readlines():
mo = re.search(regex, line, re.M)
if mo:
return mo.group(1)
raise RuntimeError('Unable to find version string in %s.' % (vfile,))
requirements = [
'Click',
'click-plugins',
'pandas',
'requests',
'PyYAML',
'importlib-resources; python_version == "3.8"' ]
setup(
name='bdcapi',
version=get_version(),
requires_python='>=3.8',
description='BDCAPI is a tool to interface with the publicly-accessible APIs for the Broadband Data Collection (BDC) system',
author='Jonathan McCormack',
url='http://github.com/jonathanmccormack/bdcapi',
packages=find_packages(where='src'),
package_dir={ '': 'src' },
package_data={ 'bdcapi': [ 'pkg_data/*.yml' ] },
install_requires=requirements,
entry_points='''
[console_scripts]
bdcapi=bdcapi:cli
''',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Telecommnications Industry',
'License :: Public Domain',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Topic :: Communications',
'Topic :: Utilities' ])
#