Update devel/py-proxmoxer to 2.2.0 https://github.com/proxmoxer/proxmoxer/releases/tag/2.2.0
Created attachment 255888 [details] Updates devel/py-proxmoxer to 2.2.0
portlint OK, builds in poudriere on 14.2-RELEASE amd64
Created attachment 255893 [details] pep517 + pytest (failing, missing deps) Hello, Before I commit, we could update port to pep517 build as distutils will be deprecated soon. I added pytest so we can have a testunit ready but `make test` fails with some non ported dependencies. Could you test build/run tests? Give a try on `make test, you can add missing deps to TEST_DEPENDENDS=... Sugestion, if tests are not possible to run at this point, we could commit it with pep517 build at least. Cheers
(In reply to Nuno Teixeira from comment #3) I'll do that
(In reply to Einar Bjarni Halldórsson from comment #4) Nice. A small correction: - TEST_DEPENDENDS=... + TEST_DEPENDS=... Cheers
(In reply to Nuno Teixeira from comment #3) There (In reply to Nuno Teixeira from comment #3) I added the missing dependencies, but the tests are still failing to run. Looks like there are files missing from the pypi archive. I've openened an issue with upstream https://github.com/proxmoxer/proxmoxer/issues/195
(In reply to Einar Bjarni Halldórsson from comment #6) I had forgotten, we already did engage upstream about tests missing from pypi archives: https://github.com/proxmoxer/proxmoxer/issues/126 Not sure if their position has changed since then.
(In reply to Einar Bjarni Halldórsson from comment #7) Hello Einar, I'm following new PR and we can wait for upstream reaction. Until then we can commit port with pep517+pytest(including TEST_DEPENDS) with: + TESTING_UNSAFE= <link to upstream PR> until it is fixed. You thoughts?
(In reply to Nuno Teixeira from comment #8) Let me test the pep517 build tomorrow, and you can commit it with TESTING_UNSAFE.
Ok, you should commit now with pep517+pytest
I have a patch that adds the missing dependency (security/py-openssh-wrapper) and the other needed dependencies for pytest. Should I add it here or in a seperate PR?
(In reply to Einar Bjarni Halldórsson from comment #11) Please add it in a separate PR and add me in CC. You could put that new PR blocking this one (or I can do that later). Thanks
(In reply to Nuno Teixeira from comment #12) (...) And upload patch with pep517+pytest+test_depends+testing_unsafe to this PR. Cheers
Created attachment 255914 [details] Update py-proxmoxer, using pep517 + pytest
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=b59c92b2de849111811caf8539532cf261f4ced4 commit b59c92b2de849111811caf8539532cf261f4ced4 Author: Einar Bjarni Halldórsson <einar@isnic.is> AuthorDate: 2024-12-17 13:40:48 +0000 Commit: Nuno Teixeira <eduardo@FreeBSD.org> CommitDate: 2024-12-17 13:47:55 +0000 devel/py-proxmoxer: Update to 2.2.0 - Switch to pep517 build - Add tests - Add TESTING_UNSAFE ChangeLog: https://github.com/proxmoxer/proxmoxer/releases/tag/2.2.0 PR: 283360 devel/py-proxmoxer/Makefile | 12 ++++++++++-- devel/py-proxmoxer/distinfo | 6 +++--- 2 files changed, 13 insertions(+), 5 deletions(-)
Committed, thanks
I can confirm that unittest completes fine with just a deprecation warning on wrapper. - Used tests directory from github tarball (released version) replacing pypi one. - Add missing TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}requests-toolbelt>0:www/py-requests-toolbelt@${PY_FLAVOR} What we can do here? Fetching missing files from github seems counter-productive since we want tarball from pypi. My opinion is too create a tests directory tarball copied from github tarball and upload it to FreeBSD/distfiles since every committer can do that. After it we can instruct port to fetch extra distfile for FreeBSD and add missing files to tests or maybe better to replace completely pypi tests dir. A clean way is to instruct port to not extract 'tests' at extract target and then a clean copy will be extracted from the extra distfile. A crazy plan :) Cheers
(In reply to Nuno Teixeira from comment #17) (...) I think the best method is to include multiple distfiles: https://docs.freebsd.org/en/books/porters-handbook/book/#porting-master-sites-n Thoughts?
(In reply to Nuno Teixeira from comment #18) Looking at https://github.com/proxmoxer/proxmoxer/commits/develop/tests I have a feeling it could become a painpoint to sync the freebsd hosted tests/ directory with upstream. If you think it's worth it, then I agree :)
(In reply to Einar Bjarni Halldórsson from comment #19) Well there is a dirty but fast way to do it: patch. The problem is that it is not recomended to add new files via patch...
(In reply to Nuno Teixeira from comment #20) ... But since we are not adding binary files... a patch could pass without notice :)
Created attachment 256030 [details] Sync tests with GH released version - Sync tests with GH released version - Use BINARY_ALIAS to replace python3 with PYTHON_CMD - Add missing test dependency
Reopening for testunit fixes
Hello, This was the more elegant way that I found to sync tests with GH. I believe that a good cleanup could be made directly on 'extra-patch-tests' since some diffs don't apply to tests funcionality. Just give a try and say your opinion. Cheers
Created attachment 256062 [details] Sync tests with GH released version, cleaned Remove an extra file and reduce patch from 57k to 40k
Looks like a good solution to a bad situtation, since upstream won't add the files to the archive. I approve
(In reply to Einar Bjarni Halldórsson from comment #26) Agreed. Lets see what happens in next release and then you can decide if port stay fetching from PYPI with no pytest or fetch from GH. This kind of patch isn't the best and correct way to do this fixes as it belongs on upstream side. I saw similar patches adding missing stuff for cmake builds because upstream forgot to include it in released tarball. I will include upstream PR in a small comment after the extra patch in Makefile. Thanks
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=20d2e961ee73f108e45838473147bcccea0c5a7b commit 20d2e961ee73f108e45838473147bcccea0c5a7b Author: Nuno Teixeira <eduardo@FreeBSD.org> AuthorDate: 2024-12-24 08:47:09 +0000 Commit: Nuno Teixeira <eduardo@FreeBSD.org> CommitDate: 2024-12-24 08:47:09 +0000 devel/py-proxmoxer: Fix tests Sync PYPI tests with GH released version until fixed upstream See also: https://github.com/proxmoxer/proxmoxer/issues/195 PR: 283360 devel/py-proxmoxer/Makefile | 6 +- devel/py-proxmoxer/files/extra-patch-tests (new) | 1117 ++++++++++++++++++++++ 2 files changed, 1122 insertions(+), 1 deletion(-)
Committed, thank you!