-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
38 lines (33 loc) · 1.21 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
from setuptools import setup
import sys
import os
import re
PACKAGENAME = 'emgw_filters'
packageDir = os.path.join(os.path.dirname(os.path.abspath(__file__)),
PACKAGENAME)
# Obtain the package version
versionFile = os.path.join(packageDir, 'version.py')
with open(versionFile, 'r') as f:
s = f.read()
# Look up the string value assigned to __version__ in version.py using regexp
versionRegExp = re.compile("__VERSION__ = \"(.*?)\"")
# Assign to __version__
__version__ = versionRegExp.findall(s)[0]
print(__version__)
# create requirements file
setupDir = os.path.join(packageDir, '..', 'setup')
genRequirements = os.path.join(setupDir, 'generate_requirements.py')
print(genRequirements)
setup(# package information
name=PACKAGENAME,
version=__version__,
description='simple repository for filtering alerts for relevant counterparts',
long_description=''' ''',
# What code to include as packages
packages=[PACKAGENAME],
packagedir={PACKAGENAME: 'emgw_filters'},
# What data to include as packages
include_package_data=True,
package_data={PACKAGENAME:['example_data/*.csv', 'example_data/*.gz',
]}
)