forked from E3SM-Project/zppy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
30 lines (27 loc) · 1.12 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
import os
from setuptools import find_packages, setup
# From https://github.com/MPAS-Dev/compass/blob/master/setup.py
def package_files(directory, prefixes, extensions):
""" based on https://stackoverflow.com/a/36693250/7728169"""
paths = []
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
parts = filename.split('.')
prefix = parts[0]
extension = parts[-1]
if prefix in prefixes or extension in extensions:
paths.append(os.path.join('..', path, filename))
return paths
data_files = package_files('zppy', prefixes=[], extensions=['bash', 'csh', 'cfg', 'ini', 'sh'])
setup(
name="zppy",
version="1.0.0rc3",
author="Ryan Forsyth, Chris Golaz",
author_email="forsyth2@llnl.gov, golaz1@llnl.gov",
description="Post-processing software for E3SM",
python_requires='>=3.6',
intall_requires=['configobj', 'jinja2'],
packages=find_packages(exclude=["*.test", "*.test.*", "test.*", "test"]),
package_data={'': data_files},
entry_points={"console_scripts": ["zppy=zppy.__main__:main"]},
)