Skip to content

Commit

Permalink
Drop support for Python3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
amykyta3 committed Jan 5, 2025
1 parent cffc9dc commit 202c530
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 39 deletions.
46 changes: 18 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,27 @@ jobs:
strategy:
matrix:
python-version:
- 3.6
- 3.7
- 3.8
- 3.9
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
include:
- os: ubuntu-latest

# older versions need older OS
- python-version: 3.6
os: ubuntu-20.04
- python-version: "3.7"
os: ubuntu-22.04

- python-version: "3.8"
os: ubuntu-22.04

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

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.7 to bootstrap py3.6
if: ${{ matrix.python-version == '3.6' }}
uses: actions/setup-python@v4
with:
python-version: 3.7

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -53,18 +49,7 @@ jobs:
run: |
python -m pip install -U -r tests/requirements.txt
# Python 3.6 cannot install directly from a pyproject.toml
# Instead, build a wheel from py3.7 and then install it
- name: Install via wheel
if: ${{ matrix.python-version == '3.6' }}
run: |
python3.7 -m pip install build
python3.7 -m build
python --version
python -m pip install ./dist/*.whl
- name: Install
if: ${{ matrix.python-version != '3.6' }}
run: |
python -m pip install .
Expand Down Expand Up @@ -110,7 +95,7 @@ jobs:

- name: Install dependencies
run: |
python -m pip install -U pylint
python -m pip install -r tests/requirements.txt
- name: Install
run: |
Expand All @@ -132,7 +117,11 @@ jobs:

- name: Install dependencies
run: |
python -m pip install -U mypy peakrdl
python -m pip install -r tests/requirements.txt
- name: Install
run: |
python -m pip install .
- name: Type Check
run: |
Expand Down Expand Up @@ -161,8 +150,9 @@ jobs:
- name: Build sdist
run: python -m build

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: dist
path: |
dist/*.tar.gz
dist/*.whl
Expand All @@ -180,9 +170,9 @@ jobs:
# Only publish when a GitHub Release is created.
if: github.event_name == 'release'
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact
name: dist
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
16 changes: 7 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ build-backend = "setuptools.build_meta"
[project]
name = "peakrdl-cheader"
dynamic = ["version"]
requires-python = ">=3.6"
requires-python = ">=3.7"
dependencies = [
"systemrdl-compiler >= 1.21.0, < 2",
"systemrdl-compiler >= 1.29.0, < 2",
"jinja2",
]

Expand All @@ -26,20 +26,18 @@ classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
]

[project.optional-dependencies]
cli = [
"peakrdl-cli >= 1.2.3",
]

[project.urls]
Source = "https://github.com/SystemRDL/PeakRDL-cheader"
Tracker = "https://github.com/SystemRDL/PeakRDL-cheader/issues"
Expand Down
4 changes: 2 additions & 2 deletions src/peakrdl_cheader/design_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ def __init__(self, top_node: AddrmapNode, kwargs: Any) -> None:
#------------------------
# Each reg that has overlapping fields generates an entry:
# reg_path : list of field names involved in overlap
self.overlapping_fields = {} # type: Dict[str, List[str]]
self.overlapping_fields: Dict[str, List[str]] = {}

# Pairs of overlapping registers
# first_reg_path : partner_register_name
self.overlapping_reg_pairs = {} # type: Dict[str, str]
self.overlapping_reg_pairs: Dict[str, str] = {}

#------------------------
# Extract compiler args
Expand Down

0 comments on commit 202c530

Please sign in to comment.