mirror of
				https://github.com/devine-dl/pywidevine.git
				synced 2025-11-04 03:44:50 +00:00 
			
		
		
		
	Migrate from poetry to uv/hatchling
This commit is contained in:
		
							parent
							
								
									b30171302f
								
							
						
					
					
						commit
						0f2f34c83f
					
				
							
								
								
									
										34
									
								
								.github/workflows/cd.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										34
									
								
								.github/workflows/cd.yml
									
									
									
									
										vendored
									
									
								
							@ -9,33 +9,25 @@ jobs:
 | 
				
			|||||||
  tagged-release:
 | 
					  tagged-release:
 | 
				
			||||||
    name: Tagged Release
 | 
					    name: Tagged Release
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    environment:
 | 
				
			||||||
 | 
					      name: pypi
 | 
				
			||||||
 | 
					    permissions:
 | 
				
			||||||
 | 
					      id-token: write
 | 
				
			||||||
 | 
					      contents: read
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v5
 | 
					    - uses: actions/checkout@v5
 | 
				
			||||||
    - name: Set up Python
 | 
					    - name: Set up Python
 | 
				
			||||||
      uses: actions/setup-python@v6
 | 
					      uses: actions/setup-python@v6
 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        python-version: "3.14"
 | 
					        python-version: "3.14"
 | 
				
			||||||
    - name: Install Poetry
 | 
					    - name: Install uv
 | 
				
			||||||
      uses: abatilo/actions-poetry@v3
 | 
					      uses: astral-sh/setup-uv@v6
 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        poetry-version: 2.1.3
 | 
					        version: "0.9.5"
 | 
				
			||||||
    - name: Install project
 | 
					        enable-cache: true
 | 
				
			||||||
      run: poetry install --only main
 | 
					    - name: Install the project
 | 
				
			||||||
 | 
					      run: uv sync --locked
 | 
				
			||||||
    - name: Build project
 | 
					    - name: Build project
 | 
				
			||||||
      run: poetry build
 | 
					      run: uv build
 | 
				
			||||||
    - name: Upload wheel
 | 
					 | 
				
			||||||
      uses: actions/upload-artifact@v4
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        name: Python Wheel
 | 
					 | 
				
			||||||
        path: "dist/*.whl"
 | 
					 | 
				
			||||||
    - name: Deploy release
 | 
					 | 
				
			||||||
      uses: marvinpinto/action-automatic-releases@latest
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        prerelease: false
 | 
					 | 
				
			||||||
        repo_token: "${{ secrets.GITHUB_TOKEN }}"
 | 
					 | 
				
			||||||
        files: |
 | 
					 | 
				
			||||||
          dist/*.whl
 | 
					 | 
				
			||||||
    - name: Publish to PyPI
 | 
					    - name: Publish to PyPI
 | 
				
			||||||
      env:
 | 
					      run: uv publish
 | 
				
			||||||
        POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
 | 
					 | 
				
			||||||
      run: poetry publish
 | 
					 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										26
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										26
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							@ -15,14 +15,15 @@ jobs:
 | 
				
			|||||||
        uses: actions/setup-python@v6
 | 
					        uses: actions/setup-python@v6
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          python-version: "3.14"
 | 
					          python-version: "3.14"
 | 
				
			||||||
      - name: Install poetry
 | 
					      - name: Install uv
 | 
				
			||||||
        uses: abatilo/actions-poetry@v3
 | 
					        uses: astral-sh/setup-uv@v6
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          poetry-version: 2.1.3
 | 
					          version: "0.9.5"
 | 
				
			||||||
      - name: Install project
 | 
					          enable-cache: true
 | 
				
			||||||
        run: poetry install --all-extras
 | 
					      - name: Install the project
 | 
				
			||||||
 | 
					        run: uv sync --locked --all-extras --dev
 | 
				
			||||||
      - name: Run pre-commit which does various checks
 | 
					      - name: Run pre-commit which does various checks
 | 
				
			||||||
        run: poetry run pre-commit run --all-files --show-diff-on-failure
 | 
					        run: uv run pre-commit run --all-files --show-diff-on-failure
 | 
				
			||||||
  build:
 | 
					  build:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    strategy:
 | 
					    strategy:
 | 
				
			||||||
@ -34,11 +35,12 @@ jobs:
 | 
				
			|||||||
      uses: actions/setup-python@v6
 | 
					      uses: actions/setup-python@v6
 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        python-version: ${{ matrix.python-version }}
 | 
					        python-version: ${{ matrix.python-version }}
 | 
				
			||||||
    - name: Install poetry
 | 
					    - name: Install uv
 | 
				
			||||||
      uses: abatilo/actions-poetry@v3
 | 
					      uses: astral-sh/setup-uv@v6
 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        poetry-version: 2.1.3
 | 
					        version: "0.9.5"
 | 
				
			||||||
    - name: Install project
 | 
					        enable-cache: true
 | 
				
			||||||
      run: poetry install --all-extras --only main
 | 
					    - name: Install the project
 | 
				
			||||||
 | 
					      run: uv sync --locked --all-extras
 | 
				
			||||||
    - name: Build project
 | 
					    - name: Build project
 | 
				
			||||||
      run: poetry build
 | 
					      run: uv build
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										1620
									
								
								poetry.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1620
									
								
								poetry.lock
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -1,16 +1,21 @@
 | 
				
			|||||||
[build-system]
 | 
					[build-system]
 | 
				
			||||||
requires = ["poetry-core>=1.0.0"]
 | 
					requires = ["hatchling"]
 | 
				
			||||||
build-backend = "poetry.core.masonry.api"
 | 
					build-backend = "hatchling.build"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[tool.poetry]
 | 
					[project]
 | 
				
			||||||
name = "pywidevine"
 | 
					name = "pywidevine"
 | 
				
			||||||
version = "1.9.0"
 | 
					version = "1.9.0"
 | 
				
			||||||
description = "Widevine CDM (Content Decryption Module) implementation in Python."
 | 
					description = "Widevine CDM (Content Decryption Module) implementation in Python."
 | 
				
			||||||
license = "GPL-3.0-only"
 | 
					authors = [{ name = "rlaphoenix", email = "rlaphoenix@pm.me" }]
 | 
				
			||||||
authors = ["rlaphoenix <rlaphoenix@pm.me>"]
 | 
					requires-python = ">=3.9"
 | 
				
			||||||
readme = "README.md"
 | 
					readme = "README.md"
 | 
				
			||||||
repository = "https://github.com/devine-dl/pywidevine"
 | 
					license = "GPL-3.0-only"
 | 
				
			||||||
keywords = ["python", "drm", "widevine", "google"]
 | 
					keywords = [
 | 
				
			||||||
 | 
					  "python",
 | 
				
			||||||
 | 
					  "drm",
 | 
				
			||||||
 | 
					  "widevine",
 | 
				
			||||||
 | 
					  "google",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
classifiers = [
 | 
					classifiers = [
 | 
				
			||||||
  "Development Status :: 5 - Production/Stable",
 | 
					  "Development Status :: 5 - Production/Stable",
 | 
				
			||||||
  "Intended Audience :: Developers",
 | 
					  "Intended Audience :: Developers",
 | 
				
			||||||
@ -19,46 +24,51 @@ classifiers = [
 | 
				
			|||||||
  "Operating System :: OS Independent",
 | 
					  "Operating System :: OS Independent",
 | 
				
			||||||
  "Topic :: Multimedia :: Video",
 | 
					  "Topic :: Multimedia :: Video",
 | 
				
			||||||
  "Topic :: Security :: Cryptography",
 | 
					  "Topic :: Security :: Cryptography",
 | 
				
			||||||
  "Topic :: Software Development :: Libraries :: Python Modules"
 | 
					  "Topic :: Software Development :: Libraries :: Python Modules",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
include = [
 | 
					dependencies = [
 | 
				
			||||||
  { path = "CHANGELOG.md", format = "sdist" },
 | 
					  "protobuf~=6.33.0",
 | 
				
			||||||
  { path = "README.md", format = "sdist" },
 | 
					  "pymp4~=1.4.0",
 | 
				
			||||||
  { path = "LICENSE", format = "sdist" },
 | 
					  "pycryptodome~=3.23.0",
 | 
				
			||||||
 | 
					  "click~=8.1.7",
 | 
				
			||||||
 | 
					  "requests~=2.32.5",
 | 
				
			||||||
 | 
					  "Unidecode~=1.3.7",
 | 
				
			||||||
 | 
					  "PyYAML~=6.0.3",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[tool.poetry.urls]
 | 
					[project.optional-dependencies]
 | 
				
			||||||
"Issues" = "https://github.com/devine-dl/pywidevine/issues"
 | 
					serve = ["aiohttp~=3.13.1"]
 | 
				
			||||||
"Discussions" = "https://github.com/devine-dl/pywidevine/discussions"
 | 
					 | 
				
			||||||
"Changelog" = "https://github.com/devine-dl/pywidevine/blob/master/CHANGELOG.md"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
[tool.poetry.dependencies]
 | 
					[project.urls]
 | 
				
			||||||
python = ">=3.9,<4.0"
 | 
					Repository = "https://github.com/devine-dl/pywidevine"
 | 
				
			||||||
protobuf = "^6.33.0"
 | 
					Issues = "https://github.com/devine-dl/pywidevine/issues"
 | 
				
			||||||
pymp4 = "^1.4.0"
 | 
					Discussions = "https://github.com/devine-dl/pywidevine/discussions"
 | 
				
			||||||
pycryptodome = "^3.23.0"
 | 
					Changelog = "https://github.com/devine-dl/pywidevine/blob/master/CHANGELOG.md"
 | 
				
			||||||
click = "^8.1.7"
 | 
					 | 
				
			||||||
requests = "^2.32.5"
 | 
					 | 
				
			||||||
Unidecode = "^1.3.7"
 | 
					 | 
				
			||||||
PyYAML = "^6.0.3"
 | 
					 | 
				
			||||||
aiohttp = {version = "^3.13.1", optional = true}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
[tool.poetry.group.dev.dependencies]
 | 
					[project.scripts]
 | 
				
			||||||
pre-commit = "^4.3.0"
 | 
					 | 
				
			||||||
mypy = "^1.18.2"
 | 
					 | 
				
			||||||
mypy-protobuf = "^3.6.0"
 | 
					 | 
				
			||||||
types-protobuf = "^6.32.1.20250918"
 | 
					 | 
				
			||||||
types-requests = "^2.32.4.20250913"
 | 
					 | 
				
			||||||
types-PyYAML = "^6.0.12.20250915"
 | 
					 | 
				
			||||||
isort = "^6.1.0"
 | 
					 | 
				
			||||||
ruff = "~0.14.2"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
[tool.poetry.extras]
 | 
					 | 
				
			||||||
serve = ["aiohttp"]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
[tool.poetry.scripts]
 | 
					 | 
				
			||||||
pywidevine = "pywidevine.main:main"
 | 
					pywidevine = "pywidevine.main:main"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[dependency-groups]
 | 
				
			||||||
 | 
					dev = [
 | 
				
			||||||
 | 
					  "pre-commit~=4.3.0",
 | 
				
			||||||
 | 
					  "mypy~=1.18.2",
 | 
				
			||||||
 | 
					  "mypy-protobuf~=3.6.0",
 | 
				
			||||||
 | 
					  "types-protobuf~=6.32.1.20250918",
 | 
				
			||||||
 | 
					  "types-requests~=2.32.4.20250913",
 | 
				
			||||||
 | 
					  "types-PyYAML~=6.0.12.20250915",
 | 
				
			||||||
 | 
					  "isort~=6.1.0",
 | 
				
			||||||
 | 
					  "ruff~=0.14.2",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[tool.hatch.build.targets.sdist]
 | 
				
			||||||
 | 
					include = [
 | 
				
			||||||
 | 
					  "pywidevine",
 | 
				
			||||||
 | 
					  "CHANGELOG.md",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[tool.hatch.build.targets.wheel]
 | 
				
			||||||
 | 
					packages = ["pywidevine"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[tool.ruff]
 | 
					[tool.ruff]
 | 
				
			||||||
extend-exclude = [
 | 
					extend-exclude = [
 | 
				
			||||||
  "*_pb2.py",
 | 
					  "*_pb2.py",
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user