mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-10-29 18:00:15 +00:00
Fix setup.py by not importing __version__
This commit is contained in:
16
setup.py
16
setup.py
@@ -1,17 +1,28 @@
|
|||||||
|
import re
|
||||||
|
import ast
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from spotdl import __version__
|
|
||||||
|
|
||||||
# Created from README.md using pandoc
|
# Created from README.md using pandoc
|
||||||
with open('README.rst', 'r') as f:
|
with open('README.rst', 'r') as f:
|
||||||
long_description = f.read()
|
long_description = f.read()
|
||||||
|
|
||||||
|
|
||||||
|
# This does not work as the dependencies imported are most
|
||||||
|
# likely just about to be installed :/
|
||||||
|
# from spotdl import __version__
|
||||||
|
|
||||||
|
_version_re = re.compile(r'__version__\s+=\s+(.*)')
|
||||||
|
|
||||||
|
with open('spotdl.py', 'r') as f:
|
||||||
|
version = str(ast.literal_eval(_version_re.search(f.read()).group(1)))
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='spotify-downloader',
|
name='spotify-downloader',
|
||||||
py_modules=['spotdl'],
|
py_modules=['spotdl'],
|
||||||
# Tests are included automatically:
|
# Tests are included automatically:
|
||||||
# https://docs.python.org/3.6/distutils/sourcedist.html#specifying-the-files-to-distribute
|
# https://docs.python.org/3.6/distutils/sourcedist.html#specifying-the-files-to-distribute
|
||||||
packages=['core'],
|
packages=['core'],
|
||||||
version=__version__,
|
version=version,
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'pathlib >= 1.0.1',
|
'pathlib >= 1.0.1',
|
||||||
'youtube_dl >= 2017.5.1',
|
'youtube_dl >= 2017.5.1',
|
||||||
@@ -27,6 +38,7 @@ setup(
|
|||||||
description='Download songs from YouTube using Spotify song URLs or playlists with albumart and meta-tags.',
|
description='Download songs from YouTube using Spotify song URLs or playlists with albumart and meta-tags.',
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
author='Ritiek Malhotra and the spotify-downloader contributors',
|
author='Ritiek Malhotra and the spotify-downloader contributors',
|
||||||
|
author_email='ritiekmalhotra123@gmail.com',
|
||||||
license='MIT',
|
license='MIT',
|
||||||
url='https://github.com/ritiek/spotify-downloader',
|
url='https://github.com/ritiek/spotify-downloader',
|
||||||
download_url='https://pypi.org/project/spotify-downloader/',
|
download_url='https://pypi.org/project/spotify-downloader/',
|
||||||
|
|||||||
Reference in New Issue
Block a user