summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2021-12-15 10:10:21 +0000
committerStephen Finucane <stephenfin@redhat.com>2021-12-15 10:36:51 +0000
commit6340268cad342f41c357604535c842f5df1d4a10 (patch)
tree1fbdd00192065005474583ed463965535d3e69fb
parentc87ffbd904627d777aa1430963dced92a36aa033 (diff)
downloadsubunit-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>
-rw-r--r--.github/workflows/main.yml4
-rw-r--r--NEWS6
-rw-r--r--pyproject.toml5
-rw-r--r--setup.cfg3
-rwxr-xr-xsetup.py57
5 files changed, 37 insertions, 38 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index bb8cbae..3674b85 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 'pypy3']
+ python-version: [3.6, 3.7, 3.8, 3.9, 'pypy3']
os: ["ubuntu-latest"]
steps:
- uses: actions/checkout@v2
@@ -19,7 +19,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install Deps
- run: sudo apt-get install check libcppunit-dev
+ run: sudo apt-get install check libcppunit-dev
- name: Install package
run: python -m pip install -U '.[test,docs]'
- name: Build
diff --git a/NEWS b/NEWS
index 82c9f53..4bf7493 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,12 @@ subunit release notes
NEXT (In development)
---------------------
+IMPROVEMENTS
+~~~~~~~~~~~~
+
+* Drop support for Python 2.7, 3.4, and 3.5
+ (Stephen Finucane)
+
BUGFIXES
~~~~~~~~
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..9ebf206
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,5 @@
+[build-system]
+# These are the assumed default build requirements from pip:
+# https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support
+requires = ["setuptools>=43.0.0", "wheel"]
+build-backend = "setuptools.build_meta"
diff --git a/setup.cfg b/setup.cfg
deleted file mode 100644
index b8a1655..0000000
--- a/setup.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-[bdist_wheel]
-universal = 1
-
diff --git a/setup.py b/setup.py
index 8afde6e..fb03073 100755
--- a/setup.py
+++ b/setup.py
@@ -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'],
+ },
)