diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6bffccd3..d75d9139 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: Python CI on: push: - branches: [ master ] + branches: [master] pull_request: jobs: @@ -12,7 +12,9 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - python-version: ['3.8'] + python-version: + - '3.8' + - '3.12' steps: - uses: actions/checkout@v3 diff --git a/edx_repo_tools/conventional_commits/extra-py312.in b/edx_repo_tools/conventional_commits/extra-py312.in new file mode 100644 index 00000000..b9d3f060 --- /dev/null +++ b/edx_repo_tools/conventional_commits/extra-py312.in @@ -0,0 +1,8 @@ +# The conventional_commits code needs some extra packages installed that are +# large and unusual, so we keep them separate here. + +-c ../../requirements/constraints.txt + +dataset +pandas +matplotlib diff --git a/edx_repo_tools/conventional_commits/extra-py312.txt b/edx_repo_tools/conventional_commits/extra-py312.txt new file mode 100644 index 00000000..4b291735 --- /dev/null +++ b/edx_repo_tools/conventional_commits/extra-py312.txt @@ -0,0 +1,59 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# make upgrade +# +alembic==1.13.1 + # via dataset +banal==1.0.6 + # via dataset +contourpy==1.2.0 + # via matplotlib +cycler==0.12.1 + # via matplotlib +dataset==1.6.2 + # via -r edx_repo_tools/conventional_commits/extra-py312.in +fonttools==4.49.0 + # via matplotlib +greenlet==3.0.3 + # via + # -c edx_repo_tools/conventional_commits/../../requirements/constraints.txt + # sqlalchemy +kiwisolver==1.4.5 + # via matplotlib +mako==1.3.2 + # via alembic +markupsafe==2.1.5 + # via mako +matplotlib==3.8.3 + # via -r edx_repo_tools/conventional_commits/extra-py312.in +numpy==1.26.4 + # via + # contourpy + # matplotlib + # pandas +packaging==23.2 + # via matplotlib +pandas==2.2.1 + # via -r edx_repo_tools/conventional_commits/extra-py312.in +pillow==10.2.0 + # via matplotlib +pyparsing==3.1.2 + # via matplotlib +python-dateutil==2.9.0.post0 + # via + # matplotlib + # pandas +pytz==2024.1 + # via pandas +six==1.16.0 + # via python-dateutil +sqlalchemy==1.4.52 + # via + # alembic + # dataset +typing-extensions==4.10.0 + # via alembic +tzdata==2024.1 + # via pandas diff --git a/requirements/development.txt b/requirements/development.txt index f9e14b64..46fdcc12 100644 --- a/requirements/development.txt +++ b/requirements/development.txt @@ -290,7 +290,3 @@ wheel==0.42.0 # via pip-tools zipp==3.17.0 # via importlib-metadata - -# The following packages are considered to be unsafe in a requirements file: -# pip -# setuptools diff --git a/setup.py b/setup.py index cef7f21a..9821e81e 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ import glob import os.path import re +import sys import setuptools from setuptools import setup @@ -47,12 +48,16 @@ def is_requirement(line): VERSION = get_version('edx_repo_tools', '__init__.py') + # Find our extra requirements. A subdirectory of edx_repo_tools can have an # extra.in file. It will be pip-compiled to extra.txt. Here we find them all # and register them as extras. EXTRAS_REQUIRE = {} for fextra in glob.glob("edx_repo_tools/*/extra.txt"): slug = fextra.split("/")[1] + if sys.version_info >= (3, 12) and glob.glob(f'edx_repo_tools/{slug}/extra-py312.txt'): + fextra = f'edx_repo_tools/{slug}/extra-py312.txt' + EXTRAS_REQUIRE[slug] = load_requirements(fextra) # To run tests & linting across the entire repo, we need to install the union