Bug 256532 - textproc/docproj: does not install python3
Summary: textproc/docproj: does not install python3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Ceri Davies
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-10 09:45 UTC by Ceri Davies
Modified: 2021-08-28 17:48 UTC (History)
3 users (show)

See Also:
dbaio: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ceri Davies freebsd_committer 2021-06-10 09:45:56 UTC
The doc build requires /usr/local/build/python3, and the doc build needs it.
If you don't have it installed, it tells you install the docproj package, but that doesn't install python3 either.

{ceri@threebsd}-{~/git/f} % sudo pkg install docproj
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
{ceri@threebsd}-{git/f} % git clone https://git.freebsd.org/doc.git -o freebsd freebsd-doc
{ceri@threebsd}-{~/git/f} % cd freebsd-doc
{ceri@threebsd}-{git/f/freebsd-doc} % make
===> documentation (all)
/usr/local/bin/python3 not found, please run pkg install docproj
*** Error code 1

Stop.
make[1]: stopped in /home/ceri/git/f/freebsd-doc/documentation
*** Error code 1

Stop.
make: stopped in /home/ceri/git/f/freebsd-doc
{ceri@threebsd}-{git/f/freebsd-doc} % ls /usr/local/bin/pyth*
/usr/local/bin/python3.7                /usr/local/bin/python3.7m
/usr/local/bin/python3.7-config         /usr/local/bin/python3.7m-config
{ceri@threebsd}-{git/f/freebsd-doc} %
Comment 1 Ceri Davies freebsd_committer 2021-06-10 09:51:42 UTC
Ignore this, I have ended up with docproj-2 for some reason.
Comment 2 Li-Wen Hsu freebsd_committer 2021-06-10 10:36:15 UTC
I feel this is still an issue, the scripts in doc are using `#!/usr/local/bin/python3` as shebang, but docproj is marking `USES=python:3.6+,run` this only implies installing lang/python.38 as 3.8 is the current default python version, and only /usr/local/bin/python3.8 will be provided. This would cause a problem on a vanilla installed system where has no lang/python or lang/python3 installed.
Comment 3 Danilo G. Baio freebsd_committer 2021-06-10 23:57:46 UTC
As we can't direct depend on lang/python3 metaport, what about checking for default Python versions in the doc Makefile?

At this moment we have:
 ports latest/main branch == Python 3.8 /usr/local/bin/python3.8
 ports quarterly 2021Q2   == Python 3.7 /usr/local/bin/python3.7
 fallback to /usr/local/bin/python3 as a PYTHON_CMD? variable.

And change the error message if it not find a Python interpreter, to set a PYTHON_CMD env.
Comment 4 Danilo G. Baio freebsd_committer 2021-08-27 12:57:33 UTC
As we can't directly depend on lang/python3 metaport, `USES=python:3.6+,run` tells that it needs a Python for run (which the current default version will be used).

The instructions [1] suggest installing `docproj` and `python3`. This way, all shebangs will work, no matter the current default Python version on ports.

1 - https://docs.freebsd.org/en/books/fdp-primer/overview/#overview
Comment 5 Ceri Davies freebsd_committer 2021-08-27 13:44:01 UTC
The Makefile error is still wrong; I’ll fix it.
Comment 6 Ceri Davies freebsd_committer 2021-08-28 17:48:26 UTC
Done now.