Skip to content

Commit

Permalink
restore support of Python 3.6/3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
yomichi committed Mar 21, 2024
1 parent 7b26ba8 commit d116743
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ on: [push]

jobs:
build:
name: "os: ${{ matrix.os }}, python: ${{ matrix.python-version }}"
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: ['ubuntu-20.04', 'ubuntu-22.04']
python-version: ['3.6', '3.11']
fail-fast: false

steps:
Expand All @@ -17,7 +19,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: ${{ matrix.python-version }}

- name: apt
run: |
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ include_directories(${Boost_INCLUDE_DIRS})

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/third-party/plog)

set(python_version_required 3.8)
set(python_version_required 3.6)

if(NOT PYTHON_EXECUTABLE)
if(BUILD_NEW_GENERATORS OR Testing OR Document)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ DSQSS implements the path-integral Monte Carlo method with the directed loop alg

- C++ Compiler
- CMake >=2.8.12
- Python >=3.8
- Python >=3.6
- numpy
- scipy
- toml
- typing_extensions (if Python < 3.8)

### Simple build

Expand Down
4 changes: 2 additions & 2 deletions doc/en/dsqss/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ Requirements
********************

- (Optional) MPI (essential for PMWA)
- python 3.8+
- python 3.6+

- numpy
- scipy
- toml
- pip (essential for ``make install``)
- typing_extensions (if python 3.6 or 3.7 is used)

Download
********************
Expand Down
3 changes: 2 additions & 1 deletion doc/jp/dsqss/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
DSQSSの使用には以下のプログラム・ライブラリが必要です.

- (Optional) MPI (PMWAを使用する場合には必須)
- python 3.8+
- python 3.6+

- numpy
- scipy
- toml
- typing_extensions (Python 3.6, 3.7 の場合)


ダウンロード
Expand Down
8 changes: 7 additions & 1 deletion tool/dsqss/prob_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from typing import Sequence, Protocol
from typing import Sequence

import sys
if sys.version_info >= (3, 8):
from typing import Protocol
else:
from typing_extensions import Protocol

import numpy as np

Expand Down
3 changes: 2 additions & 1 deletion tool/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ packages = [
]

[tool.poetry.dependencies]
python = "^3.8"
python = "^3.6"
# Users should install dependencies by themselves
# numpy = "^1.17"
# toml = ">= 0.10.0"
# scipy = "^1"
# typing_extension for python<3.8

[tool.poetry.dev-dependencies]

Expand Down

0 comments on commit d116743

Please sign in to comment.