From 74de7e6b49c10fbd892ad163e62e80b7fd5fe76b Mon Sep 17 00:00:00 2001 From: Mohit Gaur <56885276+Mohit-Gaur@users.noreply.github.com> Date: Mon, 9 Dec 2024 06:55:23 +0000 Subject: [PATCH 1/4] Update python-build-package.yml to use windows runner --- .github/workflows/python-build-package.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/python-build-package.yml b/.github/workflows/python-build-package.yml index 40476a93..01b8b782 100644 --- a/.github/workflows/python-build-package.yml +++ b/.github/workflows/python-build-package.yml @@ -60,6 +60,19 @@ jobs: - if: matrix.platform.runner != 'windows-latest' name: Check that `uv add magika.whl` works run: mkdir /tmp/test-uv && cp -vR dist/*.whl /tmp/test-uv && cd /tmp/test-uv && uv init && uv add ./$(\ls -1 *.whl | head -n 1) + - if: matrix.platform.runner == 'windows-latest' + name: Install uv on Windows + run: powershell -Command "Invoke-WebRequest -Uri https://astral.sh/uv/0.4.7/install.ps1 -OutFile install.ps1; ./install.ps1" + - if: matrix.platform.runner == 'windows-latest' + name: Check that `uv add magika.whl` works on Windows + shell: pwsh + run: | + mkdir C:\test-uv + Copy-Item -Path dist\*.whl -Destination C:\test-uv + cd C:\test-uv + uv init + $wheel = Get-ChildItem -Filter *.whl | Select-Object -ExpandProperty Name + uv add ".\$wheel" - name: Install wheels run: python3 -m pip install $(python -c "import glob; print(glob.glob('dist/*.whl')[0])") - run: magika --version From 379c42a73bb683b3acd8afff6c2a6100e79880fb Mon Sep 17 00:00:00 2001 From: Mohit Gaur <56885276+Mohit-Gaur@users.noreply.github.com> Date: Mon, 9 Dec 2024 08:24:18 +0000 Subject: [PATCH 2/4] Update python-test-published-package.yml to use windows runner --- .github/workflows/python-test-published-package.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/python-test-published-package.yml b/.github/workflows/python-test-published-package.yml index 2e982270..735d8916 100644 --- a/.github/workflows/python-test-published-package.yml +++ b/.github/workflows/python-test-published-package.yml @@ -36,6 +36,19 @@ jobs: - if: matrix.os != 'windows-latest' && matrix.python-version != '3.8' && matrix.python-version != '3.9' name: Check that magika can be installed with uv run: mkdir /tmp/test-uv && cd /tmp/test-uv && uv init && uv add magika && cd - && rm -rf /tmp/test-uv + - if: matrix.platform.runner == 'windows-latest' + name: Install uv on Windows + run: powershell -Command "Invoke-WebRequest -Uri https://astral.sh/uv/0.4.7/install.ps1 -OutFile install.ps1; ./install.ps1" + - if: matrix.platform.runner == 'windows-latest' + name: Check that `uv add magika.whl` works on Windows + shell: pwsh + run: | + mkdir C:\test-uv + Copy-Item -Path dist\*.whl -Destination C:\test-uv + cd C:\test-uv + uv init + $wheel = Get-ChildItem -Filter *.whl | Select-Object -ExpandProperty Name + uv add ".\$wheel" - name: Install magika with pip run: python3 -m pip install magika - run: python3 -c 'import magika; m = magika.Magika(); print(m)' From e13232d302854443f95b4e6b4e0a67e1af333b9b Mon Sep 17 00:00:00 2001 From: Mohit Gaur <56885276+Mohit-Gaur@users.noreply.github.com> Date: Mon, 9 Dec 2024 08:25:08 +0000 Subject: [PATCH 3/4] Update python-test-published-rc-package.yml to use windows runner --- .../workflows/python-test-published-rc-package.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/python-test-published-rc-package.yml b/.github/workflows/python-test-published-rc-package.yml index b5777cb6..fb3831c9 100644 --- a/.github/workflows/python-test-published-rc-package.yml +++ b/.github/workflows/python-test-published-rc-package.yml @@ -35,6 +35,19 @@ jobs: - if: matrix.os != 'windows-latest' name: Check that magika -rc can be installed with uv run: mkdir /tmp/test-uv && cd /tmp/test-uv && uv init && uv add --prerelease allow magika && cd - && rm -rf /tmp/test-uv + - if: matrix.platform.runner == 'windows-latest' + name: Install uv on Windows + run: powershell -Command "Invoke-WebRequest -Uri https://astral.sh/uv/0.4.7/install.ps1 -OutFile install.ps1; ./install.ps1" + - if: matrix.platform.runner == 'windows-latest' + name: Check that `uv add magika.whl` works on Windows + shell: pwsh + run: | + mkdir C:\test-uv + Copy-Item -Path dist\*.whl -Destination C:\test-uv + cd C:\test-uv + uv init + $wheel = Get-ChildItem -Filter *.whl | Select-Object -ExpandProperty Name + uv add ".\$wheel" - name: Install magika with pip run: python3 -m pip install --pre magika - run: python3 -c 'import magika; m = magika.Magika(); print(m); print(magika.__version__)' From 0126c51ffd8964ce1e55979c5584e0a146b1d103 Mon Sep 17 00:00:00 2001 From: Mohit Gaur <56885276+Mohit-Gaur@users.noreply.github.com> Date: Wed, 11 Dec 2024 03:44:18 +0000 Subject: [PATCH 4/4] Remove install uv step for windows --- .github/workflows/python-build-package.yml | 5 +---- .github/workflows/python-test-published-package.yml | 5 +---- .github/workflows/python-test-published-rc-package.yml | 7 ++----- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/python-build-package.yml b/.github/workflows/python-build-package.yml index 01b8b782..36a6e503 100644 --- a/.github/workflows/python-build-package.yml +++ b/.github/workflows/python-build-package.yml @@ -61,10 +61,7 @@ jobs: name: Check that `uv add magika.whl` works run: mkdir /tmp/test-uv && cp -vR dist/*.whl /tmp/test-uv && cd /tmp/test-uv && uv init && uv add ./$(\ls -1 *.whl | head -n 1) - if: matrix.platform.runner == 'windows-latest' - name: Install uv on Windows - run: powershell -Command "Invoke-WebRequest -Uri https://astral.sh/uv/0.4.7/install.ps1 -OutFile install.ps1; ./install.ps1" - - if: matrix.platform.runner == 'windows-latest' - name: Check that `uv add magika.whl` works on Windows + name: Check that magika install with uv works on Windows shell: pwsh run: | mkdir C:\test-uv diff --git a/.github/workflows/python-test-published-package.yml b/.github/workflows/python-test-published-package.yml index 735d8916..33877c12 100644 --- a/.github/workflows/python-test-published-package.yml +++ b/.github/workflows/python-test-published-package.yml @@ -37,10 +37,7 @@ jobs: name: Check that magika can be installed with uv run: mkdir /tmp/test-uv && cd /tmp/test-uv && uv init && uv add magika && cd - && rm -rf /tmp/test-uv - if: matrix.platform.runner == 'windows-latest' - name: Install uv on Windows - run: powershell -Command "Invoke-WebRequest -Uri https://astral.sh/uv/0.4.7/install.ps1 -OutFile install.ps1; ./install.ps1" - - if: matrix.platform.runner == 'windows-latest' - name: Check that `uv add magika.whl` works on Windows + name: Check that magika install with uv works on Windows shell: pwsh run: | mkdir C:\test-uv diff --git a/.github/workflows/python-test-published-rc-package.yml b/.github/workflows/python-test-published-rc-package.yml index fb3831c9..bbff1b31 100644 --- a/.github/workflows/python-test-published-rc-package.yml +++ b/.github/workflows/python-test-published-rc-package.yml @@ -36,10 +36,7 @@ jobs: name: Check that magika -rc can be installed with uv run: mkdir /tmp/test-uv && cd /tmp/test-uv && uv init && uv add --prerelease allow magika && cd - && rm -rf /tmp/test-uv - if: matrix.platform.runner == 'windows-latest' - name: Install uv on Windows - run: powershell -Command "Invoke-WebRequest -Uri https://astral.sh/uv/0.4.7/install.ps1 -OutFile install.ps1; ./install.ps1" - - if: matrix.platform.runner == 'windows-latest' - name: Check that `uv add magika.whl` works on Windows + name: Check that magika -rc install with uv works on Windows shell: pwsh run: | mkdir C:\test-uv @@ -47,7 +44,7 @@ jobs: cd C:\test-uv uv init $wheel = Get-ChildItem -Filter *.whl | Select-Object -ExpandProperty Name - uv add ".\$wheel" + uv add --prerelease ".\$wheel" - name: Install magika with pip run: python3 -m pip install --pre magika - run: python3 -c 'import magika; m = magika.Magika(); print(m); print(magika.__version__)'