diff options
author | Stephen Finucane <stephenfin@redhat.com> | 2021-12-15 10:10:21 +0000 |
---|---|---|
committer | Stephen Finucane <stephenfin@redhat.com> | 2021-12-15 10:36:51 +0000 |
commit | 6340268cad342f41c357604535c842f5df1d4a10 (patch) | |
tree | 1fbdd00192065005474583ed463965535d3e69fb /setup.py | |
parent | c87ffbd904627d777aa1430963dced92a36aa033 (diff) | |
download | subunit-git-6340268cad342f41c357604535c842f5df1d4a10.tar.gz |
Drop support for Python 2.7, 3.5
Both of these are EOL now. There's no reason to continue supporting
them. Python 3.6 is close to EOL but we can give it another release
before we formally drop that.
We also drop support for installing without setuptools, since this is
expected to be effectively always present nowadays. We include a
pyproject.toml file just in case that ever changes though.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 57 |
1 files changed, 24 insertions, 33 deletions
@@ -1,36 +1,15 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 + import os.path -try: - # If the user has setuptools / distribute installed, use it - from setuptools import setup -except ImportError: - # Otherwise, fall back to distutils. - from distutils.core import setup - extra = {} -else: - extra = { - 'install_requires': [ - 'extras', - 'testtools>=0.9.34', - ], - 'tests_require': [ - 'fixtures', - 'hypothesis', - 'testscenarios', - ], - 'extras_require': { - 'docs': ['docutils'], - 'test': ['fixtures', 'testscenarios'], - 'test:python_version!="3.2"': ['hypothesis'], - }, - } +from setuptools import setup def _get_version_from_file(filename, start_of_line, split_marker): """Extract version from file, giving last matching value or None""" try: - return [x for x in open(filename) - if x.startswith(start_of_line)][-1].split(split_marker)[1].strip() + return [ + x for x in open(filename) if x.startswith(start_of_line) + ][-1].split(split_marker)[1].strip() except (IOError, IndexError): return None @@ -40,12 +19,14 @@ VERSION = ( _get_version_from_file('PKG-INFO', 'Version:', ':') # Must be a development checkout, so use the Makefile or _get_version_from_file('Makefile', 'VERSION', '=') - or "0.0") + or "0.0" +) relpath = os.path.dirname(__file__) if relpath: os.chdir(relpath) + setup( name='python-subunit', version=VERSION, @@ -55,9 +36,7 @@ setup( 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', @@ -75,7 +54,7 @@ setup( }, packages=['subunit', 'subunit.tests'], package_dir={'subunit': 'python/subunit'}, - scripts = [ + scripts=[ 'filters/subunit-1to2', 'filters/subunit-2to1', 'filters/subunit-filter', @@ -91,6 +70,18 @@ setup( 'filters/subunit2pyunit', 'filters/tap2subunit', ], - python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", - **extra + python_requires=">=3.6", + install_requires=[ + 'extras', + 'testtools>=0.9.34', + ], + tests_require=[ + 'fixtures', + 'hypothesis', + 'testscenarios', + ], + extras_require={ + 'docs': ['docutils'], + 'test': ['fixtures', 'testscenarios', 'hypothesis'], + }, ) |