forked from ufeindt/marshaltools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
40 lines (35 loc) · 1.3 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
from setuptools import setup
import sys
import os
import re
PACKAGENAME = 'marshaltools'
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 repo to interact with the ZTF marshal',
long_description=''' ''',
# What code to include as packages
packages=[PACKAGENAME],
packagedir={PACKAGENAME: 'marshaltools'},
# What data to include as packages
include_package_data=True,
package_data={PACKAGENAME:['data/*.txt',
'filters/P48/*.dat',
'filters/SEDm/*.dat',
'filters/UVOT/*.txt',]}
)