Created attachment 199819 [details] Patch to update the port This patch updates devel/py-freebsd to the latest version as well as enables python 3.x support in its builds.
*** Bug 233782 has been marked as a duplicate of this bug. ***
Thank you Maxim. A couple of review items: 1) GH_TAGNAME= v${PORTVERSION} - Use DISTVERSIONPREFIX=v, drop GH_TAGNAME 2) Can you provide detail or explanation (and include in the commit message after approval) of: a) the upstream change. Is it a fork, did you transfer/coordinate with perky to move it to GitHub? b) The patch removals. Were they upstreamed? No longer necessary? 3) Since it appears the upstream is not hosted under your GitHub account, would you like to update MAINTAINER to yourself? Please include that change if so. 4) The package includes tests. Can you add TEST_DEPENDS (if necessary) and a test target to run them. Ideally this should be integrated upstream, using setup.py test (setup.py:tests_require,test_suite, et al) 5) Was Python 3 support supposed to work prior to this, but was broken? Or was Python 3 support recently added upstream and in this version? If the latter, update the issue summary (and commit log message) to say 'Enable Python3.x support' rather than 'Fix Python 3.x support' Longer term (not for this commit), can we look at distributing/publishing this to PyPI (CHEESESHOP). In particular, it would be good to have a 'registered' and canonical name for this package. Right now the portname is 'freebsd', but the actual upstream / distname is 'py-freebsd'. I'd go with just 'freebsd' for PyPI, to match the current PORTNAME. It doesn't ultimate matter what the repo name is.
(In reply to Kubilay Kocak from comment #2) Well the story is that we rely on this module here in our software for a number of years and it's been blocking us from migrating code from Python 2.7 to 3.x which prompted this change. On top of that, we've added some missing functionality in out private fork over that time. Two came together and after poking around I found https://github.com/astralblue/py-freebsd/ that had some initial python3 work, as well as integrated some of the patches into it. So I went on and forked that repo and made python 3.x actually working as well as merged all relevant port changes. Just in case, I've submitted my python 3.x changes to astralblue about a month ago as a pull request but that went unnoticed. I can maintain code on GitHub for now until somebody more motivated surfaces, as for taking over port's MAINTAINERship, I'd probably pass on that. WRT contacting perky to rubberstamp those changes it's probably safe to say he does not mind/care after all those years. But just in case I am including him into the CC. This is probably as far as I am prepared to go now to push this trough, so I'd leave it with you as a maintainer to decide. Also if you have any ideas about improving package (tests, PyPI etc) then a pull request on GitHub would be very welcome!
(In reply to Maxim Sobolev from comment #3) Thanks for the detail Maxim. A couple of review items: - GH_TAGNAME=v${PORTVERSION} - Use DISTVERSIONPREFIX=v instead of this line - Clarify patch removal. Are they now (at your) upstream? - It would still be great to add TEST_DEPENDS and a (do-)test target so that the tests can be run for QA. If you can do that, and confirm the port passes QA (portlint, poudriere: python 2/3, maketest), I am happy to accept the change (@python) so you can assign yourself and commit.
(In reply to Kubilay Kocak from comment #4) Kubilay, I can do small tweaks to the port that's not a problem. However, my ports commit bit have been somewhat unexpectedly taken for "safekeeping" last November, so that QA steps are nearly impossible for me to achieve and I won't be able to commit my changes either. I tried to contact portmgr@ to get it re-instantiated back in December but got no reply whatsoever. So I am not quite sure if I need to ask somebody to help me with that QA.
@Perky Could you arrange a repository transfer to sobomax, or, alternatively, add sobomax to the astralblue/py-freebsd repository as a collaborator and admin
Any news? Notice that this port expired today, but was retained for the time being.
(In reply to Rene Ladan from comment #7) I'll commit it before end of week, thanks Rene
(In reply to Kubilay Kocak from comment #8) Any news? Should I commit the patch instead?
Sorry Rene, will do this today
There are a number of test failures in various conditions: test_getosreldate fails when run inside a poudriere jail: ====================================================================== FAIL: test_getosreldate (test_sysctl.Test_sysctl) ---------------------------------------------------------------------- Traceback (most recent call last): File "/wrkdirs/usr/ports/devel/py-freebsd/work-py27/py-freebsd-0.9.4/tests/test_sysctl.py", line 19, in test_getosreldate getprocoutput('sysctl kern.osreldate').split()[-1]) AssertionError: '1201000' != '1300076' ---------------------------------------------------------------------- test_get_kern_cp_time fails on at least 12/13{amd64} ====================================================================== FAIL: test_get_kern_cp_time (test_sysctl.Test_sysctl) ---------------------------------------------------------------------- Traceback (most recent call last): File "/wrkdirs/usr/ports/devel/py-freebsd/work-py27/py-freebsd-0.9.4/tests/test_sysctl.py", line 33, in test_get_kern_cp_time ctimes = self.do_cp_time_test(get_kern_cp_time, 0) File "/wrkdirs/usr/ports/devel/py-freebsd/work-py27/py-freebsd-0.9.4/tests/test_sysctl.py", line 44, in do_cp_time_test self.check_monot(ctimes, ctimes1) File "/wrkdirs/usr/ports/devel/py-freebsd/work-py27/py-freebsd-0.9.4/tests/test_sysctl.py", line 49, in check_monot self.assertTrue(ct0[i] < ct1[i]) AssertionError: False is not true test_get_cpu_times fails intermittently in multiple test runs: ====================================================================== FAIL: test_get_cpu_times (test_sysctl.Test_sysctl) ---------------------------------------------------------------------- Traceback (most recent call last): File "/wrkdirs/usr/ports/devel/py-freebsd/work-py27/py-freebsd-0.9.4/tests/test_sysctl.py", line 30, in test_get_cpu_times self.do_cp_time_test(get_cpu_times, 0.0) File "/wrkdirs/usr/ports/devel/py-freebsd/work-py27/py-freebsd-0.9.4/tests/test_sysctl.py", line 44, in do_cp_time_test self.check_monot(ctimes, ctimes1) File "/wrkdirs/usr/ports/devel/py-freebsd/work-py27/py-freebsd-0.9.4/tests/test_sysctl.py", line 49, in check_monot self.assertTrue(ct0[i] < ct1[i]) AssertionError: False is not true
A commit references this bug: Author: koobs Date: Mon Feb 17 06:04:00 UTC 2020 New revision: 526342 URL: https://svnweb.freebsd.org/changeset/ports/526342 Log: devel/py-freebsd: Update to 0.9.4 - Switch to GitHub (sobomax fork of perky's upstream) - This update includes Python 3.x support - Add test target (and adjust PYDISTUTILS_BUILD_TARGET to build in-place) - Remove patches (upstreamed) PR: 233781 Submitted by: sobomax (based on) Approved by: portmgr (maintainer timeout) Changes: head/devel/py-freebsd/Makefile head/devel/py-freebsd/distinfo head/devel/py-freebsd/files/
Committed, thanks Maxim