From 1938ba0b5fc77c8a7d5da19de44653783163aa74 Mon Sep 17 00:00:00 2001 From: Jan Domanski Date: Sat, 11 Nov 2023 12:39:58 +0000 Subject: [PATCH 1/5] fix #263: No module named 'pkg_resources' --- ci/conda-envs/test_env.yaml | 1 + setup.py | 1 + 2 files changed, 2 insertions(+) diff --git a/ci/conda-envs/test_env.yaml b/ci/conda-envs/test_env.yaml index 20c28775..3222e3d5 100644 --- a/ci/conda-envs/test_env.yaml +++ b/ci/conda-envs/test_env.yaml @@ -7,3 +7,4 @@ dependencies: - matplotlib - pandas>=0.17 - numkit>=1.0 +- setuptools diff --git a/setup.py b/setup.py index a597758e..900116e7 100644 --- a/setup.py +++ b/setup.py @@ -66,6 +66,7 @@ "matplotlib", "numkit", # numerical helpers "numpy>=1.0", + "setuptools", # contains 'pkg_resources' for versioneer ], tests_require=["pytest", "pandas>=0.17"], zip_safe=True, From e87f38ba309a4d20a05aabf056a605cb6043cc6f Mon Sep 17 00:00:00 2001 From: Jan Domanski Date: Sat, 11 Nov 2023 12:42:15 +0000 Subject: [PATCH 2/5] update CHANGES --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index abb880dd..62594016 100644 --- a/CHANGES +++ b/CHANGES @@ -8,7 +8,7 @@ orbeckst, jandom * removed support for legacy Python (<= 3.7) (#259) * fixed GROMACS TOP reader not reading angle parameters from topology file (#261) - +* fixed Python 3.12: No module named ('pkg_resources' #263) 2023-09-16 0.8.5 orbeckst From 7d3d568c382be1613a10b711b67ca33143efda9b Mon Sep 17 00:00:00 2001 From: Oliver Beckstein Date: Sun, 12 Nov 2023 14:00:43 -0500 Subject: [PATCH 3/5] only require setuptools for py >= 3.12 Co-authored-by: Jinzhe Zeng --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 900116e7..6b0fd803 100644 --- a/setup.py +++ b/setup.py @@ -66,7 +66,7 @@ "matplotlib", "numkit", # numerical helpers "numpy>=1.0", - "setuptools", # contains 'pkg_resources' for versioneer + 'setuptools; python_version >= "3.12"', # contains 'pkg_resources' for versioneer ], tests_require=["pytest", "pandas>=0.17"], zip_safe=True, From e802428ee71b0c978f2e165fe3c9e941d4bdb71a Mon Sep 17 00:00:00 2001 From: Oliver Beckstein Date: Sun, 12 Nov 2023 14:13:41 -0500 Subject: [PATCH 4/5] support Python 3.12 - add py 3.12 to test matrix - add setuptools to all requirement files - updated docs: README and sphinx docs - updated CHANGES --- .github/workflows/ci.yaml | 9 ++++++--- CHANGES | 1 + README.rst | 2 +- ci/readthedocs/requirements.txt | 2 +- doc/sphinx/source/installation.txt | 8 ++++---- setup.py | 1 + 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8190a5a1..a90873fa 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,7 +26,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] gromacs-version: ["2023.1"] # Test other GROMACS versions selectively on a recent Python. # On macOS only test one GROMACS version and two Python versions @@ -50,14 +50,17 @@ jobs: - os: ubuntu-latest python-version: "3.11" gromacs-version: "2022.4" - # explicitly include a few macOS runners + # explicitly include a few macOS runners: MUST use 2018.6: # (conda-forge GROMACS >= 2021 is compiled to use rdtscp CPU instruction but these # are not available in the macOS GitHub runner so we need to use a different GROMACS - # version. Try 2018.5 from bioconda. (2021.5 worked previously but not anymore.) + # version. 2018.5 from bioconda works. (2021.5 worked previously but not anymore.) # Locally 2023.1 was successfully tested on Intel macOS 13.5.) - os: macOS-latest python-version: "3.11" gromacs-version: "2018.6" + - os: macOS-latest + python-version: "3.12" + gromacs-version: "2018.6" env: diff --git a/CHANGES b/CHANGES index 9dd8843f..a84bc37b 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,7 @@ 2023-xx-xx 0.9.0 orbeckst, jandom +* officially support Python 3.12 (PR #271, issue #263) * removed support for legacy Python (<= 3.7) (#259) * fixed GROMACS TOP reader not reading angle parameters from topology file (#261) diff --git a/README.rst b/README.rst index 65181b0d..47f83186 100644 --- a/README.rst +++ b/README.rst @@ -12,7 +12,7 @@ A primitive Python wrapper around the Gromacs_ tools. The library is tested with GROMACS 4.6.5, 2018.x, 2019.x, 2020.x, 2021.x, 2022.x, 2023.x (and 5.x and 2016.x should also work). It supports Python -3.8--3.11 on Linux and macOS. +3.8--3.12 on Linux and macOS. GromacsWrapper also provides a small library (cook book) of often-used recipes and helper functions to set up MD simulations. diff --git a/ci/readthedocs/requirements.txt b/ci/readthedocs/requirements.txt index 939d390c..2b20832a 100644 --- a/ci/readthedocs/requirements.txt +++ b/ci/readthedocs/requirements.txt @@ -2,4 +2,4 @@ numpy>=1.0 matplotlib pandas numkit>=1.0 - +setuptools; python_version >= "3.12" diff --git a/doc/sphinx/source/installation.txt b/doc/sphinx/source/installation.txt index 85b826e8..a3221188 100644 --- a/doc/sphinx/source/installation.txt +++ b/doc/sphinx/source/installation.txt @@ -70,12 +70,12 @@ If your prefer to download manually, get the latest stable release from https://github.com/Becksteinlab/GromacsWrapper/releases and either :: - pip install GromacsWrapper-0.8.3.tar.gz + pip install GromacsWrapper-0.8.5.tar.gz or install from the unpacked source:: - tar -zxvf GromacsWrapper-0.8.3.tar.gz - cd GromacsWrapper-0.8.3 + tar -zxvf GromacsWrapper-0.8.5.tar.gz + cd GromacsWrapper-0.8.5 pip install . @@ -111,7 +111,7 @@ Python_ >= 3.8 and GROMACS_ (4.6.x, 2016, 2018, 2019, 2020, 2021, System requirements ------------------- -Tested with Python 3.8--3.11 on Linux and Mac OS X. Earlier Python +Tested with Python 3.8--3.12 on Linux and Mac OS X. Earlier Python versions were only supported until release 0.8.5. diff --git a/setup.py b/setup.py index 6b0fd803..4a7098af 100644 --- a/setup.py +++ b/setup.py @@ -39,6 +39,7 @@ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering :: Bio-Informatics", "Topic :: Scientific/Engineering :: Chemistry", "Topic :: Software Development :: Libraries :: Python Modules", From 08c049618d9b3e60421151b195f31683aad69fbc Mon Sep 17 00:00:00 2001 From: Oliver Beckstein Date: Sun, 12 Nov 2023 14:15:51 -0500 Subject: [PATCH 5/5] add @njzjz to AUTHORS and CHANGELOG --- AUTHORS | 5 +++++ CHANGES | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index dd9fd338..b9f14057 100644 --- a/AUTHORS +++ b/AUTHORS @@ -63,6 +63,11 @@ year of their first commit. GitHub handle is optional. ---- - Yury Polyachenko (@polyachenkoya) + +2023 +---- + +- Jinzhe Zeng (@njzjz) We gratefully acknowledge code fixes contributed by @quantifiedcode-bot from Quantified Code https://www.quantifiedcode.com diff --git a/CHANGES b/CHANGES index a84bc37b..a533a43e 100644 --- a/CHANGES +++ b/CHANGES @@ -3,7 +3,7 @@ ============================== 2023-xx-xx 0.9.0 -orbeckst, jandom +orbeckst, jandom, njzjz * officially support Python 3.12 (PR #271, issue #263) * removed support for legacy Python (<= 3.7) (#259)