pyside6-native-titlebar 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. pyside6_native_titlebar-1.0.0/.editorconfig +16 -0
  2. pyside6_native_titlebar-1.0.0/.gitattributes +8 -0
  3. pyside6_native_titlebar-1.0.0/.github/actionlint.yaml +3 -0
  4. pyside6_native_titlebar-1.0.0/.github/workflows/ci.yml +68 -0
  5. pyside6_native_titlebar-1.0.0/.github/workflows/package.yml +75 -0
  6. pyside6_native_titlebar-1.0.0/.github/workflows/release.yml +92 -0
  7. pyside6_native_titlebar-1.0.0/.gitignore +50 -0
  8. pyside6_native_titlebar-1.0.0/.pre-commit-config.yaml +27 -0
  9. pyside6_native_titlebar-1.0.0/.pylintrc +418 -0
  10. pyside6_native_titlebar-1.0.0/.python-version +1 -0
  11. pyside6_native_titlebar-1.0.0/LICENSE +21 -0
  12. pyside6_native_titlebar-1.0.0/LICENSES/Apache-2.0.txt +202 -0
  13. pyside6_native_titlebar-1.0.0/PKG-INFO +157 -0
  14. pyside6_native_titlebar-1.0.0/README.md +126 -0
  15. pyside6_native_titlebar-1.0.0/examples/demo.py +87 -0
  16. pyside6_native_titlebar-1.0.0/examples/gallery.py +90 -0
  17. pyside6_native_titlebar-1.0.0/pyproject.toml +145 -0
  18. pyside6_native_titlebar-1.0.0/src/native_titlebar/__init__.py +37 -0
  19. pyside6_native_titlebar-1.0.0/src/native_titlebar/__main__.py +44 -0
  20. pyside6_native_titlebar-1.0.0/src/native_titlebar/_qt.py +41 -0
  21. pyside6_native_titlebar-1.0.0/src/native_titlebar/_version.py +9 -0
  22. pyside6_native_titlebar-1.0.0/src/native_titlebar/diagnostics.py +55 -0
  23. pyside6_native_titlebar-1.0.0/src/native_titlebar/errors.py +27 -0
  24. pyside6_native_titlebar-1.0.0/src/native_titlebar/geometry.py +121 -0
  25. pyside6_native_titlebar-1.0.0/src/native_titlebar/platform/__init__.py +7 -0
  26. pyside6_native_titlebar-1.0.0/src/native_titlebar/platform/_win32.py +124 -0
  27. pyside6_native_titlebar-1.0.0/src/native_titlebar/platform/windows.py +322 -0
  28. pyside6_native_titlebar-1.0.0/src/native_titlebar/py.typed +0 -0
  29. pyside6_native_titlebar-1.0.0/src/native_titlebar/reports.py +123 -0
  30. pyside6_native_titlebar-1.0.0/src/native_titlebar/titlebar.py +320 -0
  31. pyside6_native_titlebar-1.0.0/src/native_titlebar/window.py +386 -0
  32. pyside6_native_titlebar-1.0.0/tests/test_environment.py +112 -0
  33. pyside6_native_titlebar-1.0.0/tests/test_geometry.py +87 -0
  34. pyside6_native_titlebar-1.0.0/tests/test_release_version.py +98 -0
  35. pyside6_native_titlebar-1.0.0/tests/test_windows_integration.py +484 -0
  36. pyside6_native_titlebar-1.0.0/tests/typing/public_api.py +46 -0
  37. pyside6_native_titlebar-1.0.0/tools/__init__.py +7 -0
  38. pyside6_native_titlebar-1.0.0/tools/check_release_version.py +125 -0
  39. pyside6_native_titlebar-1.0.0/tools/package_smoke.py +57 -0
  40. pyside6_native_titlebar-1.0.0/uv.lock +1587 -0
@@ -0,0 +1,16 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+
9
+ [*.py]
10
+ indent_style = space
11
+ indent_size = 4
12
+ max_line_length = 80
13
+
14
+ [*.{yml,yaml,toml}]
15
+ indent_style = space
16
+ indent_size = 2
@@ -0,0 +1,8 @@
1
+ * text=auto eol=lf
2
+ *.bat text eol=crlf
3
+ *.cmd text eol=crlf
4
+ *.png binary
5
+ *.jpg binary
6
+ *.ico binary
7
+ *.whl binary
8
+ *.gz binary
@@ -0,0 +1,3 @@
1
+ self-hosted-runner:
2
+ labels:
3
+ - desktop
@@ -0,0 +1,68 @@
1
+ name: Library checks
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+ workflow_call:
9
+ inputs:
10
+ native_tests:
11
+ description: Run real HWND tests on a configured desktop runner
12
+ type: boolean
13
+ default: false
14
+ workflow_dispatch:
15
+ inputs:
16
+ native_tests:
17
+ description: Run real HWND tests on a configured desktop runner
18
+ required: false
19
+ type: boolean
20
+ default: false
21
+
22
+ permissions:
23
+ contents: read
24
+
25
+ jobs:
26
+ portable-tests:
27
+ runs-on: windows-latest
28
+ strategy:
29
+ fail-fast: false
30
+ matrix:
31
+ python: ['3.11', '3.12', '3.13', '3.14']
32
+ steps:
33
+ - uses: actions/checkout@v6
34
+ - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
35
+ with:
36
+ version: "0.12.18"
37
+ - run: uv sync --locked --python ${{ matrix.python }}
38
+ - run: uv run pytest -q -m "not windows"
39
+
40
+ quality:
41
+ runs-on: windows-latest
42
+ steps:
43
+ - uses: actions/checkout@v6
44
+ - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
45
+ with:
46
+ version: "0.12.18"
47
+ - run: uv sync --locked
48
+ - run: uv run black --check src examples tests tools
49
+ - run: uv run ruff check .
50
+ - run: uv run pylint src/native_titlebar examples tests tools
51
+ - run: uv run mypy
52
+
53
+ native-tests:
54
+ if: github.event_name == 'workflow_dispatch' && inputs.native_tests
55
+ runs-on: [self-hosted, Windows, X64, desktop]
56
+ steps:
57
+ - uses: actions/checkout@v6
58
+ - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
59
+ with:
60
+ version: "0.12.18"
61
+ - run: uv sync --locked
62
+ - run: uv run python -m native_titlebar
63
+ - run: uv run pytest -q -m windows --junitxml=artifacts/native-tests.xml
64
+ - uses: actions/upload-artifact@v7.0.1
65
+ if: always()
66
+ with:
67
+ name: native-test-results
68
+ path: artifacts/native-tests.xml
@@ -0,0 +1,75 @@
1
+ name: Package
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+ workflow_dispatch:
9
+ workflow_call:
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ build:
16
+ name: Build and validate distributions
17
+ runs-on: ubuntu-24.04
18
+ outputs:
19
+ wheel_filename: ${{ steps.distribution.outputs.wheel_filename }}
20
+ steps:
21
+ - name: Check out repository
22
+ uses: actions/checkout@v6
23
+ - name: Set up uv
24
+ uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
25
+ with:
26
+ version: "0.12.18"
27
+ enable-cache: true
28
+ - name: Install release tools
29
+ run: uv sync --locked --only-group dev
30
+ - name: Build wheel and source distribution
31
+ run: uv build --no-sources
32
+ - name: Check package metadata and README
33
+ run: uv run --no-sync twine check --strict dist/*
34
+ - name: Resolve wheel filename
35
+ id: distribution
36
+ shell: bash
37
+ run: |
38
+ shopt -s nullglob
39
+ wheels=(dist/*.whl)
40
+ test "${#wheels[@]}" -eq 1
41
+ echo "wheel_filename=$(basename "${wheels[0]}")" >> "$GITHUB_OUTPUT"
42
+ - name: Upload distributions
43
+ uses: actions/upload-artifact@v7.0.1
44
+ with:
45
+ name: distributions
46
+ path: dist/*
47
+ if-no-files-found: error
48
+ retention-days: 14
49
+
50
+ install:
51
+ name: Install on Windows / Python ${{ matrix.python }}
52
+ needs: build
53
+ runs-on: windows-latest
54
+ strategy:
55
+ fail-fast: false
56
+ matrix:
57
+ python: ['3.11', '3.12', '3.13', '3.14']
58
+ steps:
59
+ - name: Check out repository
60
+ uses: actions/checkout@v6
61
+ - name: Set up uv
62
+ uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
63
+ with:
64
+ version: "0.12.18"
65
+ enable-cache: true
66
+ - name: Download verified distributions
67
+ uses: actions/download-artifact@v8.0.1
68
+ with:
69
+ name: distributions
70
+ path: dist
71
+ - name: Test the installed wheel without the source checkout
72
+ run: >-
73
+ uv run --isolated --no-project --python "${{ matrix.python }}"
74
+ --with "./dist/${{ needs.build.outputs.wheel_filename }}"
75
+ python tools/package_smoke.py
@@ -0,0 +1,92 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags: ['v*']
6
+ workflow_dispatch:
7
+ inputs:
8
+ version:
9
+ description: Package version to publish, with an optional v prefix
10
+ required: true
11
+ type: string
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ concurrency:
17
+ group: pypi-release
18
+ cancel-in-progress: false
19
+
20
+ jobs:
21
+ validate:
22
+ name: Validate release version
23
+ runs-on: ubuntu-24.04
24
+ outputs:
25
+ prerelease: ${{ steps.version.outputs.prerelease }}
26
+ steps:
27
+ - name: Check out repository
28
+ uses: actions/checkout@v6
29
+ - name: Set up uv
30
+ uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
31
+ with:
32
+ version: "0.12.18"
33
+ enable-cache: true
34
+ - name: Install release tools
35
+ run: uv sync --locked --only-group dev
36
+ - name: Match tag or input to the package version
37
+ id: version
38
+ env:
39
+ RELEASE_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.version || github.ref_name }}
40
+ run: uv run --no-sync python tools/check_release_version.py "$RELEASE_VERSION"
41
+
42
+ ci:
43
+ name: Required quality checks
44
+ needs: validate
45
+ uses: ./.github/workflows/ci.yml
46
+
47
+ package:
48
+ name: Required package checks
49
+ needs: validate
50
+ uses: ./.github/workflows/package.yml
51
+
52
+ publish:
53
+ name: Publish to PyPI
54
+ needs: [ci, package]
55
+ runs-on: ubuntu-24.04
56
+ environment:
57
+ name: pypi
58
+ url: https://pypi.org/project/pyside6-native-titlebar/
59
+ permissions:
60
+ contents: read
61
+ id-token: write
62
+ steps:
63
+ - name: Download verified distributions
64
+ uses: actions/download-artifact@v8.0.1
65
+ with:
66
+ name: distributions
67
+ path: dist
68
+ - name: Publish with PyPI Trusted Publishing
69
+ uses: pypa/gh-action-pypi-publish@v1.14.2
70
+ with:
71
+ packages-dir: dist/
72
+
73
+ github-release:
74
+ name: Create GitHub release
75
+ if: github.event_name == 'push'
76
+ needs: [validate, publish]
77
+ runs-on: ubuntu-24.04
78
+ permissions:
79
+ contents: write
80
+ steps:
81
+ - name: Download published distributions
82
+ uses: actions/download-artifact@v8.0.1
83
+ with:
84
+ name: distributions
85
+ path: dist
86
+ - name: Create release and attach distributions
87
+ uses: softprops/action-gh-release@v2
88
+ with:
89
+ files: dist/*
90
+ fail_on_unmatched_files: true
91
+ generate_release_notes: true
92
+ prerelease: ${{ needs.validate.outputs.prerelease == 'true' }}
@@ -0,0 +1,50 @@
1
+ # Python environments and bytecode
2
+ .venv/
3
+ venv/
4
+ env/
5
+ __pypackages__/
6
+ __pycache__/
7
+ *.py[cod]
8
+ *$py.class
9
+
10
+ # Build and packaging outputs
11
+ build/
12
+ dist/
13
+ *.egg-info/
14
+ .eggs/
15
+ *.egg
16
+
17
+ # Test, lint, and type-check caches
18
+ .pytest_cache/
19
+ .ruff_cache/
20
+ .mypy_cache/
21
+ .pyre/
22
+ .pytype/
23
+ .tox/
24
+ .nox/
25
+ .coverage
26
+ .coverage.*
27
+ htmlcov/
28
+ coverage.xml
29
+ junit*.xml
30
+
31
+ # Local diagnostics and research
32
+ /artifacts/
33
+ /.research/
34
+ *.log
35
+
36
+ # Local credentials and settings
37
+ .env
38
+ .env.*
39
+ !.env.example
40
+ *.local
41
+
42
+ # Editors and operating systems
43
+ .idea/
44
+ .vscode/
45
+ *.swp
46
+ *.swo
47
+ *~
48
+ .DS_Store
49
+ Thumbs.db
50
+ Desktop.ini
@@ -0,0 +1,27 @@
1
+ repos:
2
+ - repo: local
3
+ hooks:
4
+ - id: black
5
+ name: Black (80 columns)
6
+ entry: uv run black --check src examples tests tools
7
+ language: system
8
+ pass_filenames: false
9
+ types: [python]
10
+ - id: ruff
11
+ name: Ruff and Google docstrings
12
+ entry: uv run ruff check .
13
+ language: system
14
+ pass_filenames: false
15
+ types: [python]
16
+ - id: pylint
17
+ name: Google Pylint
18
+ entry: uv run pylint src/native_titlebar examples tests tools
19
+ language: system
20
+ pass_filenames: false
21
+ types: [python]
22
+ - id: mypy
23
+ name: Project type checking
24
+ entry: uv run mypy
25
+ language: system
26
+ pass_filenames: false
27
+ types: [python]