Skip to content

Commit

Permalink
Add Python v3.8 compatibility (#2)
Browse files Browse the repository at this point in the history
* Support Python v3.8 as well as v3.7

* Run tests and build wheels also on v3.8

* Increment version number

* Drop g++ version number

* Install current Ubuntu g++ version

* Disable fail-fast

* Release constraints on importlib_metadata

* Revert "Release constraints on importlib_metadata"

This reverts commit c7436dd.

* Update importlib_metadata constraints
  • Loading branch information
sethaxen authored Mar 1, 2023
1 parent b1c816e commit abf6661
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/quality-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ jobs:
check-and-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7]
python-version: [3.7, 3.8]
poetry-version: [1.1.6]
name: Python-${{ matrix.python-version }}
steps:
Expand All @@ -43,7 +44,7 @@ jobs:
- name: Install building tools
run: |
sudo apt-get install build-essential
sudo apt-get install cmake g++-7
sudo apt-get install cmake g++-11
# ------------ build and install package
- name: Install package
run: poetry install
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/upload-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
python-version: [3.7, 3.8]
poetry-version: [1.1.6]
name: Python-${{ matrix.python-version }}
steps:
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Install building tools
run: |
sudo apt-get install build-essential
sudo apt-get install cmake g++-7
sudo apt-get install cmake g++-11
# ------------ build and install package
- name: Install package
run: poetry install
Expand All @@ -55,7 +55,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
python-version: [3.7, 3.8]
poetry-version: [1.1.6]
name: Release PyPi package
steps:
Expand All @@ -81,7 +81,7 @@ jobs:
- name: Install building tools
run: |
sudo apt-get install build-essential
sudo apt-get install cmake g++-7
sudo apt-get install cmake g++-11
# ------------ build and install package
- name: Install package
run: |
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.6
0.0.7
2 changes: 1 addition & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from setuptools.command.build_ext import build_ext as build_ext_orig

if sys.platform.startswith("linux"):
_BANDED_MATRICES_COMPILER = "g++-7"
_BANDED_MATRICES_COMPILER = "g++"
elif sys.platform.startswith("darwin"):
_BANDED_MATRICES_COMPILER = "g++"
else:
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "banded_matrices"
version = "0.0.6"
version = "0.0.7"
description = "Native (C++) implementation of Banded Matrices for TensorFlow"
readme = "README.md"
repository = "https://github.com/secondmind-labs/banded_matrices"
Expand All @@ -21,9 +21,9 @@ build = "build.py"

[tool.poetry.dependencies]
cmake = "~3.18.0"
importlib_metadata = "^1.6"
importlib-metadata = ">=4.4,<5.0"
numpy = "^1.18.0"
python = "~3.7"
python = ">=3.7,<3.9"
tensorflow = "~2.4.0"

[tool.poetry.dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

install_requires = [
"cmake>=3.18.0,<3.19.0",
"importlib_metadata>=1.6,<2.0",
"importlib_metadata>=4.4,<5.0",
"numpy>=1.18.0,<2.0.0",
"tensorflow>=2.2.1,<2.3.0",
]
Expand Down

0 comments on commit abf6661

Please sign in to comment.