Skip to content

Commit

Permalink
Merge pull request #81 from Dinnerbone/py2-eol
Browse files Browse the repository at this point in the history
Drop support for EOL Python versions
  • Loading branch information
kevinkjt2000 authored Apr 8, 2020
2 parents 4b22471 + b599ce6 commit db5b816
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ __pycache__/
# Distribution / packaging
.Python
env/
venv/
build/
develop-eggs/
dist/
Expand Down
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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

Expand Down
18 changes: 18 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
-r requirements/base.txt
click==7.1.1
dnspython3==1.15.0
six==1.14.0
3 changes: 0 additions & 3 deletions requirements/base.txt

This file was deleted.

3 changes: 0 additions & 3 deletions requirements/python2.txt

This file was deleted.

3 changes: 0 additions & 3 deletions requirements/python3.txt

This file was deleted.

30 changes: 18 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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',
},
)
4 changes: 4 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-r requirements.txt
mock>=3.0.5
nose>=1.3.7
twine

0 comments on commit db5b816

Please sign in to comment.