diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ca621ed3..609ee7e4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,16 +30,19 @@ jobs: cache: "pip" cache-dependency-path: "requirements/*.txt" + - name: install + run: | + python -m pip install -U -r requirements/development.txt + python -m pip install -e . + + - name: Simple cli test + run: qgis-plugin-ci --help + - name: Install system requirements run: | sudo apt-get update sudo apt-get install qtbase5-dev qttools5-dev-tools - - name: Install project requirements - run: | - python -m pip install -U -r requirements/base.txt - python -m pip install -U -r requirements/development.txt - - name: Tests env: tx_api_token: ${{ secrets.TRANSIFEX_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index 4f8c2f53..25ae97f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools", "setuptools-scm", "wheel", "setuptools-git-versioning"] +requires = ["setuptools>=61.0", "setuptools-scm", "wheel", "setuptools-git-versioning"] build-backend = "setuptools.build_meta" [project] @@ -31,7 +31,7 @@ classifiers = [ ] [project.scripts] -qgis-plugin-ci = "qgispluginci.cli:main" +qgis-plugin-ci = "qgispluginci.cli:cli" [project.urls] homepage = "https://opengisch.github.io/qgis-plugin-ci/" @@ -39,12 +39,13 @@ documentation = "https://opengisch.github.io/qgis-plugin-ci/" repository = "https://github.com/opengisch/qgis-plugin-ci/" tracker = "https://github.com/opengisch/qgis-plugin-ci/issues" -[tool.setuptools.packages.find] -where = ["qgispluginci"] +[tool.setuptools] +py-modules = ["qgispluginci"] [tool.setuptools-git-versioning] enabled = true + [tool.setuptools.dynamic] readme = {file = ["README.md"], content-type = "text/markdown"} dependencies = {file = ["requirements/base.txt"]} diff --git a/qgispluginci/__main__.py b/qgispluginci/__main__.py new file mode 100644 index 00000000..9801c7b2 --- /dev/null +++ b/qgispluginci/__main__.py @@ -0,0 +1,4 @@ +from qgispluginci.cli import cli + +if __name__ == "__main__": + cli() diff --git a/qgispluginci/cli.py b/qgispluginci/cli.py index 3a8e3e41..6f275c6d 100755 --- a/qgispluginci/cli.py +++ b/qgispluginci/cli.py @@ -14,11 +14,11 @@ from qgispluginci.release import release from qgispluginci.translation import Translation -__version__ = version("qgispluginci") +__version__ = version("qgis-plugin-ci") __title__ = "QGISPluginCI" -def main(): +def cli(): # create the top-level parser parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter @@ -246,7 +246,3 @@ def main(): t.push() return exit_val - - -if __name__ == "__main__": - exit(main())