From b54ebe6bcf4c49bf279f3b488793853bf777238b Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Thu, 27 Aug 2020 01:49:19 +0800 Subject: [PATCH] some setup.py fixes for #135 * use `find_namespace_packages` to find recursively * install the nvchecker-ini2toml script --- README.rst | 2 +- scripts/{ini2toml => nvchecker-ini2toml} | 0 setup.py | 5 +++-- 3 files changed, 4 insertions(+), 3 deletions(-) rename scripts/{ini2toml => nvchecker-ini2toml} (100%) diff --git a/README.rst b/README.rst index e8856d9..b8ca133 100644 --- a/README.rst +++ b/README.rst @@ -124,7 +124,7 @@ There are several backward-incompatible changes from the previous 1.x version. 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. -3. The configuration file format has been changed from ini to `toml`_. You can use the ``scripts/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 ``_``. 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. 6. The version record files have been changed to use JSON format (the old format will be converted on writing). diff --git a/scripts/ini2toml b/scripts/nvchecker-ini2toml similarity index 100% rename from scripts/ini2toml rename to scripts/nvchecker-ini2toml diff --git a/setup.py b/setup.py index d29728b..99dbcee 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -from setuptools import setup +from setuptools import setup, find_namespace_packages import nvchecker # The complex upload command: @@ -20,7 +20,7 @@ setup( platforms = 'any', zip_safe = False, - packages = ['nvchecker', 'nvchecker_source'], + packages = find_namespace_packages(exclude=['tests', 'build*']), install_requires = ['setuptools', 'toml', 'structlog', 'tornado>=6', 'pycurl'], extras_require = { 'vercmp': ['pyalpm'], @@ -38,6 +38,7 @@ setup( 'nvcmp = nvchecker.tools:cmp', ], }, + scripts=['scripts/nvchecker-ini2toml'], package_data = {'nvchecker_source': ['vcs.sh']}, classifiers = [