Bug 261270 - devel/py-atpublic: Fix build by going back to 2.3
Summary: devel/py-atpublic: Fix build by going back to 2.3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jose Alonso Cardenas Marquez
URL: https://people.freebsd.org/~yasu/poud...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-17 13:44 UTC by Yasuhiro Kimura
Modified: 2022-01-20 17:44 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (acm)


Attachments
Patch file (1.40 KB, patch)
2022-01-18 02:10 UTC, Yasuhiro Kimura
no flags Details | Diff
Updated patch file (1.54 KB, patch)
2022-01-18 09:54 UTC, Yasuhiro Kimura
no flags Details | Diff
Updated patch file (1.58 KB, patch)
2022-01-19 05:53 UTC, Yasuhiro Kimura
yasu: maintainer-approval? (acm)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhiro Kimura freebsd_committer freebsd_triage 2022-01-17 13:44:35 UTC
Build fails at configure phase as following.

----------------------------------------------------------------------
=======================<phase: configure      >============================
===>   py38-atpublic-3.0 depends on package: py38-setuptools>0 - found
===>   py38-atpublic-3.0 depends on file: /usr/local/bin/python3.8 - found
===>  Configuring for py38-atpublic-3.0
Traceback (most recent call last):
  File "<string>", line 1, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'setup.py'
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/py-atpublic
----------------------------------------------------------------------

Full build log: https://people.freebsd.org/~yasu/poudriere/data/logs/bulk/130amd64-default/2022-01-17_20h26m44s/logs/py38-atpublic-3.0.log

Conditions are:

Host: 13.0-RELEASE-p6 amd64
Poudriere: 3.3.7
Jail: 13.0-RELEASE-p6 amd64
Ports Tree: ports ca43d5d0b0ed of main
Comment 1 Yasuhiro Kimura freebsd_committer freebsd_triage 2022-01-18 01:24:08 UTC
According to the commit logs of upstream repository, the project switched from traditional setup.py to pyproject.toml before the release of 3.0.

----------------------------------------------------------------------
commit f02a9afd3ae9980f98e35fa401481216156b1ac9
Author:     Barry Warsaw <barry@python.org>
AuthorDate: Tue Jan 11 02:01:38 2022 +0000
Commit:     Barry Warsaw <barry@python.org>
CommitDate: Tue Jan 11 02:01:38 2022 +0000

    Convert to pyproject.toml and use PDM as the package manager
----------------------------------------------------------------------

Our python framework doesn't support the latter. So we need to either

(1) Go back to 2.3, which is the last version that uses setup.py.
(2) Change this port so it uses PDM (devel/py-pdm) to build and install.
Comment 2 Yasuhiro Kimura freebsd_committer freebsd_triage 2022-01-18 02:10:58 UTC
Created attachment 231100 [details]
Patch file

Fix build by going back to 2.3.

With 3.0 upstream switched from setup.py to pyproject.toml. Unfortunately our python framework doesn't support the latter. So fix build by going back to 2.3 that is the last version to use setup.py.
Comment 3 Yasuhiro Kimura freebsd_committer freebsd_triage 2022-01-18 09:54:40 UTC
Created attachment 231115 [details]
Updated patch file

Don't bump PORTEPOCH.

After the update to 3.0, build of this port always fails and nobody succeeds to install and upgrade. So PORTEPOCH need not to be bumped in this case.
Comment 4 Yasuhiro Kimura freebsd_committer freebsd_triage 2022-01-19 05:53:26 UTC
Created attachment 231148 [details]
Updated patch file

Switch to DISTVERSION.
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-01-19 15:11:28 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9d8c3018ff4c2e2d91c9c23af79aac8d5fc6174b

commit 9d8c3018ff4c2e2d91c9c23af79aac8d5fc6174b
Author:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2022-01-19 15:06:24 +0000
Commit:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2022-01-19 15:06:24 +0000

    devel/py-atpublic: Fix build

    - Latest version of py-atpublic removed support for setup.py. I am adding
      setup stuff for fix current problem
    PR:             261270
    Reported by:    yasu

 devel/py-atpublic/Makefile                     |   5 +-
 devel/py-atpublic/files/setup.cfg (new)        |  76 ++++++++++++
 devel/py-atpublic/files/setup.py (new)         |  55 +++++++++
 devel/py-atpublic/files/setup_helpers.py (new) | 153 +++++++++++++++++++++++++
 4 files changed, 288 insertions(+), 1 deletion(-)
Comment 6 Jose Alonso Cardenas Marquez freebsd_committer freebsd_triage 2022-01-19 15:13:30 UTC
hi, I have added another way to fix this problem. It should works right now. Thanks for your PR. Please close this PR if it is working for you
Comment 7 Andrey Pevnev 2022-01-19 15:24:07 UTC
Hm.. import public does not work now?...

$ python3
Python 3.8.12 (default, Oct 14 2021, 05:08:21)
[Clang 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c on freebsd13
Type "help", "copyright", "credits" or "license" for more information.
>>> import public
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'public'
Comment 8 Jose Alonso Cardenas Marquez freebsd_committer freebsd_triage 2022-01-19 16:15:52 UTC
(In reply to Andrey Pevnev from comment #7)
Try with my latest changes https://cgit.freebsd.org/ports/commit/?id=8c652251cd49dc718024d698d84c13badb7687f5
Comment 9 Andrey Pevnev 2022-01-19 16:20:48 UTC
(In reply to Jose Alonso Cardenas Marquez from comment #8)
That seems to have fixed it, thank you sir!