Skip to content

Commit 93575fb

Browse files
authored
Merge pull request #126 from aboutcode-org/upgrade-pip
Upgrade pip to 24.2 and support for python 3.12
2 parents db09f99 + 5283ef7 commit 93575fb

File tree

634 files changed

+87280
-70457
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

634 files changed

+87280
-70457
lines changed

.github/workflows/docs-ci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7-
runs-on: ubuntu-20.04
7+
runs-on: ubuntu-22.04
88

99
strategy:
1010
max-parallel: 4
@@ -20,9 +20,6 @@ jobs:
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222

23-
- name: Give permission to run scripts
24-
run: chmod +x ./docs/scripts/doc8_style_check.sh
25-
2623
- name: Install Dependencies
2724
run: pip install -e .[docs]
2825

.github/workflows/pypi-release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ on:
2121
jobs:
2222
build-pypi-distribs:
2323
name: Build and publish library to PyPI
24-
runs-on: ubuntu-20.04
24+
runs-on: ubuntu-22.04
2525

2626
steps:
27-
- uses: actions/checkout@v3
27+
- uses: actions/checkout@v4
2828
- name: Set up Python
2929
uses: actions/setup-python@v4
3030
with:
@@ -47,7 +47,7 @@ jobs:
4747
name: Create GH release
4848
needs:
4949
- build-pypi-distribs
50-
runs-on: ubuntu-20.04
50+
runs-on: ubuntu-22.04
5151

5252
steps:
5353
- name: Download built archives
@@ -67,7 +67,7 @@ jobs:
6767
name: Create PyPI release
6868
needs:
6969
- create-gh-release
70-
runs-on: ubuntu-20.04
70+
runs-on: ubuntu-22.04
7171

7272
steps:
7373
- name: Download built archives

Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# ScanCode is a trademark of nexB Inc.
55
# SPDX-License-Identifier: Apache-2.0
66
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
7-
# See https://github.com/nexB/skeleton for support or download.
7+
# See https://github.com/aboutcode-org/skeleton for support or download.
88
# See https://aboutcode.org for more information about nexB OSS projects.
99
#
1010

@@ -19,11 +19,11 @@ dev:
1919

2020
isort:
2121
@echo "-> Apply isort changes to ensure proper imports ordering"
22-
${VENV}/bin/isort --sl -l 100 src tests setup.py
22+
${VENV}/bin/isort --sl -l 100 --skip=src/fetchcode/vcs/pip setup.py src tests
2323

2424
black:
2525
@echo "-> Apply black code formatter"
26-
${VENV}/bin/black -l 100 src tests setup.py
26+
${VENV}/bin/black -l 100 --exclude=src/fetchcode/vcs/pip src tests setup.py
2727

2828
doc8:
2929
@echo "-> Run doc8 validation"
@@ -33,15 +33,17 @@ valid: isort black
3333

3434
check:
3535
@echo "-> Run pycodestyle (PEP8) validation"
36-
@${ACTIVATE} pycodestyle --max-line-length=100 --exclude=.eggs,venv,lib,thirdparty,docs,migrations,settings.py,.cache .
36+
@${ACTIVATE} pycodestyle --max-line-length=100 --exclude=.eggs,venv,lib,thirdparty,docs,migrations,settings.py,.cache,etc,src/fetchcode/vcs/pip,tests/data/ .
3737
@echo "-> Run isort imports ordering validation"
38-
@${ACTIVATE} isort --sl --check-only -l 100 setup.py src tests .
38+
@${ACTIVATE} isort --sl --check-only -l 100 --skip=src/fetchcode/vcs/pip setup.py src tests
3939
@echo "-> Run black validation"
40-
@${ACTIVATE} black --check --check -l 100 src tests setup.py
40+
@${ACTIVATE} black --check --check -l 100 --exclude=src/fetchcode/vcs/pip src tests setup.py
4141

4242
clean:
4343
@echo "-> Clean the Python env"
4444
./configure --clean
45+
rm -rf .venv/ .*cache/ *.egg-info/ build/ dist/
46+
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
4547

4648
test:
4749
@echo "-> Run the test suite"

azure-pipelines.yml

Lines changed: 50 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,58 @@
55
################################################################################
66

77
jobs:
8-
- template: etc/ci/azure-posix.yml
9-
parameters:
10-
job_name: ubuntu20_cpython
11-
image_name: ubuntu-20.04
12-
python_versions: ["3.7", "3.8", "3.9", "3.10", "3.11"]
13-
test_suites:
14-
all: venv/bin/pytest -n 2 -vvs
8+
- template: etc/ci/azure-posix.yml
9+
parameters:
10+
job_name: ubuntu20_cpython
11+
image_name: ubuntu-20.04
12+
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
13+
test_suites:
14+
all: venv/bin/pytest -n 2 -vvs
1515

16-
- template: etc/ci/azure-posix.yml
17-
parameters:
18-
job_name: ubuntu22_cpython
19-
image_name: ubuntu-22.04
20-
python_versions: ["3.7", "3.8", "3.9", "3.10", "3.11"]
21-
test_suites:
22-
all: venv/bin/pytest -n 2 -vvs
16+
- template: etc/ci/azure-posix.yml
17+
parameters:
18+
job_name: ubuntu22_cpython
19+
image_name: ubuntu-22.04
20+
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
21+
test_suites:
22+
all: venv/bin/pytest -n 2 -vvs
2323

24-
- template: etc/ci/azure-posix.yml
25-
parameters:
26-
job_name: macos12_cpython
27-
image_name: macOS-12
28-
python_versions: ["3.7", "3.8", "3.9", "3.10", "3.11"]
29-
test_suites:
30-
all: venv/bin/pytest -n 2 -vvs
24+
- template: etc/ci/azure-posix.yml
25+
parameters:
26+
job_name: macos12_cpython
27+
image_name: macOS-12
28+
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
29+
test_suites:
30+
all: venv/bin/pytest -n 2 -vvs
3131

32-
- template: etc/ci/azure-posix.yml
33-
parameters:
34-
job_name: macos13_cpython
35-
image_name: macOS-13
36-
python_versions: ["3.7", "3.8", "3.9", "3.10", "3.11"]
37-
test_suites:
38-
all: venv/bin/pytest -n 2 -vvs
32+
- template: etc/ci/azure-posix.yml
33+
parameters:
34+
job_name: macos13_cpython
35+
image_name: macOS-13
36+
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
37+
test_suites:
38+
all: venv/bin/pytest -n 2 -vvs
3939

40-
- template: etc/ci/azure-win.yml
41-
parameters:
42-
job_name: win2019_cpython
43-
image_name: windows-2019
44-
python_versions: ["3.7", "3.8", "3.9", "3.10", "3.11"]
45-
test_suites:
46-
all: venv\Scripts\pytest -n 2 -vvs
40+
- template: etc/ci/azure-posix.yml
41+
parameters:
42+
job_name: macos14_cpython_arm64
43+
image_name: macOS-14
44+
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
45+
test_suites:
46+
all: venv/bin/pytest -n 2 -vvs
4747

48-
- template: etc/ci/azure-win.yml
49-
parameters:
50-
job_name: win2022_cpython
51-
image_name: windows-2022
52-
python_versions: ["3.7", "3.8", "3.9", "3.10", "3.11"]
53-
test_suites:
54-
all: venv\Scripts\pytest -n 2 -vvs
48+
- template: etc/ci/azure-win.yml
49+
parameters:
50+
job_name: win2019_cpython
51+
image_name: windows-2019
52+
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
53+
test_suites:
54+
all: venv\Scripts\pytest -n 2 -vvs
55+
56+
- template: etc/ci/azure-win.yml
57+
parameters:
58+
job_name: win2022_cpython
59+
image_name: windows-2022
60+
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
61+
test_suites:
62+
all: venv\Scripts\pytest -n 2 -vvs

docs/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# from the environment for the first two.
66
SPHINXOPTS ?=
77
SPHINXBUILD ?= sphinx-build
8+
SPHINXAUTOBUILD = sphinx-autobuild
89
SOURCEDIR = source
910
BUILDDIR = build
1011

@@ -14,6 +15,13 @@ help:
1415

1516
.PHONY: help Makefile
1617

18+
# Run the development server using sphinx-autobuild
19+
docs:
20+
@echo
21+
@echo "Starting up the docs server..."
22+
@echo
23+
$(SPHINXAUTOBUILD) --port 8000 --watch ${SOURCEDIR} $(SOURCEDIR) "$(BUILDDIR)/html" $(SPHINXOPTS) $(O)
24+
1725
# Catch-all target: route all unknown targets to Sphinx using the new
1826
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1927
%: Makefile

docs/make.bat

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@ REM Command file for Sphinx documentation
77
if "%SPHINXBUILD%" == "" (
88
set SPHINXBUILD=sphinx-build
99
)
10+
if "%SPHINXAUTOBUILD%" == "" (
11+
set SPHINXAUTOBUILD=sphinx-autobuild
12+
)
1013
set SOURCEDIR=source
1114
set BUILDDIR=build
1215

1316
if "%1" == "" goto help
1417

18+
if "%1" == "docs" goto docs
19+
1520
%SPHINXBUILD% >NUL 2>NUL
1621
if errorlevel 9009 (
1722
echo.
@@ -28,6 +33,13 @@ if errorlevel 9009 (
2833
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
2934
goto end
3035

36+
:docs
37+
@echo
38+
@echo Starting up the docs server...
39+
@echo
40+
%SPHINXAUTOBUILD% --port 8000 --watch %SOURCEDIR% %SOURCEDIR% %BUILDDIR%\html %SPHINXOPTS% %O%
41+
goto end
42+
3143
:help
3244
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
3345

docs/scripts/doc8_style_check.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)