File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414import ffmpeg
1515import music_tag
1616
17- __version__ = '1.4.0 '
17+ __version__ = '1.4.1 '
1818
1919# defaults to darwin
2020download_dir = '~/Downloads'
Original file line number Diff line number Diff line change 1+ import re
12import 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+
316setuptools .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" ,
You can’t perform that action at this time.
0 commit comments