Skip to content

Commit

Permalink
Move version to a permanent init
Browse files Browse the repository at this point in the history
  • Loading branch information
Evolution0 committed Jul 3, 2024
1 parent 523eafc commit 64bb6bd
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 11 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,4 @@ bandcamp_dl/asyncdownloader.py
.flake8
.local.vimrc

bandcamp_dl/__init__\.py
venv/
2 changes: 2 additions & 0 deletions bandcamp_dl/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import importlib.metadata
__version__ = importlib.metadata.version("bandcamp-downloader")
4 changes: 1 addition & 3 deletions bandcamp_dl/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@
import os
import sys

from bandcamp_dl import __version__
from bandcamp_dl.bandcamp import Bandcamp
from bandcamp_dl.bandcampdownloader import BandcampDownloader
from bandcamp_dl import config

import importlib.metadata
__version__ = importlib.metadata.version("bandcamp-downloader")


def main():
parser = argparse.ArgumentParser()
Expand Down
4 changes: 1 addition & 3 deletions bandcamp_dl/bandcamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
import bs4
import requests

import importlib.metadata
__version__ = importlib.metadata.version("bandcamp-downloader")

from bandcamp_dl import __version__
from bandcamp_dl.bandcampjson import BandcampJSON


Expand Down
3 changes: 1 addition & 2 deletions bandcamp_dl/bandcampdownloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
import requests
import slugify

import importlib.metadata
__version__ = importlib.metadata.version("bandcamp-downloader")
from bandcamp_dl import __version__


def print_clean(msg):
Expand Down
3 changes: 1 addition & 2 deletions bandcamp_dl/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import logging
import os

import importlib.metadata
__version__ = importlib.metadata.version("bandcamp-downloader")
from bandcamp_dl import __version__

TEMPLATE = '%{artist}/%{album}/%{track} - %{title}'
OK_CHARS = '-_~'
Expand Down

0 comments on commit 64bb6bd

Please sign in to comment.