From d0160c595a85285f60760e0d1d4afcbd7ab48a26 Mon Sep 17 00:00:00 2001 From: Igor Date: Tue, 10 Nov 2020 22:34:33 +0000 Subject: [PATCH] Move to supporting python3.6+ only as prior versions are have reached end-of-life --- .github/workflows/test.yml | 2 +- moj_irat/__init__.py | 3 +++ setup.py | 17 ++++++++++++----- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4fcae5b..87af686 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.5, 3.6, 3.7, 3.8] + python-version: [3.6, 3.7, 3.8] steps: - name: Checkout repository uses: actions/checkout@v2 diff --git a/moj_irat/__init__.py b/moj_irat/__init__.py index e69de29..640fec2 100644 --- a/moj_irat/__init__.py +++ b/moj_irat/__init__.py @@ -0,0 +1,3 @@ +VERSION = (0, 5) +__version__ = '.'.join(map(str, VERSION)) +__author__ = 'Ministry of Justice Digital & Technology' diff --git a/setup.py b/setup.py index 46ca2d0..f0459f9 100755 --- a/setup.py +++ b/setup.py @@ -1,8 +1,14 @@ #!/usr/bin/env python +import importlib import os +import sys +import warnings from setuptools import setup +if sys.version_info[0:2] < (3, 6): + warnings.warn('This package is tested with Python version 3.6+') + root_path = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(root_path, 'README.rst')) as readme: @@ -11,17 +17,19 @@ install_requires = ['Django>=2.2,<4', 'requests'] tests_require = ['flake8', 'responses'] +package_info = importlib.import_module('moj_irat') + setup( name='django-moj-irat', - version='0.5', - author='Ministry of Justice Digital & Technology', + version=package_info.__version__, + author=package_info.__author__, author_email='dev@digital.justice.gov.uk', url='https://github.com/ministryofjustice/django-moj-irat', packages=['moj_irat'], include_package_data=True, license='MIT', - description="Tools to support adding a Django-based service to " - "Ministry of Justice's Incidence Response and Tuning", + description='Tools to support adding a Django-based service to ' + 'Ministry of Justice’s Incidence Response and Tuning', long_description=README, keywords='moj django irat monitoring', classifiers=[ @@ -32,7 +40,6 @@ 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8',