From 2d8ebf45974df12539009e562d7c2992534e5d1a Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Wed, 17 May 2023 20:45:22 -0400 Subject: [PATCH 1/5] Convert to PEP-517 Use versioningit for dynamic versioning --- pyproject.toml | 41 +++++++++++++++++++++++++++++++++++++++++ setup.cfg | 5 ----- setup.py | 27 --------------------------- 3 files changed, 41 insertions(+), 32 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..d634ee85b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,41 @@ +[build-system] +requires = ["setuptools", "versioningit"] +build-backend = "setuptools.build_meta" + +[project] +name = "chirp" +dynamic = ["version"] +description = "A cross-platform cross-radio programming tool" +requires-python = ">=3.10,<4" +dependencies = [ + "pyserial", + "requests", + "yattag", + "suds" +] + +[tool.setuptools] +include-package-data = true + +[tool.setuptools.packages.find] +include = ["chirp*"] + +[project.urls] +homepage = "https://chirp.danplanet.com" +repository = "https://github.com/kk7ds/chirp" + +[project.optional-dependencies] +wx = ["wxPython"] + +[project.scripts] +chirp = "chirp.wxui:chirpmain" +chirpc = "chirp.cli.main:main" +experttune = "chirp.cli.experttune:main" + +[tool.versioningit.tag2version] +rmprefix = "release_" + +[tool.versioningit.format] +distance = "{committer_date:%Y%m%d}" +dirty = "{committer_date:%Y%m%d}+d{build_date:%Y%m%d}" +distance-dirty = "{committer_date:%Y%m%d}+d{build_date:%Y%m%d}" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index ba216f19e..000000000 --- a/setup.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[bdist_rpm] -requires = pyserial -packager = Dan Smith -description = A frequency tool for Icom D-STAR Repeaters -vendor = KK7DS diff --git a/setup.py b/setup.py deleted file mode 100644 index 0e00f7b05..000000000 --- a/setup.py +++ /dev/null @@ -1,27 +0,0 @@ -from distutils.core import setup -from setuptools import find_packages - -setup(name='chirp', - description='A cross-platform cross-radio programming tool', - packages=find_packages(include=["chirp*"]), - include_package_data=True, - version=0, - url='https://chirp.danplanet.com', - python_requires=">=3.10,<4", - install_requires=[ - 'pyserial', - 'requests', - 'yattag', - 'suds', - ], - extras_require={ - 'wx': ['wxPython'], - }, - entry_points={ - 'console_scripts': [ - "chirp=chirp.wxui:chirpmain", - "chirpc=chirp.cli.main:main", - "experttune=chirp.cli.experttune:main", - ], - }, - ) From f8f43a01568ee08a583b1d4ca6392c5673692478 Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Fri, 19 May 2023 20:54:33 -0400 Subject: [PATCH 2/5] add PKG-INFO to gitignore Those using git archives and shallow clones should add PKG-INFO corresponding to the date version. Example: Version: 20230520 --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 628778268..6ad494a9a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ **.pyc **.orig **.rej +PKG-INFO dist build/bdist tools/cpep8.venv/ From 155c849558295f8cb97841aba6daadd873c8832e Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Tue, 23 May 2023 22:27:42 -0400 Subject: [PATCH 3/5] add {distance}.{vcs}{revision} to local identifier to further delineate direct-from-git builds --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d634ee85b..71dcd957b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,6 +36,6 @@ experttune = "chirp.cli.experttune:main" rmprefix = "release_" [tool.versioningit.format] -distance = "{committer_date:%Y%m%d}" -dirty = "{committer_date:%Y%m%d}+d{build_date:%Y%m%d}" -distance-dirty = "{committer_date:%Y%m%d}+d{build_date:%Y%m%d}" +distance = "{committer_date:%Y%m%d}+{distance}.{vcs}{revision}" +dirty = "{committer_date:%Y%m%d}+{distance}.{vcs}{revision}.d{build_date:%Y%m%d}" +distance-dirty = "{committer_date:%Y%m%d}+{distance}.{vcs}{revision}.d{build_date:%Y%m%d}" From 5b271eae723b6bfb5cc8041c4ff12986e777fa08 Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Sun, 25 Jun 2023 11:34:59 -0400 Subject: [PATCH 4/5] CI: update actions/checkout on py3-test to v3 --- .github/workflows/py3-test.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/py3-test.yaml b/.github/workflows/py3-test.yaml index d348e1742..adfe5db05 100644 --- a/.github/workflows/py3-test.yaml +++ b/.github/workflows/py3-test.yaml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run tox uses: ./.github/actions/py3-tox with: @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run tox uses: ./.github/actions/py3-tox with: @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run tox uses: ./.github/actions/py3-tox with: @@ -45,7 +45,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install python 3.12 uses: actions/setup-python@v5 id: pyinst @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run tox uses: ./.github/actions/py3-tox with: From 1ee5acb69ab2df424231b160de96effc1c6c747b Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Sun, 25 Jun 2023 11:37:10 -0400 Subject: [PATCH 5/5] CI: unshallow clone py3-test for versioningit --- .github/workflows/py3-test.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/py3-test.yaml b/.github/workflows/py3-test.yaml index adfe5db05..27da00baf 100644 --- a/.github/workflows/py3-test.yaml +++ b/.github/workflows/py3-test.yaml @@ -8,6 +8,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Run tox uses: ./.github/actions/py3-tox with: @@ -19,6 +21,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Run tox uses: ./.github/actions/py3-tox with: @@ -35,6 +39,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Run tox uses: ./.github/actions/py3-tox with: @@ -46,6 +52,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Install python 3.12 uses: actions/setup-python@v5 id: pyinst @@ -65,6 +73,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Run tox uses: ./.github/actions/py3-tox with: