Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit114e2af

Browse files
committed
Use uv
1 parent7a9e3bf commit114e2af

File tree

4 files changed

+263
-19
lines changed

4 files changed

+263
-19
lines changed

‎.github/workflows/main.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,26 +49,21 @@ jobs:
4949
with:
5050
dotnet-version:'6.0.x'
5151

52-
-name:Set up Python ${{ matrix.python }}
53-
uses:actions/setup-python@v2
52+
-name:Install the latest version of uv
53+
uses:astral-sh/setup-uv@v3
5454
with:
55-
python-version:${{ matrix.python }}
56-
architecture:${{ matrix.os.platform }}
55+
enable-cache:true
5756

5857
-name:Install dependencies
5958
run:|
60-
pip install --upgrade -r requirements.txt
61-
pip install numpy # for tests
62-
63-
-name:Build and Install
64-
run:|
65-
pip install -v .
59+
uv venv --python ${{ matrix.python }}
60+
uv sync
6661
6762
-name:Set Python DLL path and PYTHONHOME (non Windows)
6863
if:${{ matrix.os.category != 'windows' }}
6964
run:|
70-
echo PYTHONNET_PYDLL=$(python -m find_libpython) >> $GITHUB_ENV
71-
echo PYTHONHOME=$(python -c 'import sys; print(sys.prefix)') >> $GITHUB_ENV
65+
echo PYTHONNET_PYDLL=$(uv run find_libpython) >> $GITHUB_ENV
66+
echo PYTHONHOME=$(uv runpython -c 'import sys; print(sys.prefix)') >> $GITHUB_ENV
7267
7368
-name:Set Python DLL path and PYTHONHOME (Windows)
7469
if:${{ matrix.os.category == 'windows' }}
@@ -83,24 +78,24 @@ jobs:
8378

8479
-name:Python Tests (Mono)
8580
if:${{ matrix.os.category != 'windows' }}
86-
run:pytest --runtime mono
81+
run:uv runpytest --runtime mono
8782

8883
# TODO: Run these tests on Windows x86
8984
-name:Python Tests (.NET Core)
9085
if:${{ matrix.os.platform == 'x64' }}
91-
run:pytest --runtime coreclr
86+
run:uv runpytest --runtime coreclr
9287

9388
-name:Python Tests (.NET Framework)
9489
if:${{ matrix.os.category == 'windows' }}
95-
run:pytest --runtime netfx
90+
run:uv runpytest --runtime netfx
9691

9792
-name:Python tests run from .NET
9893
run:dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/
9994

10095
-name:Perf tests
10196
if:${{ (matrix.python == '3.8') && (matrix.os.platform == 'x64') }}
10297
run:|
103-
pip install --force --no-deps --target src/perf_tests/baseline/ pythonnet==2.5.2
98+
uvpip install --force --no-deps --target src/perf_tests/baseline/ pythonnet==2.5.2
10499
dotnet test --configuration Release --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/perf_tests/
105100
106101
# TODO: Run mono tests on Windows?

‎pyproject.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ classifiers = [
3434

3535
dynamic = ["version"]
3636

37+
[dependency-groups]
38+
dev = [
39+
"pytest >= 6",
40+
"find_libpython >= 0.3.0",
41+
]
42+
43+
test = [
44+
"numpy",
45+
"psutil"
46+
]
47+
3748
[[project.authors]]
3849
name ="The Contributors of the Python.NET Project"
3950
email ="pythonnet@python.org"

‎tools/geninterop/geninterop.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
#!/usr/bin/env python
2-
# -*- coding: utf-8 -*-
3-
1+
#!/usr/bin/env uv run
2+
# /// script
3+
# dependencies = ["pycparser"]
4+
# ///
45
"""
56
TypeOffset is a C# class that mirrors the in-memory layout of heap
67
allocated Python objects.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp