mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 06:34:25 -04:00
get VERSION from package.json instead of VERSION to avoid duplication
This commit is contained in:
parent
8e07fe3f2e
commit
8b427c9d79
8 changed files with 31 additions and 28 deletions
6
setup.py
6
setup.py
|
@ -1,4 +1,6 @@
|
|||
import json
|
||||
import setuptools
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
PKG_NAME = "archivebox"
|
||||
|
@ -6,13 +8,13 @@ REPO_URL = "https://github.com/pirate/ArchiveBox"
|
|||
BASE_DIR = Path(__file__).parent.resolve()
|
||||
SOURCE_DIR = BASE_DIR / PKG_NAME
|
||||
README = (BASE_DIR / "README.md").read_text()
|
||||
VERSION = (SOURCE_DIR / "VERSION").read_text().strip()
|
||||
VERSION = json.loads((BASE_DIR / "package.json").read_text().strip())['version']
|
||||
|
||||
# To see when setup.py gets called (uncomment for debugging)
|
||||
# import sys
|
||||
# print(SOURCE_DIR, f" (v{VERSION})")
|
||||
# print('>', sys.executable, *sys.argv)
|
||||
# raise SystemExit(0)
|
||||
|
||||
|
||||
setuptools.setup(
|
||||
name=PKG_NAME,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue