-
Nathan Bockisch authoredNathan Bockisch authored
setup.py 3.35 KiB
#
# Copyright (C) 2021 Associated Universities, Inc. Washington DC, USA.
#
# This file is part of NRAO Workspaces.
#
# Workspaces is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Workspaces is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Workspaces. If not, see <https://www.gnu.org/licenses/>.
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# For matching the version string.
import re
# To use a consistent encoding
from codecs import open
from os import path
# Always prefer setuptools over distutils
from setuptools import find_packages, setup
this_module = "testing"
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()
def read(*parts):
with open(path.join(here, *parts), "r") as fp:
return fp.read()
def find_version(*file_paths):
version_file = read(*file_paths)
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.")
requires = [
"dsnparse",
"pytest==7.2.0",
"pendulum==2.1.2",
"pytest-mock==3.10.0",
"behave==1.2.6",
"pytest-cov==4.0.0",
"mock_alchemy==0.2.1",
"pytest-resource-path",
"requests-mock",
"astropy",
"fakeredis==1.7.1",
"immutable_views",
"hypothesis",
"kombu",
]
# Setup comment
setup(
name="ssa-" + this_module,
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version=find_version(this_module, "_version.py"),
description="Workspaces testing package; provides necessary packages and utilities for running tests",
long_description=long_description,
# Author details
author="Science Support and Archive",
author_email="ssa-announcements@nrao.edu",
# Choose your license
license="GPL",
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
"Development Status :: 4 - Beta",
# Indicate who your project is intended for
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
# Pick your license as you wish (should match "license" above)
"License :: OSI Approved :: GPL License",
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
"Programming Language :: Python :: 3.6",
],
install_requires=requires,
packages=find_packages(),
)