Skip to content

Commit

Permalink
Update packages and enable python 3.12 (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
BurnySc2 authored Nov 30, 2023
1 parent 76e4a43 commit 7b4a3d5
Show file tree
Hide file tree
Showing 12 changed files with 1,258 additions and 1,074 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ on:
env:
# Docker image version, see https://hub.docker.com/r/burnysc2/python-sc2-docker/tags
# This version should always lack behind one version behind the docker-ci.yml because it is possible that it doesn't exist
VERSION_NUMBER: '1.0.1'
LATEST_PYTHON_VERSION: '3.10'
VERSION_NUMBER: '1.0.2'
LATEST_PYTHON_VERSION: '3.11'
LATEST_SC2_VERSION: '4.10'

jobs:
Expand Down Expand Up @@ -135,8 +135,9 @@ jobs:
# Python 3.6 fails due to: https://www.python.org/dev/peps/pep-0563/
# If all type annotations were removed, this library should run in py3.6 and perhaps even 3.5
# Python 3.7 support has been dropped due to missing cached_property (new since Python 3.8) https://docs.python.org/3/library/functools.html#functools.cached_property
# Python 3.8 support has been dropped because numpy >=1.26.0 requires Python >=3.9 (this numpy version is required to run python 3.12)
os: [macos-latest, windows-latest, ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -199,7 +200,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.9', '3.10', '3.11']
sc2-version: ['4.10']
env:
IMAGE_NAME: burnysc2/python-sc2:local
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ on:
- develop

env:
VERSION_NUMBER: '1.0.2'
VERSION_NUMBER: '1.0.3'
LATEST_PYTHON_VERSION: '3.11'
LATEST_SC2_VERSION: '4.10'
EXPERIMENTAL_PYTHON_VERSION: '3.11.0b1'
EXPERIMENTAL_PYTHON_VERSION: '3.12'

jobs:
run_test_docker_image:
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']
sc2-version: ['4.10']
env:
IMAGE_NAME: burnysc2/python-sc2-docker:py_${{ matrix.python-version }}-sc2_${{ matrix.sc2-version }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ For a list of ongoing changes and differences to the main repository of Dentosal

By installing this library you agree to be bound by the terms of the [AI and Machine Learning License](http://blzdistsc2-a.akamaihd.net/AI_AND_MACHINE_LEARNING_LICENSE.html).

For this fork, you'll need Python 3.8 or newer.
For this fork, you'll need Python 3.9 or newer.

Install the pypi package:
```
Expand Down
8 changes: 6 additions & 2 deletions dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Set up StarCraft II Test Environment for python-sc2 bots (not pysc2 bots!)
ARG PYTHON_VERSION=3.8
ARG PYTHON_VERSION=3.9

# Use an official debian stretch slim release as a base image
FROM python:$PYTHON_VERSION-slim
Expand All @@ -18,10 +18,14 @@ RUN apt-get update \
&& apt-get upgrade --assume-yes --quiet=2

# Update and install packages for SC2 development environment
# gcc to compile packages
# libc6-dev required by gcc: /usr/local/include/python3.12/Python.h:23:12: fatal error: stdlib.h: No such file or directory
# git, unzip and wget for download and extraction
# rename to rename maps
# tree for debugging
RUN apt-get install --assume-yes --no-install-recommends --no-show-upgraded \
gcc \
libc6-dev \
git \
unzip \
wget \
Expand Down Expand Up @@ -77,7 +81,7 @@ RUN wget --quiet --show-progress --progress=bar:force http://blzdistsc2-a.akamai
&& rm -r Ladder2019Season3

# Get v5.0.6 maps
RUN wget --quiet --show-progress --progress=bar:force https://github.com/shostyn/sc2patch/raw/master/Maps/506.zip \
RUN wget --quiet --show-progress --progress=bar:force https://github.com/shostyn/sc2patch/raw/4987d4915b47c801adbc05e297abaa9ca2988838/Maps/506.zip \
&& unzip -q -o '506.zip' \
&& rm 506.zip

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/test_new_python_candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e

# Set which versions to use
export VERSION_NUMBER=${VERSION_NUMBER:-0.9.9}
export PYTHON_VERSION=${PYTHON_VERSION:-'3.11'}
export PYTHON_VERSION=${PYTHON_VERSION:-3.12}
export SC2_VERSION=${SC2_VERSION:-4.10}

# For better readability, set local variables
Expand Down
6 changes: 3 additions & 3 deletions docs_generate/text_files/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Requirements

Pulling the Docker image
------------------------
The SC2 AI community has decided to stay on Python3.8 for a while. I'll try to update the docker image as soon as a new linux binary is released, or create a pull request at https://github.com/BurnySc2/python-sc2-docker ::
The SC2 AI community has decided to stay on Python3.9 for a while. I'll try to update the docker image as soon as a new linux binary is released, or create a pull request at https://github.com/BurnySc2/python-sc2-docker ::

docker pull burnysc2/python-sc2-docker:release-python_3.8-sc2_4.10_arenaclient_burny
docker pull burnysc2/python-sc2-docker:release-python_3.9-sc2_4.10_arenaclient_burny

Deleting previous containers
-----------------------------
Expand All @@ -26,7 +26,7 @@ Launching a new container
--------------------------
The following command launches a new container in interactive mode, which means it will not shut down once it is done running::

docker run -it -d --name app burnysc2/python-sc2-docker:release-python_3.8-sc2_4.10_arenaclient_burny
docker run -it -d --name app burnysc2/python-sc2-docker:release-python_3.9-sc2_4.10_arenaclient_burny

Install bot requirements
-------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs_generate/text_files/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is an overview to the BurnySc2/python-sc2 library which can be found here:

Requirements
-------------
- Python 3.8 or newer
- Python 3.9 or newer
- StarCraft 2 Client installation in the **default installation path** which should be ``C:\Program Files (x86)\StarCraft II``

Installation
Expand Down
Loading

0 comments on commit 7b4a3d5

Please sign in to comment.