From f7ee293348385071ca2afa02d1acdc5b6a9ea59e Mon Sep 17 00:00:00 2001 From: Serhii Babak Date: Fri, 18 Oct 2024 16:12:36 +0300 Subject: [PATCH 1/7] SCALRCORE-32679 fix typo --- .github/workflows/default.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 10a6c49..6430ee5 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -62,7 +62,7 @@ jobs: - [ubuntu-latest, manylinux, "x86_64 aarch64"] - [macos-13, macosx, x86_64] - [macos-14, macosx, arm64] - python: ["cp38", "cp39", "cp310", "cp311", "cp312", "cp313] + python: ["cp38", "cp39", "cp310", "cp311", "cp312", "cp313"] steps: - name: Checkout From 82b350a5317202077918dfbf05cbaf381b8f6bf3 Mon Sep 17 00:00:00 2001 From: Serhii Babak Date: Fri, 18 Oct 2024 15:53:00 +0300 Subject: [PATCH 2/7] SCALRCORE-32679 add python 3.13 --- .github/workflows/default.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 142fef2..7129feb 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -62,7 +62,7 @@ jobs: - [ubuntu-latest, manylinux, "x86_64 aarch64"] - [macos-13, macosx, x86_64] - [macos-14, macosx, arm64] - python: ["cp38", "cp39", "cp310", "cp311", "cp312"] + python: ["cp38", "cp39", "cp310", "cp311", "cp312", "cp313] steps: - name: Checkout From 1e9adc234c86f301aee2cdf3c06b8085eb65184b Mon Sep 17 00:00:00 2001 From: Serhii Babak Date: Fri, 18 Oct 2024 15:54:12 +0300 Subject: [PATCH 3/7] SCALRCORE-32679 add python 3.13 --- .github/workflows/default.yml | 2 +- README.md | 8 +++++++- build-macos.sh | 2 +- setup.py | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 7129feb..a032c9a 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v3 diff --git a/README.md b/README.md index 19be3ee..f3cc0a9 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,21 @@ [![pygohcl python package](https://github.com/Scalr/pygohcl/actions/workflows/default.yml/badge.svg)](https://github.com/Scalr/pygohcl/actions/workflows/default.yml) # pygohcl + Python wrapper for [hashicorp/hcl](https://github.com/hashicorp/hcl) (v2). ## Requirements -The following versions are supported - 3.8, 3.9, 3.10, 3.11, 3.12. + +The following versions are supported - 3.8, 3.9, 3.10, 3.11, 3.12, 3.13. ## Setup + ```sh pip install pygohcl ``` ## Usage + ```py >>> import pygohcl >>> pygohcl.loads("""variable "docker_ports" { @@ -32,7 +36,9 @@ pip install pygohcl ``` ## Building locally + You can use the following commands to build a wheel for your platform: + ```sh pip install wheel python setup.py bdist_wheel diff --git a/build-macos.sh b/build-macos.sh index 5c443e0..d1e08fc 100755 --- a/build-macos.sh +++ b/build-macos.sh @@ -19,7 +19,7 @@ set -e mkdir -p ./macos-dist rm -fr ./macos-dist/*.whl -for VERSION in 3.8.10 3.9.16 3.10.10 3.11.3 3.12.0 +for VERSION in 3.8.10 3.9.16 3.10.10 3.11.3 3.12.0, 3.13.0 do # Assumes that all python version are pre-installed. # pyenv install -v ${VERSION} diff --git a/setup.py b/setup.py index 08d480c..17d83b5 100644 --- a/setup.py +++ b/setup.py @@ -25,6 +25,7 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ], packages=find_packages(), From 7f3134c1c25c3173b2c4c63a480b3059a920db56 Mon Sep 17 00:00:00 2001 From: Serhii Babak Date: Fri, 18 Oct 2024 15:57:16 +0300 Subject: [PATCH 4/7] SCALRCORE-32679 update cibuildwheel to latest --- .github/workflows/default.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index a032c9a..10a6c49 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -78,7 +78,7 @@ jobs: - name: Build wheels on linux if: ${{ matrix.buildplat[1] == 'manylinux' }} - uses: pypa/cibuildwheel@v2.19.2 + uses: pypa/cibuildwheel@v2.21.3 env: CIBW_ENVIRONMENT: PATH=$(pwd)/go/bin:$PATH CIBW_BEFORE_BUILD: sh pre-build-command.sh @@ -88,7 +88,7 @@ jobs: - name: Build wheels on macos if: ${{ matrix.buildplat[1] == 'macosx' }} - uses: pypa/cibuildwheel@v2.16.2 + uses: pypa/cibuildwheel@v2.21.3 env: CIBW_ENVIRONMENT: PATH=$(pwd)/go/bin:$PATH CIBW_BEFORE_BUILD: sh pre-build-command.sh From e29c5e02b8c2120fcbe39fe70b99833ef172cc22 Mon Sep 17 00:00:00 2001 From: Serhii Babak Date: Fri, 18 Oct 2024 16:14:41 +0300 Subject: [PATCH 5/7] SCALRCORE-32679 fix typo --- .github/workflows/default.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 10a6c49..6430ee5 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -62,7 +62,7 @@ jobs: - [ubuntu-latest, manylinux, "x86_64 aarch64"] - [macos-13, macosx, x86_64] - [macos-14, macosx, arm64] - python: ["cp38", "cp39", "cp310", "cp311", "cp312", "cp313] + python: ["cp38", "cp39", "cp310", "cp311", "cp312", "cp313"] steps: - name: Checkout From 0f1cd96662f69317e4719750f6bcbb21bed6c1fb Mon Sep 17 00:00:00 2001 From: Serhii Babak Date: Fri, 18 Oct 2024 16:19:13 +0300 Subject: [PATCH 6/7] SCALRCORE-32679 bump cffi --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index a334212..709776c 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,6 +1,6 @@ attrs==23.2.0 auditwheel==5.4.0 -cffi==1.16.0 +cffi==1.17.1 importlib-metadata==7.0.1 more-itertools==10.2.0 packaging==23.2 From c88e7cdf42486e8de9794545468bac8128b0d436 Mon Sep 17 00:00:00 2001 From: Serhii Babak Date: Fri, 18 Oct 2024 16:20:29 +0300 Subject: [PATCH 7/7] SCALRCORE-32679 bump cffi --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 17d83b5..f9bab01 100644 --- a/setup.py +++ b/setup.py @@ -29,8 +29,8 @@ "License :: OSI Approved :: MIT License", ], packages=find_packages(), - install_requires=["cffi>=1.0.0"], - setup_requires=["cffi>=1.0.0", "setuptools-golang", "setuptools_scm"], + install_requires=["cffi>=1.17.0"], + setup_requires=["cffi>=1.17.0", "setuptools-golang", "setuptools_scm"], build_golang={"root": "github.com/Scalr/pygohcl"}, ext_modules=[Extension("pygohcl", ["pygohcl.go"])], cffi_modules=["pygohcl/build_cffi.py:ffi",],