Skip to content
This repository was archived by the owner on Mar 13, 2024. It is now read-only.

Commit 9cd9532

Browse files
JoshuaApplebycoretl
authored andcommitted
Add python 3.7 support
1 parent d5ab1fb commit 9cd9532

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

.github/workflows/code.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ jobs:
3232
fail-fast: false
3333
matrix:
3434
os: ["ubuntu-latest"] # can add windows-latest, macos-latest
35-
python: ["3.9", "3.10", "3.11"]
35+
python: ["3.8", "3.9", "3.10", "3.11"]
3636
install: ["-e .[dev]"]
3737
# Make one version be non-editable to test both paths of version code
3838
include:
3939
- os: "ubuntu-latest"
40-
python: "3.8"
40+
python: "3.7"
4141
install: ".[dev]"
4242

4343
runs-on: ${{ matrix.os }}

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@ name = "python3-pip-skeleton"
77
classifiers = [
88
"Development Status :: 3 - Alpha",
99
"License :: OSI Approved :: Apache Software License",
10+
"Programming Language :: Python :: 3.7",
1011
"Programming Language :: Python :: 3.8",
1112
"Programming Language :: Python :: 3.9",
1213
"Programming Language :: Python :: 3.10",
1314
"Programming Language :: Python :: 3.11",
1415
]
1516
description = "One line description of your module"
16-
dependencies = [] # Add project dependencies here, e.g. ["click", "numpy"]
17+
dependencies = [
18+
"typing-extensions;python_version<'3.8'",
19+
] # Add project dependencies here, e.g. ["click", "numpy"]
1720
dynamic = ["version"]
1821
license.file = "LICENSE"
1922
readme = "README.rst"
20-
requires-python = ">=3.8"
23+
requires-python = ">=3.7"
2124

2225
[project.optional-dependencies]
2326
dev = [

src/python3_pip_skeleton/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
from importlib.metadata import version
1+
import sys
2+
3+
if sys.version_info < (3, 8):
4+
from importlib_metadata import version # noqa
5+
else:
6+
from importlib.metadata import version # noqa
27

38
__version__ = version("python3-pip-skeleton")
49
del version

tests/test_boilerplate_removed.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
This file checks that all the example boilerplate text has been removed.
33
It can be deleted when all the contained tests pass
44
"""
5-
from importlib.metadata import metadata
5+
import sys
66
from pathlib import Path
77

8+
if sys.version_info < (3, 8):
9+
from importlib_metadata import metadata # noqa
10+
else:
11+
from importlib.metadata import metadata # noqa
12+
813
ROOT = Path(__file__).parent.parent
914

1015

0 commit comments

Comments
 (0)