mirror of
https://github.com/KevinMidboe/delugeClient.git
synced 2025-10-28 19:40:12 +00:00
Merge pull request #6 from KevinMidboe/fix/setuptools-build
Fix: Setuptools build
This commit is contained in:
17
Makefile
Normal file
17
Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
.PHONY: clean
|
||||
binaries=dist build
|
||||
|
||||
install:
|
||||
python3 setup.py install
|
||||
|
||||
build:
|
||||
python3 setup.py build
|
||||
|
||||
dist:
|
||||
python3 setup.py sdist
|
||||
|
||||
upload: clean dist
|
||||
twine upload dist/*
|
||||
|
||||
clean:
|
||||
rm -rf $(binaries)
|
||||
@@ -1,22 +1,25 @@
|
||||
import os
|
||||
#!/usr/bin/env python3.6
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
from sys import path
|
||||
from os.path import dirname, join
|
||||
|
||||
path.append(os.path.dirname(__file__))
|
||||
|
||||
__version__=0.1
|
||||
path.append(dirname(__file__))
|
||||
|
||||
import logging
|
||||
from delugeUtils import BASE_DIR
|
||||
from utils import BASE_DIR, ColorizeFilter
|
||||
|
||||
logger = logging.getLogger('deluge_cli')
|
||||
logger.setLevel(logging.DEBUG)
|
||||
|
||||
fh = logging.FileHandler(os.path.join(BASE_DIR, 'deluge_cli.log'))
|
||||
fh = logging.FileHandler(join(BASE_DIR, 'deluge_cli.log'))
|
||||
fh.setLevel(logging.DEBUG)
|
||||
ch = logging.StreamHandler()
|
||||
ch.setLevel(logging.ERROR)
|
||||
|
||||
formatter = logging.Formatter('%(asctime)s %(levelname)8s %(name)s | %(message)s')
|
||||
fh.setFormatter(formatter)
|
||||
|
||||
logger.addHandler(fh)
|
||||
logger.addHandler(ch)
|
||||
logger.addHandler(ch)
|
||||
logger.addFilter(ColorizeFilter())
|
||||
@@ -37,7 +37,7 @@ from pprint import pprint
|
||||
|
||||
from deluge import Deluge
|
||||
from utils import ColorizeFilter, BASE_DIR
|
||||
from __init__ import __version__
|
||||
from __version__ import __version__
|
||||
|
||||
logger = logging.getLogger('deluge_cli')
|
||||
logger.setLevel(logging.DEBUG)
|
||||
|
||||
1
delugeClient/__version__.py
Normal file
1
delugeClient/__version__.py
Normal file
@@ -0,0 +1 @@
|
||||
__version__ = '0.2.1'
|
||||
@@ -9,7 +9,7 @@ import logging.config
|
||||
|
||||
from deluge_client import DelugeRPCClient
|
||||
from sshtunnel import SSHTunnelForwarder
|
||||
from delugeUtils import getConfig, BASE_DIR
|
||||
from utils import getConfig, BASE_DIR
|
||||
|
||||
from torrent import Torrent
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ def getConfig():
|
||||
for key, value in requiredParameters:
|
||||
if value == '':
|
||||
logger.error('Missing value for variable: "{}" in config: \
|
||||
"$HOME/.config/delugeClient/config.ini".'.format(key))
|
||||
"{}.'.format(key, user_config_dir))
|
||||
exit(1)
|
||||
|
||||
return config
|
||||
34
setup.py
34
setup.py
@@ -1,25 +1,34 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- encoding: utf-8 -*-
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
import delugeClient
|
||||
from sys import path
|
||||
from os.path import dirname
|
||||
|
||||
with open("README.md", "r", encoding="utf-8") as fh:
|
||||
long_description = fh.read()
|
||||
|
||||
exec(open('delugeClient/__version__.py').read())
|
||||
|
||||
setup(
|
||||
name="delugeClient-kevin",
|
||||
version=delugeClient.__version__,
|
||||
version=__version__,
|
||||
packages=find_packages(),
|
||||
package_data={
|
||||
'delugeClient': ['default_config.ini'],
|
||||
},
|
||||
python_requires=">=3.6",
|
||||
author="KevinMidboe",
|
||||
description="Deluge client with custom functions written in python",
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
url="https://github.com/kevinmidboe/delugeClient",
|
||||
install_requires=[
|
||||
'colored==1.4.2',
|
||||
'deluge-client==1.9.0',
|
||||
'docopt==0.6.2',
|
||||
'requests==2.25.1',
|
||||
'sshtunnel==0.4.0',
|
||||
'websockets==9.1'
|
||||
'colored',
|
||||
'deluge-client',
|
||||
'docopt',
|
||||
'requests',
|
||||
'sshtunnel',
|
||||
'websockets'
|
||||
],
|
||||
classifiers=[
|
||||
'Programming Language :: Python',
|
||||
@@ -30,10 +39,5 @@ setup(
|
||||
'console_scripts': [
|
||||
'delugeclient = delugeClient.__main__:main',
|
||||
],
|
||||
},
|
||||
packages=find_packages(),
|
||||
package_data={
|
||||
'delugeClient': ['default_config.ini'],
|
||||
},
|
||||
python_requires=">=3.6",
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user