Conversation
|
I appreciate it, but I really really just want to own the binary build process. 99% of chirp users are consuming the binary builds and I really need to prioritize that stuff. It'll need to be updated at some point I know, but it has to be done in lockstep with the binary builds. You can leave this open and I can aim to get the other half of the build process working with it at some point, but no promises on timeline. |
|
@kk7ds I totally understand. This is mainly a feasibility study from my end to see if this modernization can be done while honoring the dependency constraints. I can leave this PR draft open for your reference. Let me know if you need changes or input from me on it when you start working on the topic. Happy to help. |
McNeight
left a comment
There was a problem hiding this comment.
I understand where Dan is coming from, and I understand that you were going for a "light touch" for consolidating these files, but I'd like to understand something.
Why wasn't tox.ini also incorporated into pyproject.toml? It seems to be an important part of unit and driver testing. At a minimum, I would think the tox package would be added to the project.optional-dependencies.test section?
Thanks for doing this.
|
@McNeight Two reasons I left tox.ini alone:
On adding tox to project.optional-dependencies.test: tox is the tool that creates the test environment and installs .[test] into it, so listing it inside that extra would be circular. Like pip itself, it belongs in the developer's outer environment rather than in the project's dependencies. |
|
Yeah the python community has sort of decided for us that everything should be put into pyproject.toml, which is not universally loved (I certainly don't like it). Been a lot of "deciding for us" lately on a lot of topics :( |
* Integrated files from PR kk7ds#1607 * Made platform agnostic changes to chirp/platform.py * Fix circular import introduced in chirp/chirp_common.py # Conflicts: # chirp/kenwood_tone.py
Consolidate the packaging and tool configuration into a single pyproject.toml without changing any dependencies or pins: - setup.py: moved verbatim to [project] (metadata, dependencies, entry points); homepage URL updated to chirpmyradio.com - requirements.txt: wxPython pins moved to the [wx] extra with the same platform markers and sync-with-binary-builds comment; pywin32 moved to the main dependencies (it was missing from setup.py) - test-requirements.txt: moved to a [test] extra; tox envs now use "extras = test" (pyserial/requests dropped from the list as they are already install requirements) - .mypy.ini: moved to [tool.mypy]; mypy reads it automatically so the --config-file argument is gone - setup.cfg: removed; it only held a stale bdist_rpm section still describing rpttool - pylintrc: removed; nothing references it (style checks use flake8/mypy via tox) Verified: tox -e unit passes (481 passed, 12 skipped), tox -e style produces identical results with old and new mypy config, sdist contains the same data files (stock configs, locales, icons), and "pip install -e ." exposes the same three console scripts. The developer wiki instructions change from "pip install -r requirements.txt" to "pip install -e .[wx,test]".
5853a29 to
0aa6ec2
Compare
Hi @kk7ds — sorry if this is inappropriate for a drive-by PR, and feel free to close it if the answer is simply "no" — but I'd like to suggest a cleanup of the top-level packaging files. I've marked it as a draft since I know the binary build infrastructure lives outside this repo and I can't test against it.
This consolidates
setup.py,setup.cfg,requirements.txt,test-requirements.txt,.mypy.iniandpylintrcinto a singlepyproject.toml— without changing any dependency or pin:[wx]extra[test]extra; the tox envs useextras = testinstead of-rtest-requirements.txtpywin32moves into the main dependencies — it was in requirements.txt but missing from setup.py, so this closes a small gapsetup.cfggoes away entirely: it only held abdist_rpmsection still describing rpttool ("A frequency tool for Icom D-STAR Repeaters")pylintrcgoes away: nothing references it (style checks are flake8/mypy via tox)Verified locally:
tox -e unit: 481 passed, 12 skippedtox -e style: byte-identical mypy results with the old.mypy.iniand the new[tool.mypy]sectionpip install -e .exposes the same three console scriptspip install -e .) and snapcraft (python plugin) both work with pyproject-based buildsThe one thing this does change for developers: the wiki's
pip install -r requirements.txtstep becomespip install -e '.[wx,test]'. Happy to adjust anything, split this up, or drop parts of it — and if the timing is bad or you'd rather keep the current layout, no hard feelings.One thing that definitely needs your input: if the build system stamps setup.py's
version=0at build time, that step would need to targetversion = "0"in pyproject.toml instead.