-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
43 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[build-system] | ||
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] | ||
write_to = "bigplanet/bigplanet_version.py" | ||
write_to_template = '__version__ = "{version}"' | ||
|
||
[tool.black] | ||
line-length = 79 | ||
exclude = ''' | ||
/( | ||
\.eggs | ||
| \.git | ||
| \.hg | ||
| \.mypy_cache | ||
| \.tox | ||
| \.venv | ||
| _build | ||
| buck-out | ||
| build | ||
| dist | ||
)/ | ||
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[options] | ||
setup_requires = | ||
setuptools_scm | ||
|
||
[metadata] | ||
license_files = LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,31 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
from __future__ import absolute_import, division, print_function, unicode_literals | ||
import warnings | ||
from setuptools import setup | ||
import os | ||
import io | ||
import re | ||
|
||
try: | ||
from setuptools import setup | ||
from setuptools.command.install import install | ||
|
||
setup | ||
except ImportError: | ||
from distutils.core import setup | ||
|
||
setup | ||
|
||
# Get the long description from the README | ||
def readme(): | ||
with open("README.md") as f: | ||
return f.read() | ||
|
||
|
||
# Read, version funcs taken from: | ||
# https://github.com/ellisonbg/altair/blob/master/setup.py | ||
def read(path, encoding="utf-8"): | ||
path = os.path.join(os.path.dirname(__file__), path) | ||
with io.open(path, encoding=encoding) as fp: | ||
return fp.read() | ||
|
||
|
||
def version(path): | ||
""" | ||
Obtain the packge version from a python file e.g. pkg/__init__.py | ||
See <https://packaging.python.org/en/latest/single_source_version.html>. | ||
""" | ||
version_file = read(path) | ||
version_match = re.search( | ||
r"""^__version__ = ['"]([^'"]*)['"]""", version_file, re.M | ||
) | ||
if version_match: | ||
return version_match.group(1) | ||
raise RuntimeError("Unable to find version string.") | ||
|
||
|
||
VERSION = version("bigplanet/__init__.py") | ||
|
||
# Setup! | ||
setup( | ||
name="bigplanet", | ||
version=VERSION, | ||
description="VPLANET Data Analysis Tools", | ||
long_description=readme(), | ||
long_description=open("README.md", "r").read(), | ||
long_description_content_type="text/markdown", | ||
classifiers=[ | ||
"Development Status :: 3 - Alpha", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 2", | ||
"Topic :: Scientific/Engineering :: Astronomy", | ||
], | ||
url="https://github.com/VirtualPlanetaryLaboratory/vplanet/tree/master/bigplanet", | ||
url="https://github.com/VirtualPlanetaryLaboratory/bigplanet", | ||
author="Caitlyn Wilhelm", | ||
author_email="cwilhelm@uw.edu", | ||
license="MIT", | ||
packages=["bigplanet"], | ||
include_package_data=True, | ||
use_scm_version={ | ||
"write_to": os.path.join("bigplanet", "bigplanet_version.py"), | ||
"write_to_template": '__version__ = "{version}"\n', | ||
}, | ||
install_requires=["numpy", "h5py", "argparse", "pandas", "scipy"], | ||
entry_points={ | ||
"console_scripts": [ | ||
"bigplanet = bigplanet.bigplanet:Arguments", | ||
"bpstatus = bigplanet.bpstatus:main", | ||
], | ||
}, | ||
install_requires=["numpy", "h5py", "argparse", "pandas", "scipy"], | ||
include_package_data=True, | ||
setup_requires=["setuptools_scm"], | ||
zip_safe=False, | ||
) |