mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
parent
2a2c67090c
commit
bc1f9df8c6
3 changed files with 6 additions and 6 deletions
|
@ -64,7 +64,7 @@ Contents
|
||||||
Dependency
|
Dependency
|
||||||
==========
|
==========
|
||||||
- Python 3.7+
|
- Python 3.7+
|
||||||
- Python library: structlog, toml
|
- Python library: structlog, toml, appdirs
|
||||||
- One of these Python library combinations (ordered by preference):
|
- One of these Python library combinations (ordered by preference):
|
||||||
|
|
||||||
* tornado + pycurl
|
* tornado + pycurl
|
||||||
|
@ -124,7 +124,7 @@ Upgrade from 1.x version
|
||||||
There are several backward-incompatible changes from the previous 1.x version.
|
There are several backward-incompatible changes from the previous 1.x version.
|
||||||
|
|
||||||
1. Version 2.x requires Python 3.7+ to run.
|
1. Version 2.x requires Python 3.7+ to run.
|
||||||
2. The command syntax changes a bit. You need to use a ``-c`` switch to specify your software version configuration file.
|
2. The command syntax changes a bit. You need to use a ``-c`` switch to specify your software version configuration file (or use the default).
|
||||||
3. The configuration file format has been changed from ini to `toml`_. You can use the ``nvchecker-ini2toml`` script in this repo to convert your old configuration files. However, comments and formatting will be lost.
|
3. The configuration file format has been changed from ini to `toml`_. You can use the ``nvchecker-ini2toml`` script in this repo to convert your old configuration files. However, comments and formatting will be lost.
|
||||||
4. Several options have been renamed. ``max_concurrent`` to ``max_concurrency``, and all option names have their ``-`` be replaced with ``_``.
|
4. Several options have been renamed. ``max_concurrent`` to ``max_concurrency``, and all option names have their ``-`` be replaced with ``_``.
|
||||||
5. All software configuration tables need a ``source`` option to specify which source is to be used rather than being figured out from option names in use. This enables additional source plugins to be discovered.
|
5. All software configuration tables need a ``source`` option to specify which source is to be used rather than being figured out from option names in use. This enables additional source plugins to be discovered.
|
||||||
|
|
|
@ -22,6 +22,7 @@ import json
|
||||||
|
|
||||||
import structlog
|
import structlog
|
||||||
import toml
|
import toml
|
||||||
|
import appdirs
|
||||||
|
|
||||||
from .lib import nicelogger
|
from .lib import nicelogger
|
||||||
from . import slogconf
|
from . import slogconf
|
||||||
|
@ -36,8 +37,8 @@ from .ctxvars import tries as ctx_tries
|
||||||
logger = structlog.get_logger(logger_name=__name__)
|
logger = structlog.get_logger(logger_name=__name__)
|
||||||
|
|
||||||
def get_default_config() -> str:
|
def get_default_config() -> str:
|
||||||
confdir = os.environ.get('XDG_CONFIG_DIR', os.path.expanduser('~/.config'))
|
confdir = appdirs.user_config_dir(appname='nvchecker')
|
||||||
file = os.path.join(confdir, 'nvchecker/nvchecker.toml')
|
file = os.path.join(confdir, 'nvchecker.toml')
|
||||||
return file
|
return file
|
||||||
|
|
||||||
def add_common_arguments(parser: argparse.ArgumentParser) -> None:
|
def add_common_arguments(parser: argparse.ArgumentParser) -> None:
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -21,7 +21,7 @@ setup(
|
||||||
zip_safe = True,
|
zip_safe = True,
|
||||||
|
|
||||||
packages = find_namespace_packages(exclude=['tests', 'build*']),
|
packages = find_namespace_packages(exclude=['tests', 'build*']),
|
||||||
install_requires = ['setuptools', 'toml', 'structlog', 'tornado>=6', 'pycurl'],
|
install_requires = ['setuptools', 'toml', 'structlog', 'appdirs', 'tornado>=6', 'pycurl'],
|
||||||
extras_require = {
|
extras_require = {
|
||||||
'vercmp': ['pyalpm'],
|
'vercmp': ['pyalpm'],
|
||||||
},
|
},
|
||||||
|
@ -39,7 +39,6 @@ setup(
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
scripts=['scripts/nvchecker-ini2toml'],
|
scripts=['scripts/nvchecker-ini2toml'],
|
||||||
package_data = {'nvchecker_source': ['vcs.sh']},
|
|
||||||
|
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Development Status :: 5 - Production/Stable",
|
"Development Status :: 5 - Production/Stable",
|
||||||
|
|
Loading…
Add table
Reference in a new issue