From 0a75196fd69eb7fa67293e29760fdff5c02ec11c Mon Sep 17 00:00:00 2001 From: Marek Wydmuch Date: Mon, 14 Aug 2023 13:24:21 +0200 Subject: [PATCH 1/2] Drop support for Python 3.7 --- .github/workflows/build.yml | 2 +- scripts/windows_build_cmake.bat | 4 +++- scripts/windows_build_wheels.bat | 2 +- scripts/windows_test_wheels.bat | 10 ++-------- setup.py | 1 - 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6c48c92fc..98784997b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04, ubuntu-22.04, macos-12] - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11'] runs-on: ${{ matrix.os }} diff --git a/scripts/windows_build_cmake.bat b/scripts/windows_build_cmake.bat index ff45fc22e..67990fafc 100755 --- a/scripts/windows_build_cmake.bat +++ b/scripts/windows_build_cmake.bat @@ -1,6 +1,8 @@ @echo off setlocal enabledelayedexpansion +:: This script should only be used for development purposes on Windows. + :: Configuration :: %%% Set this variables to match your environment. :: %%% CMake for Windws can be downloaded from https://cmake.org/download/ @@ -29,7 +31,7 @@ set OPENALDIR=%LIB_DIR%\openal-soft set OPENAL_DLL=%LIB_DIR%\openal-soft\bin\Win64\OpenAL32.dll :: Build wheels for all Python versions -for %%P in (36 37 38 39 310) do ( +for %%P in (38 39 310 311) do ( set PYTHON_VERSION=%%P set PYTHON_VERSION_DOT=!PYTHON_VERSION:~0,1!.!PYTHON_VERSION:~1! echo Building for Python !PYTHON_VERSION_DOT! version using !CMAKE_GENERATOR_NAME! diff --git a/scripts/windows_build_wheels.bat b/scripts/windows_build_wheels.bat index 0cefc9377..3d1dd9e34 100755 --- a/scripts/windows_build_wheels.bat +++ b/scripts/windows_build_wheels.bat @@ -18,7 +18,7 @@ set BOOST_ROOT=%VIZDOOM_WIN_DEPS_ROOT%/boost :: Build wheels for all Python versions -for %%P in (37 38 39 310) do ( +for %%P in (38 39 310 311) do ( rmdir /Q /S "./bin/" rmdir /Q /S "./build/" diff --git a/scripts/windows_test_wheels.bat b/scripts/windows_test_wheels.bat index ff1c2c5be..432799613 100755 --- a/scripts/windows_test_wheels.bat +++ b/scripts/windows_test_wheels.bat @@ -2,10 +2,10 @@ setlocal enabledelayedexpansion :: Set to current ViZDoom version -set VIZDOOM_VERSION=1.2.0 +set VIZDOOM_VERSION=1.2.1 :: Build wheels for all Python versions -for %%P in (37 38 39 310) do ( +for %%P in (38 39 310 311) do ( set PYTHON_VERSION=%%P set PYTHON_VERSION_DOT=!PYTHON_VERSION:~0,1!.!PYTHON_VERSION:~1! echo Testing wheels for Python !PYTHON_VERSION_DOT! ... @@ -24,12 +24,6 @@ for %%P in (37 38 39 310) do ( !PYTHON_EXECUTABLE! -m pip install !WHEEL_FILE![gym] ) - :: This can be removed after end of support for Python 3.7 - set WHEEL_M_FILE=dist\vizdoom-!VIZDOOM_VERSION!-cp!PYTHON_VERSION!-cp!PYTHON_VERSION!m-win_amd64.whl - if exist !WHEEL_M_FILE! ( - !PYTHON_EXECUTABLE! -m pip install !WHEEL_M_FILE![gym] - ) - :: Test wheel from test PyPI index rem !PYTHON_EXECUTABLE! -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ vizdoom diff --git a/setup.py b/setup.py index 0c3bf1413..349b05a9e 100644 --- a/setup.py +++ b/setup.py @@ -224,7 +224,6 @@ def run(self): "License :: OSI Approved :: MIT License", "Programming Language :: C++", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", From 9fb7ef269376a526310ccf33a0ce906a94f4fe53 Mon Sep 17 00:00:00 2001 From: Marek Wydmuch Date: Mon, 14 Aug 2023 13:31:30 +0200 Subject: [PATCH 2/2] Update the docs --- README.md | 10 +++++----- docs/introduction/building.md | 8 ++++---- docs/introduction/pythonQuickstart.md | 10 +++++----- pyproject.toml | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 748c70e00..f1e5a8878 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ or ### Linux Both x86-64 and ARM64 architectures are supported. -ViZDoom requires C++11 compiler, CMake 3.4+, Boost 1.65+ SDL2, OpenAL (optional) and Python 3.7+. Below you will find instructrion how to install these dependencies. +ViZDoom requires C++11 compiler, CMake 3.4+, Boost 1.65+ SDL2, OpenAL (optional) and Python 3.8+. Below you will find instructrion how to install these dependencies. #### apt-based distros (Ubuntu, Debian, Linux Mint, etc.) @@ -81,7 +81,7 @@ To install ViZDoom run (may take few minutes): apt install cmake git libboost-all-dev libsdl2-dev libopenal-dev pip install vizdoom ``` -We recommend using at least Ubuntu 18.04+ or Debian 10+ with Python 3.7+. +We recommend using at least Ubuntu 18.04+ or Debian 10+ with Python 3.8+. #### dnf/yum-based distros (Fedora, RHEL, CentOS, Alma/Rocky Linux, etc.) @@ -90,7 +90,7 @@ To install ViZDoom run (may take few minutes): dnf install cmake git boost-devel SDL2-devel openal-soft-devel pip install vizdoom ``` -We recommend using at least Fedora 35+ or RHEL/CentOS/Alma/Rocky Linux 9+ with Python 3.7+. To install openal-soft-devel on RHEL/CentOS/Alma/Rocky Linux 9, one needs to use `dnf --enablerepo=crb install`. +We recommend using at least Fedora 35+ or RHEL/CentOS/Alma/Rocky Linux 9+ with Python 3.8+. To install openal-soft-devel on RHEL/CentOS/Alma/Rocky Linux 9, one needs to use `dnf --enablerepo=crb install`. #### Conda-based installation To install ViZDoom on a conda environment (no system-wide installations required): @@ -111,12 +111,12 @@ To install ViZDoom on run (may take few minutes): brew install cmake git boost openal-soft sdl2 pip install vizdoom ``` -We recommend using at least macOS High Sierra 10.13+ with Python 3.7+. +We recommend using at least macOS High Sierra 10.13+ with Python 3.8+. On Apple Silicon (M1 and M2), make sure you are using Python for Apple Silicon. ### Windows -To install pre-build release for Windows 10 or 11 64-bit and Python 3.7+ just run (should take few seconds): +To install pre-build release for Windows 10 or 11 64-bit and Python 3.8+ just run (should take few seconds): ``` pip install vizdoom ``` diff --git a/docs/introduction/building.md b/docs/introduction/building.md index a1e595605..0f79b2592 100644 --- a/docs/introduction/building.md +++ b/docs/introduction/building.md @@ -24,7 +24,7 @@ Even if you plan to install ViZDoom via pip, you need to install some dependenci * Make * GCC 6.0+ * Boost libraries 1.65.0+ -* Python 3.7+ for Python binding (optional) +* Python 3.8+ for Python binding (optional) Additionally, [ZDoom dependencies](http://zdoom.org/wiki/Compile_ZDoom_on_Linux) are needed. @@ -69,7 +69,7 @@ python setup.py build && python setup.py install * CMake 3.4+ * Clang 5.0+ * Boost libraries 1.65.0+ -* Python 3.7+ for Python binding (optional) +* Python 3.8+ for Python binding (optional) ## Building Additionally, [ZDoom dependencies](http://zdoom.org/wiki/Compile_ZDoom_on_Mac_OS_X) are needed. @@ -88,7 +88,7 @@ brew install cmake boost openal-soft sdl2 * CMake 3.4+ * Visual Studio 2012+ * Boost 1.65+ -* Python 3.7+ for Python binding (optional) +* Python 3.8+ for Python binding (optional) Additionally, [ZDoom dependencies](http://zdoom.org/wiki/Compile_ZDoom_on_Windows) are needed. Most of them (except Boost) are gathered in this repository: [ViZDoomWinDepBin](https://github.com/mwydmuch/ViZDoomWinDepBin). @@ -99,7 +99,7 @@ You can download Boost from [here](https://www.boost.org/users/download). ViZDoom for Python can be installed via **pip** on Linux, MacOS and Windows, and it is strongly recommended. However you will still need to install **[Linux](#linux_deps)/[MacOS](#macos_deps) dependencies**, as it will be build locally from source. -For Windows 10 or 11 64-bit and Python 3.7+ we provide pre-build wheels (binary packages). +For Windows 10 or 11 64-bit and Python 3.8+ we provide pre-build wheels (binary packages). To install the most stable official release from [PyPI](https://pypi.python.org/pypi): diff --git a/docs/introduction/pythonQuickstart.md b/docs/introduction/pythonQuickstart.md index dca7fa1d1..bed565bf3 100644 --- a/docs/introduction/pythonQuickstart.md +++ b/docs/introduction/pythonQuickstart.md @@ -2,7 +2,7 @@ ## Linux Both x86-64 and ARM64 architectures are supported. -ViZDoom requires C++11 compiler, CMake 3.4+, Boost 1.65+ SDL2, OpenAL (optional) and Python 3.7+. Below you will find instructrion how to install these dependencies. +ViZDoom requires C++11 compiler, CMake 3.4+, Boost 1.65+ SDL2, OpenAL (optional) and Python 3.8+. Below you will find instructrion how to install these dependencies. ### apt-based distros (Ubuntu, Debian, Linux Mint, etc.) @@ -11,7 +11,7 @@ To install ViZDoom run (may take few minutes): apt install cmake git libboost-all-dev libsdl2-dev libopenal-dev pip install vizdoom ``` -We recommend using at least Ubuntu 18.04+ or Debian 10+ with Python 3.7+. +We recommend using at least Ubuntu 18.04+ or Debian 10+ with Python 3.8+. ### dnf/yum-based distros (Fedora, RHEL, CentOS, Alma/Rocky Linux, etc.) @@ -20,7 +20,7 @@ To install ViZDoom run (may take few minutes): dnf install cmake git boost-devel SDL2-devel openal-soft-devel pip install vizdoom ``` -We recommend using at least Fedora 35+ or RHEL/CentOS/Alma/Rocky Linux 9+ with Python 3.7+. To install openal-soft-devel on RHEL/CentOS/Alma/Rocky Linux 9, one needs to use `dnf --enablerepo=crb install`. +We recommend using at least Fedora 35+ or RHEL/CentOS/Alma/Rocky Linux 9+ with Python 3.8+. To install openal-soft-devel on RHEL/CentOS/Alma/Rocky Linux 9, one needs to use `dnf --enablerepo=crb install`. ### Conda-based installation To install ViZDoom on a conda environment (no system-wide installations required): @@ -41,12 +41,12 @@ To install ViZDoom on run (may take few minutes): brew install cmake git boost openal-soft sdl2 pip install vizdoom ``` -We recommend using at least macOS High Sierra 10.13+ with Python 3.7+. +We recommend using at least macOS High Sierra 10.13+ with Python 3.8+. On Apple Silicon (M1 and M2), make sure you are using Python for Apple Silicon. ## Windows -To install pre-build release for Windows 10 or 11 64-bit and Python 3.7+ just run (should take few seconds): +To install pre-build release for Windows 10 or 11 64-bit and Python 3.8+ just run (should take few seconds): ``` pip install vizdoom ``` diff --git a/pyproject.toml b/pyproject.toml index 01f726d29..c926ee83a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ exclude = ["**/__pycache__"] strict = [] typeCheckingMode = "basic" -pythonVersion = "3.7" +pythonVersion = "3.8" pythonPlatform = "All" typeshedPath = "typeshed" enableTypeIgnoreComments = true