forked from parsotat/BatAnalysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
56 lines (47 loc) · 1.68 KB
/
setup.py
File metadata and controls
56 lines (47 loc) · 1.68 KB
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
"""
steps to upload a distribution to PyPi is at: https://stackoverflow.com/questions/1471994/what-is-setup-py
"""
from setuptools import setup, find_packages
import os
# also need to include all subdirs in the data directory
def package_files(directory):
paths = []
for path, directories, filenames in os.walk(directory):
for filename in filenames:
paths.append(os.path.join("..", path, filename))
return paths
try:
with open("README.md", "r") as f:
long_description = f.read()
except FileNotFoundError:
long_description = ""
with open("requirements.txt") as f:
required = f.read().splitlines()
extra_files = package_files("./batanalysis/data")
# get the version number from the _version file
with open("batanalysis/_version.py") as f:
file_info = f.read().splitlines()
version = file_info[-1].split("=")[-1].split('"')[1]
setup(
name="BatAnalysis",
version=version,
packages=["batanalysis"],
url="https://github.com/parsotat/BatAnalysis",
license="BSD-3-Clause",
author="Tyler Parsotan and Sibasish Laha",
author_email="tyler.parsotan@nasa.gov",
description="Routines for analyzing data from BAT on the Neil Gehrels Swift Observatory",
long_description=long_description,
long_description_content_type="text/markdown",
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Astronomy",
],
python_requires=">=3.8",
install_requires=required,
package_data={"": extra_files},
include_package_data=True,
)