Skip to content

Commit

Permalink
fix: drop support for python 3.6 (#145)
Browse files Browse the repository at this point in the history
* fix: drop support for python 3.6

* workaround setuptools editable install issue
  • Loading branch information
parthea committed Aug 31, 2022
1 parent 9c408be commit f9745b8
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 134 deletions.
78 changes: 0 additions & 78 deletions .appveyor.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/presubmit.yml
Expand Up @@ -14,12 +14,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.6"
python-version: "3.9"
- name: Install nox
run: |
python -m ensurepip
python -m pip install nox
- name: Run mypy
env:
# workaround for https://github.com/pypa/setuptools/issues/3557
SETUPTOOLS_ENABLE_FEATURES: legacy-editable
run: |
nox -s mypy
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -9,7 +9,7 @@ C toolchain.

# Currently Published Wheels

Wheels are currently published for Python 3.6, 3.7, 3.8, 3.9, 3.10, and
Wheels are currently published for Python 3.7, 3.8, 3.9, 3.10, 3.11 and
pypy-3.7 for multiple architectures. For information on building your own,
please view [BUILDING.md](BUILDING.md).

Expand Down
2 changes: 1 addition & 1 deletion mypy.ini
@@ -1,3 +1,3 @@
[mypy]
python_version = 3.6
python_version = 3.9
exclude = tests/unit/resources/
6 changes: 3 additions & 3 deletions noxfile.py
Expand Up @@ -24,7 +24,7 @@

HERE = os.path.dirname(__file__)

@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"])
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"])
def build_libcrc32c(session):
session.env["PY_BIN"] = f"python{session.python}"
session.env["REPO_ROOT"] = HERE
Expand All @@ -39,7 +39,7 @@ def build_libcrc32c(session):
raise Exception("Unsupported")


@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"])
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"])
def check(session):
session.install("pytest")
session.install("--no-index", f"--find-links={HERE}/wheels", "google-crc32c")
Expand All @@ -49,7 +49,7 @@ def check(session):
session.run("python", f"{HERE}/scripts/check_crc32c_extension.py", *session.posargs)


@nox.session(python="3.6")
@nox.session(python="3.9")
def mypy(session):
"""Verify type hints are mypy compatible."""
session.install("-e", ".")
Expand Down
4 changes: 2 additions & 2 deletions scripts/manylinux/build.sh
Expand Up @@ -27,8 +27,8 @@ git submodule update --init --recursive

# Note: PyPA's support for the 'manylinux1' image ends on 2022-01-01.
# See: https://github.com/pypa/manylinux/issues/994
# No 3.10 support for 'manylinux1'.
if [[ "${BUILD_PYTHON}" != "3.10"* ]]; then
# No 3.1* support for 'manylinux1'.
if [[ "${BUILD_PYTHON}" != "3.1"* ]]; then
docker pull quay.io/pypa/manylinux1_x86_64
docker run \
--rm \
Expand Down
5 changes: 1 addition & 4 deletions scripts/manylinux/build_on_centos.sh
Expand Up @@ -45,10 +45,7 @@ if [[ -z ${BUILD_PYTHON} ]]; then
# Collect all target Python versions.
for PYTHON_BIN in /opt/python/*/bin; do
# H/T: https://stackoverflow.com/a/229606/1068170
if [[ "${PYTHON_BIN}" == *"36"* ]]; then
PYTHON_VERSIONS="${PYTHON_VERSIONS} ${PYTHON_BIN}"
continue
elif [[ "${PYTHON_BIN}" == *"37"* ]]; then
if [[ "${PYTHON_BIN}" == *"37"* ]]; then
PYTHON_VERSIONS="${PYTHON_VERSIONS} ${PYTHON_BIN}"
continue
elif [[ "${PYTHON_BIN}" == *"38"* ]]; then
Expand Down
6 changes: 3 additions & 3 deletions scripts/manylinux/check.sh
Expand Up @@ -21,11 +21,11 @@ echo "CHECKING ON LINUX"
VERSION=$(awk "/version \= ([0-9.]+)/" setup.cfg)
PACKAGE_VERSION=${VERSION:10}
WHEEL_FILE="wheels/google_crc32c-${PACKAGE_VERSION}-cp36-cp36m-manylinux1_x86_64.whl"
PYTHON=python3.6
PYTHON=python3.7

# Using pyenv, set 3.6.1 as a local python version.
# Using pyenv, set 3.7.13 as a local python version.
# pyenv versions
pyenv local 3.6.1
pyenv local 3.7.13

# Make sure we can create a virtual environment.
${PYTHON} -m pip install --upgrade setuptools pip wheel
Expand Down
24 changes: 14 additions & 10 deletions scripts/osx/build.sh
Expand Up @@ -24,10 +24,11 @@ SCRIPTS_DIR=$(dirname ${OSX_DIR})
export REPO_ROOT=$(dirname ${SCRIPTS_DIR})

# NOTE: These are the Python.org versions of Python.
PYTHON36="/Library/Frameworks/Python.framework/Versions/3.6/bin"
PYTHON37="/Library/Frameworks/Python.framework/Versions/3.7/bin"
PYTHON38="/Library/Frameworks/Python.framework/Versions/3.8/bin"
PYTHON39="/Library/Frameworks/Python.framework/Versions/3.9/bin"
PYTHON310="/Library/Frameworks/Python.framework/Versions/3.10/bin"
PYTHON311="/Library/Frameworks/Python.framework/Versions/3.11/bin"

# Build and install `libcrc32c`
export PY_BIN="${PY_BIN:-python3}"
Expand All @@ -38,11 +39,6 @@ git submodule update --init --recursive

${OSX_DIR}/build_c_lib.sh

# Build wheel for Python 3.6.
export PY_BIN="python3.6"
export PY_TAG="cp36-cp36m"
${OSX_DIR}/build_python_wheel.sh

# Build wheel for Python 3.7.
export PY_BIN="python3.7"
export PY_TAG="cp37-cp37m"
Expand All @@ -54,12 +50,20 @@ export PY_BIN="python3.8"
export PY_TAG="cp38-cp38"
${OSX_DIR}/build_python_wheel.sh

# TODO: As of 2020-12-11, 3.9 is not available on our CI
# Build wheel for Python 3.9.
#export PY_BIN="python3.9"
#export PY_TAG="cp39-cp39"
#${OSX_DIR}/build_python_wheel.sh
export PY_BIN="python3.9"
export PY_TAG="cp39-cp39"
${OSX_DIR}/build_python_wheel.sh

# Build wheel for Python 3.10.
export PY_BIN="python3.10"
export PY_TAG="cp310-cp310"
${OSX_DIR}/build_python_wheel.sh

# Build wheel for Python 3.11.
export PY_BIN="python3.11"
export PY_TAG="cp311-cp311"
${OSX_DIR}/build_python_wheel.sh

# Clean up.
rm -fr ${CRC32C_INSTALL_PREFIX}
50 changes: 26 additions & 24 deletions scripts/osx/check.sh
Expand Up @@ -28,13 +28,11 @@ export REPO_ROOT=$(dirname ${SCRIPTS_DIR})
ls ${REPO_ROOT}/wheels

# NOTE: These are the Python.org versions of Python.
PYTHON36="/Library/Frameworks/Python.framework/Versions/3.6/bin"
PYTHON37="/Library/Frameworks/Python.framework/Versions/3.7/bin"
PYTHON38="/Library/Frameworks/Python.framework/Versions/3.8/bin"

# PYTHON37="/users/crwilcox/.pyenv/versions/3.7.2/bin"
# PYTHON36="/users/crwilcox/.pyenv/versions/3.6.6/bin"
# PYTHON35="/users/crwilcox/.pyenv/versions/3.5.6/bin"
PYTHON39="/Library/Frameworks/Python.framework/Versions/3.9/bin"
PYTHON310="/Library/Frameworks/Python.framework/Versions/3.10/bin"
PYTHON311="/Library/Frameworks/Python.framework/Versions/3.11/bin"

# Make sure we have an updated `pip`.
curl https://bootstrap.pypa.io/get-pip.py | ${PYTHON37}/python3
Expand All @@ -44,17 +42,6 @@ ${PYTHON37}/python3 -m pip install --upgrade delocate
LISTDEPS_CMD="${PYTHON37}/delocate-listdeps --all --depending"
VIRTUALENV_CMD="${PYTHON37}/python3 -m venv"


${PYTHON36}/python3 -m venv venv36
curl https://bootstrap.pypa.io/get-pip.py | venv36/bin/python3
WHL=${REPO_ROOT}/wheels/google_crc32c-${PACKAGE_VERSION}-cp36-cp36m-macosx_10_9_x86_64.whl
venv36/bin/pip install ${WHL}
venv36/bin/python ${REPO_ROOT}/scripts/check_crc32c_extension.py
venv36/bin/pip install pytest
venv36/bin/py.test ${REPO_ROOT}/tests
${LISTDEPS_CMD} ${WHL}
rm -fr venv36

${PYTHON37}/python3 -m venv venv37
curl https://bootstrap.pypa.io/get-pip.py | venv37/bin/python3
WHL=${REPO_ROOT}/wheels/google_crc32c-${PACKAGE_VERSION}-cp37-cp37m-macosx_10_9_x86_64.whl
Expand All @@ -75,11 +62,26 @@ venv38/bin/python ${REPO_ROOT}/scripts/check_crc32c_extension.py
${LISTDEPS_CMD} ${WHL}
rm -fr venv38

# TODO: As of 2020-12-11, 3.9 is not available on our CI
# ${PYTHON39}/python3 -m venv venv39
# curl https://bootstrap.pypa.io/get-pip.py | venv39/bin/python3
# WHL=${REPO_ROOT}/wheels/google_crc32c-${PACKAGE_VERSION}-cp39-cp39-macosx_10_9_x86_64.whl
# venv37/bin/pip install ${WHL}
# venv37/bin/python ${REPO_ROOT}/scripts/check_crc32c_extension.py
# ${LISTDEPS_CMD} ${WHL}
# rm -fr venv39
${PYTHON39}/python3 -m venv venv39
curl https://bootstrap.pypa.io/get-pip.py | venv39/bin/python3
WHL=${REPO_ROOT}/wheels/google_crc32c-${PACKAGE_VERSION}-cp39-cp39-macosx_10_9_x86_64.whl
venv39/bin/pip install ${WHL}
venv39/bin/python ${REPO_ROOT}/scripts/check_crc32c_extension.py
${LISTDEPS_CMD} ${WHL}
rm -fr venv39

${PYTHON310}/python3 -m venv venv310
curl https://bootstrap.pypa.io/get-pip.py | venv310/bin/python3
WHL=${REPO_ROOT}/wheels/google_crc32c-${PACKAGE_VERSION}-cp310-cp310-macosx_10_9_x86_64.whl
venv310/bin/pip install ${WHL}
venv310/bin/python ${REPO_ROOT}/scripts/check_crc32c_extension.py
${LISTDEPS_CMD} ${WHL}
rm -fr venv310

${PYTHON311}/python3 -m venv venv311
curl https://bootstrap.pypa.io/get-pip.py | venv311/bin/python3
WHL=${REPO_ROOT}/wheels/google_crc32c-${PACKAGE_VERSION}-cp311-cp311-macosx_10_9_x86_64.whl
venv311/bin/pip install ${WHL}
venv311/bin/python ${REPO_ROOT}/scripts/check_crc32c_extension.py
${LISTDEPS_CMD} ${WHL}
rm -fr venv311
5 changes: 0 additions & 5 deletions scripts/windows/test.bat
Expand Up @@ -19,12 +19,7 @@ if "%PYTHON_VERSION%"=="" (
set PYTHON_VERSION=3.9
)

if "%PYTHON_VERSION%"=="3.10-dev" (
set PYTHON_VERSION=3.10
)

@rem update python deps and build wheels (requires CRC32C_INSTALL_PREFIX is set)
@rem FOR %%V IN (3.5-64,3.5-32,3.6-64,3.6-32,3.7-64,3.7-32) DO (
@REM FOR %%V IN (3.9-64,3.9-32) DO (
FOR %%V IN (%PYTHON_VERSION%-32, %PYTHON_VERSION%-64) DO (
py -%%V -m pip install --no-index --find-links=wheels google-crc32c --force-reinstall
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Expand Up @@ -30,7 +30,6 @@ classifiers =
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Expand All @@ -39,7 +38,7 @@ classifiers =

[options]
zip_safe = True
python_requires = >=3.6
python_requires = >=3.7

[options.extras_require]
testing = pytest
Expand Down

0 comments on commit f9745b8

Please sign in to comment.