Skip to content

Commit

Permalink
Merge pull request #112 from Wybxc/pyproject
Browse files Browse the repository at this point in the history
feat: switch from setup.py to pyproject.toml
  • Loading branch information
Byaidu authored Nov 22, 2024
2 parents a03f049 + ef5a713 commit 9539af9
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 46 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/python-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build Python Package

on:
push:
branches:
- main
pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[project]
name = "pdf2zh"
version = "1.7.9"
description = "Latex PDF Translator"
authors = [{ name = "Byaidu", email = "[email protected]" }]
license = "AGPL-3.0"
readme = "README.md"
requires-python = ">=3.8,<=3.12"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
dependencies = [
"charset-normalizer",
"cryptography",
"requests",
"pymupdf",
"tqdm",
"tenacity",
"doclayout-yolo",
"numpy",
"ollama",
"deepl<1.19.1",
"openai",
"azure-ai-translation-text<=1.0.1",
"gradio",
"huggingface_hub",
"torch",
]

[project.urls]
Homepage = "https://github.com/Byaidu/PDFMathTranslate"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project.scripts]
pdf2zh = "pdf2zh.pdf2zh:main"
15 changes: 0 additions & 15 deletions requirements.txt

This file was deleted.

31 changes: 0 additions & 31 deletions setup.py

This file was deleted.

0 comments on commit 9539af9

Please sign in to comment.