Skip to content

Commit 57dd5b0

Browse files
committed
bump version
1 parent e396348 commit 57dd5b0

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

nts/downloader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import ffmpeg
1515
import music_tag
1616

17-
__version__ = '1.4.0'
17+
__version__ = '1.4.1'
1818

1919
# defaults to darwin
2020
download_dir = '~/Downloads'

setup.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
1+
import re
12
import setuptools
23

4+
5+
def get_version():
6+
# single source of truth: nts/downloader.py's __version__ (also what
7+
# `nts --version` prints). read it without importing, so the build doesn't
8+
# require the runtime dependencies to be installed.
9+
with open("nts/downloader.py", encoding="utf-8") as f:
10+
match = re.search(r'^__version__\s*=\s*[\'"]([^\'"]+)[\'"]', f.read(), re.M)
11+
if not match:
12+
raise RuntimeError("could not find __version__ in nts/downloader.py")
13+
return match.group(1)
14+
15+
316
setuptools.setup(
417
name="nts-everdrone",
5-
version="1.4.0",
18+
version=get_version(),
619
author="Giorgio Tropiano",
720
author_email="giorgiotropiano@gmail.com",
821
description="NTS Radio downloader tool",

0 commit comments

Comments
 (0)