From 1b50ec2d8b76a95334c9bc02f85d2e6d9a7c95e5 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Tue, 9 Apr 2024 10:10:13 +0200 Subject: [PATCH] Fixed upload to TestPyPi --- .github/workflows/plugin.yml | 1 + setup.py | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/plugin.yml b/.github/workflows/plugin.yml index 4353031..b6d58a8 100644 --- a/.github/workflows/plugin.yml +++ b/.github/workflows/plugin.yml @@ -141,6 +141,7 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.xml release: diff --git a/setup.py b/setup.py index f7bfcf7..6f0dbba 100644 --- a/setup.py +++ b/setup.py @@ -40,6 +40,14 @@ def get_requirements(requirements_file): return requirements, dependencies +def local_scheme(version): + """ + Skip the local version (eg. +xyz of 0.6.1.dev4+gdf99fe2) + to be able to upload to Test PyPI + """ + return "" + + if __name__ == "__main__": HERE = path.abspath(path.dirname(__file__)) INSTALL_REQUIRES, DEPENDENCY_LINKS = ( @@ -64,9 +72,10 @@ def get_requirements(requirements_file): "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Communications :: Email", "Topic :: Internet :: WWW/HTTP", ], @@ -76,6 +85,6 @@ def get_requirements(requirements_file): zip_safe=False, install_requires=INSTALL_REQUIRES, dependency_links=DEPENDENCY_LINKS, - use_scm_version=True, + use_scm_version={"local_scheme": local_scheme}, setup_requires=["setuptools_scm"], )