mirror of
https://github.com/lllin000/PaperForge.git
synced 2026-07-22 06:50:53 +00:00
refactor: __init__.py as single version source; pyproject.toml reads dynamically; paperforge.json drops version field
This commit is contained in:
parent
3fd479adf9
commit
94fedd30fe
3 changed files with 8 additions and 6 deletions
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
"name": "PaperForge-Lite",
|
||||
"version": "1.4.4",
|
||||
"description": "Lightweight literature management automation for Obsidian + Zotero",
|
||||
"repository": "https://github.com/LLLin000/PaperForge",
|
||||
"update": {
|
||||
|
|
|
|||
|
|
@ -303,10 +303,10 @@ def run_update(vault: Path) -> int:
|
|||
from importlib.metadata import version as _pkg_ver
|
||||
local = _pkg_ver("paperforge")
|
||||
except Exception:
|
||||
local_cfg = vault / "paperforge.json"
|
||||
if local_cfg.exists():
|
||||
local = json.loads(local_cfg.read_text(encoding="utf-8")).get("version", "unknown")
|
||||
else:
|
||||
try:
|
||||
import paperforge
|
||||
local = paperforge.__version__
|
||||
except Exception:
|
||||
local = "unknown"
|
||||
remote = _remote_version()
|
||||
logger.info("%s", "=" * 50)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||
|
||||
[project]
|
||||
name = "paperforge"
|
||||
version = "1.4.4"
|
||||
dynamic = ["version"]
|
||||
description = "PaperForge — Obsidian + Zotero literature pipeline CLI"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
|
|
@ -46,6 +46,9 @@ paperforge = "paperforge.cli:main"
|
|||
where = ["."]
|
||||
include = ["paperforge*"]
|
||||
|
||||
[tool.setuptools.dynamic]
|
||||
version = {attr = "paperforge.__version__"}
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
paperforge = [
|
||||
"py.typed",
|
||||
|
|
|
|||
Loading…
Reference in a new issue