-
Notifications
You must be signed in to change notification settings - Fork 15
/
setup.py
34 lines (28 loc) · 1.06 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
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", "json"]
)
setup(
name="zppy",
version="2.5.0",
author="Ryan Forsyth, Chris Golaz",
author_email="[email protected], [email protected]",
description="Post-processing software for E3SM",
python_requires=">=3.9",
packages=find_packages(include=["zppy", "zppy.*"]),
package_data={"": data_files},
entry_points={"console_scripts": ["zppy=zppy.__main__:main"]},
)