diff --git a/.gitignore b/.gitignore index 7023855..33a9fb3 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ __pycache__/ # Distribution / packaging .Python env/ +venv/ build/ develop-eggs/ dist/ diff --git a/.travis.yml b/.travis.yml index ff735b9..6c9b7e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,9 @@ python: - 3.5 - 3.6 - 3.7 - - 2.7 + - 3.8 install: - pip install --upgrade pip - - if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then pip install -r requirements/python2.txt; fi - - if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then pip install -r requirements/python3.txt; fi -script: nosetests + - pip install -r test-requirements.txt + - pip check +script: python -m nose diff --git a/CHANGELOG b/CHANGELOG index b8b8b36..2c67023 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +3.0 + * Drop support for python 2 and python 3.4; you may use version 2.3 or prior for outdated python versions. + 2.3 * Added json CLI command diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..c4db50e --- /dev/null +++ b/release.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -euo pipefail + +[ ! -d venv ] && ( + python3 -m virtualenv venv + source venv/bin/activate + pip install -r test-requirements.txt + pip check +) +source venv/bin/activate + +python -m nose + +rm -rf dist/ +python setup.py sdist bdist_wheel +twine check dist/* + +# TODO: automate releases on tag builds of travis diff --git a/requirements.txt b/requirements.txt index 1ea7283..8e5a784 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,3 @@ --r requirements/base.txt \ No newline at end of file +click==7.1.1 +dnspython3==1.15.0 +six==1.14.0 diff --git a/requirements/base.txt b/requirements/base.txt deleted file mode 100644 index 0ae9230..0000000 --- a/requirements/base.txt +++ /dev/null @@ -1,3 +0,0 @@ -six==1.7.3 -mock==1.0.1 -click==6.2 diff --git a/requirements/python2.txt b/requirements/python2.txt deleted file mode 100644 index 7da539c..0000000 --- a/requirements/python2.txt +++ /dev/null @@ -1,3 +0,0 @@ --r base.txt - -dnspython==1.12.0 \ No newline at end of file diff --git a/requirements/python3.txt b/requirements/python3.txt deleted file mode 100644 index c9bb173..0000000 --- a/requirements/python3.txt +++ /dev/null @@ -1,3 +0,0 @@ --r base.txt - -dnspython3==1.12.0 \ No newline at end of file diff --git a/setup.py b/setup.py index 7b9abe4..0ecd605 100644 --- a/setup.py +++ b/setup.py @@ -1,42 +1,48 @@ from setuptools import setup -import sys -PY2 = sys.version_info[0] == 2 +# TODO: read requirements from file install_requires = [ - 'six', 'Click' + 'click', 'dnspython3', 'six' ] -if PY2: - install_requires.append('dnspython') -else: - install_requires.append('dnspython3') - tests_require = [ - 'mock' + 'mock', 'nose' ] setup( name='mcstatus', - version='2.3.0', + version='3.0.0', author='Nathan Adams', author_email='dinnerbone@dinnerbone.com', url='https://pypi.python.org/pypi/mcstatus', packages=['mcstatus', 'mcstatus.protocol', 'mcstatus.scripts'], description='A library to query Minecraft Servers for their status and capabilities.', + long_description=open("README.md", "r").read(), + long_description_content_type="text/markdown", install_requires=install_requires, tests_require=tests_require, + python_requires=">=3.5", classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', + 'Natural Language :: English', + 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Operating System :: OS Independent', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Topic :: Games/Entertainment', 'Topic :: Software Development :: Libraries :: Python Modules', + 'Topic :: System :: Monitoring', ], entry_points=''' [console_scripts] mcstatus=mcstatus.scripts.mcstatus:cli ''', + project_urls={ + 'Source': 'https://github.com/Dinnerbone/mcstatus', + }, ) diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..80c19a4 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,4 @@ +-r requirements.txt +mock>=3.0.5 +nose>=1.3.7 +twine