Skip to content

Commit

Permalink
Merge pull request #89 from Falldog/support-3.10
Browse files Browse the repository at this point in the history
Support 3.10
  • Loading branch information
Falldog authored Jan 29, 2022
2 parents 4e6f685 + 0ad1f4b commit 47d4d5c
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 12 deletions.
3 changes: 1 addition & 2 deletions bin/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ cd "${REPO_ROOT}"

build() {
ver=$1
ver_wo_dot=`echo "${ver}" | sed -e "s/\.//g"` # "3.6" -> "36"
service="pye${ver_wo_dot}"
service="pye${ver}"

docker-compose -f docker-compose-test.yml build ${service}
}
Expand Down
28 changes: 22 additions & 6 deletions docker-compose-test.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,42 @@
version: '3.3'

services:
pye36:
pye3.6:
build:
context: .
dockerfile: ./docker/Dockerfile
args:
PY_VER: 3.6
PY_VER: "3.6"
image: falldog/pyconcrete-tester:3.6

pye37:
pye3.7:
build:
context: .
dockerfile: ./docker/Dockerfile
args:
PY_VER: 3.7
PY_VER: "3.7"
image: falldog/pyconcrete-tester:3.7

pye38:
pye3.8:
build:
context: .
dockerfile: ./docker/Dockerfile
args:
PY_VER: 3.8
PY_VER: "3.8"
image: falldog/pyconcrete-tester:3.8

pye3.9:
build:
context: .
dockerfile: ./docker/Dockerfile
args:
PY_VER: "3.9"
image: falldog/pyconcrete-tester:3.9

pye3.10:
build:
context: .
dockerfile: ./docker/Dockerfile
args:
PY_VER: "3.10"
image: falldog/pyconcrete-tester:3.10
7 changes: 5 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM ubuntu:18.04
LABEL maintainer=falldog

ARG DEBIAN_FRONTEND=noninteractive
ARG PY_VER=3.6

RUN set -ex \
Expand All @@ -21,7 +22,9 @@ RUN set -ex \
RUN set -ex \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
python${PY_VER} python${PY_VER}-dev \
python${PY_VER} \
python${PY_VER}-dev \
python${PY_VER}-distutils \
\
&& rm -rf /var/lib/apt/lists/* \
\
Expand All @@ -33,6 +36,6 @@ RUN set -ex \

COPY test/requirements.txt /code
RUN set -ex \
&& pip install --no-cache-dir -r /code/requirements.txt
&& python${PY_VER} -m pip install --no-cache-dir -r /code/requirements.txt

WORKDIR /code
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ def get_exe_link_args():
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: Implementation :: CPython',
'License :: OSI Approved :: Apache Software License',
],
Expand Down
1 change: 1 addition & 0 deletions src/pyconcrete_ext/pyconcrete.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#define PY_SSIZE_T_CLEAN
#include <stdio.h>
#include <stdlib.h>
#include <Python.h>
Expand Down
Binary file not shown.
9 changes: 8 additions & 1 deletion test/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# pandas==1.0.1
# ===== for test requests ======
charset_normalizer~=2.0.0; python_version >= "3"
chardet>=3.0.2,<5; python_version < "3"
idna>=2.5,<3; python_version < "3"
idna>=2.5,<4; python_version >= "3"
urllib3>=1.21.1,<1.27
certifi>=2017.4.17
# =====
2 changes: 1 addition & 1 deletion test/test_pye_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
CUR_DIR = abspath(dirname(__file__))
ROOT_DIR = abspath(join(CUR_DIR, '..'))
DATA_DIR = join(CUR_DIR, 'data')
REQUEST_ZIP = join(DATA_DIR, 'requests-2.12.4.zip')
REQUEST_ZIP = join(DATA_DIR, 'requests-2.27.1.zip') # zip structure: first level must contain `requests` folder
REQUEST_MAIN = join(DATA_DIR, 'main_requests.py')
PYADMIN_PATH = join(ROOT_DIR, 'pyconcrete-admin.py')
RUN_COUNT = int(os.environ.get('TEST_PYE_PERFORMANCE_COUNT', '5'))
Expand Down

0 comments on commit 47d4d5c

Please sign in to comment.