-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
78 lines (72 loc) · 2.67 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import subprocess
import os,sys
import setuptools
import versioneer
import configparser
def increment_version(current_version):
version = current_version.split('.')
version[-1] = str(int(version[-1]) + 1)
return '.'.join(version)
def get_version():
try:
current_directory = os.path.dirname(os.path.abspath(__file__))
with open(os.path.join(current_directory,'VERSION.txt'), 'r') as f:
version = f.read().strip()
except FileNotFoundError:
version = '0.0.0'
return version
def store_version(last_version):
current_directory = os.path.dirname(os.path.abspath(__file__))
with open(os.path.join(f"{current_directory}/respot",'VERSION.txt'), 'w') as f:
f.write(last_version)
if __name__ == '__main__':
cfg = configparser.ConfigParser()
cfg.read('setup.cfg')
current_directory = os.path.dirname(os.path.abspath(__file__))
try:
with open(os.path.join(current_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
except Exception:
long_description = ''
"""
cur_version = get_version()
new_version = increment_version(cur_version)
store_version(new_version)
"""
store_version(cfg['bumpversion']['current_version'])
setuptools.setup(
name='respotgui',
version=cfg['bumpversion']['current_version'],
# version=open('VERSION','r').read().strip(),
# version=versioneer.get_version(),
# cmdclass=versioneer.get_cmdclass(),
author="digfish",
author_email="digfish@digfish.org",
description=(
"A frontend for the respot-java Spotify client"
),
long_description=long_description,
long_description_content_type='text/markdown',
license="Apache License 2.0",
url="https://github.com/digfish/respotgui",
packages=setuptools.find_packages(),
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Environment :: Win32 (MS Windows)",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: Microsoft :: Windows",
],
entry_points={
'console_scripts': [
'respotgui=respot.gui:main'
],
# 'gui_scripts': [
# 'respotgui=respot:main'
# ]
},
include_package_data=True,
package_data={'respot':['img/no-music.png','VERSION.txt']},
# install_requires=['PySimpleGUI', 'websocket-client', 'requests', 'Pillow','python-dotenv','pycaw']
install_requires=open("requirements.txt").read().splitlines()
)