Skip to content

Commit

Permalink
Switch from pip to poetry, update to yt-dlp's working commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rand-net committed Feb 8, 2024
1 parent 5670fdf commit acc8f3b
Show file tree
Hide file tree
Showing 7 changed files with 772 additions and 83 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish to PyPI

on:
push:
tags:
- "v*"

jobs:
build-and-publish:
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.8

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Configure Poetry
run: |
poetry config virtualenvs.create false
- name: Build and publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
run: |
poetry build
poetry publish
2 changes: 1 addition & 1 deletion khan_dl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import sys
from art import tprint

__version__ = "1.2.8"
__version__ = "1.2.9"


def set_log_level(args):
Expand Down
693 changes: 693 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[tool.poetry]
name = "khan-dl"
version = "1.2.9"
description = "Download courses from khanacademy.org"
authors = ["rand-net"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/rand-net/khan-dl"
repository = "https://github.com/rand-net/khan-dl"
keywords = ["khan academy", "khan academy downloader", "video downloader"]
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
]

[tool.poetry.scripts]
khan-dl = "khan_dl.__init__:main"

[tool.poetry.dependencies]
python = "^3.10"
yt-dlp = { git = "https://github.com/yt-dlp/yt-dlp", rev="90386eaeb58225123d98d4edd03e1823f05f07d5"}
#yt-dlp = "^2023.12.30"
art = "^6.1"
beautifulsoup4 = "^4.12.3"
prompt-toolkit = "^3.0.43"
requests = "^2.31.0"
lxml = "^5.1.0"

[tool.poetry.dev-dependencies]

[tool.semantic_release]
version_variable = [
"khan_dl/__init__.py:__version__",
"pyproject.toml:version"
]
branch = "main"
upload_to_pypi = true
upload_to_release = true
build_command = "pip install poetry && poetry build"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
36 changes: 0 additions & 36 deletions requirements-dev.txt

This file was deleted.

12 changes: 0 additions & 12 deletions requirements.txt

This file was deleted.

34 changes: 0 additions & 34 deletions setup.py

This file was deleted.

0 comments on commit acc8f3b

Please sign in to comment.