Bug 245243

Summary: math/py-numpy port makefile tries to fetch wrong documentation version
Product: Ports & Packages Reporter: TommiP <tommi.pernila>
Component: Individual Port(s)Assignee: freebsd-python (Nobody) <python>
Status: Closed FIXED    
Severity: Affects Some People CC: andymenderunix, pi, tommi.pernila, wen
Priority: --- Keywords: needs-qa
Version: LatestFlags: bugzilla: maintainer-feedback? (python)
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch file for Makefile
none
Unified diff to use numpy.org for docs none

Description TommiP 2020-04-01 17:38:23 UTC
Created attachment 212939 [details]
patch file for Makefile

math/py-numpy port makefile tries to fetch wrong documentation version.

Upstream doesn't change the document version for minor updates.
As a solution i have hardcoded the document version number.
Patch file that i did with 'diff -u -N Makefile.orig Makefile > patch-document-version' is attached.


Here is a clip of the buildlog from a poudriere build.
Notice that the sha256 sum is still correct.



=======================<phase: fetch-depends  >============================
===========================================================================
=======================<phase: fetch          >============================
===>  License BSD3CLAUSE accepted by the user
=> numpy-1.16.5.zip doesn't seem to exist in /portdistfiles/.
=> Attempting to fetch https://files.pythonhosted.org/packages/source/n/numpy/numpy-1.16.5.zip
numpy-1.16.5.zip                                      5017 kB 2329 kBps    03s
=> numpy-ref-1.16.1.pdf doesn't seem to exist in /portdistfiles/.
=> Attempting to fetch https://docs.scipy.org/doc/numpy-1.16.5/numpy-ref-1.16.1.pdf
fetch: https://docs.scipy.org/doc/numpy-1.16.5/numpy-ref-1.16.1.pdf: Not Found
=> Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/numpy-ref-1.16.1.pdf
numpy-ref-1.16.1.pdf                                  5054 kB 1153 kBps    04s
=> numpy-user-1.16.1.pdf doesn't seem to exist in /portdistfiles/.
=> Attempting to fetch https://docs.scipy.org/doc/numpy-1.16.5/numpy-user-1.16.1.pdf
fetch: https://docs.scipy.org/doc/numpy-1.16.5/numpy-user-1.16.1.pdf: Not Found
=> Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/numpy-user-1.16.1.pdf
numpy-user-1.16.1.pdf                                  578 kB  446 kBps    01s
===> Fetching all distfiles required by py27-numpy-1.16.5_4,1 for building
===========================================================================
=======================<phase: checksum       >============================
===>  License BSD3CLAUSE accepted by the user
===> Fetching all distfiles required by py27-numpy-1.16.5_4,1 for building
=> SHA256 Checksum OK for numpy-1.16.5.zip.
=> SHA256 Checksum OK for numpy-ref-1.16.1.pdf.
=> SHA256 Checksum OK for numpy-user-1.16.1.pdf.
===========================================================================
=======================<phase: extract-depends>============================
===========================================================================
=======================<phase: extract        >============================
===>  License BSD3CLAUSE accepted by the user
===> Fetching all distfiles required by py27-numpy-1.16.5_4,1 for building
===>  Extracting for py27-numpy-1.16.5_4,1
=> SHA256 Checksum OK for numpy-1.16.5.zip.
=> SHA256 Checksum OK for numpy-ref-1.16.1.pdf.
=> SHA256 Checksum OK for numpy-user-1.16.1.pdf.
===========================================================================
Comment 1 Andy Mender 2020-04-18 17:46:27 UTC
I checked the doc URLs and there are also links to documents for an earlier version of numpy (1.16.0):
https://docs.scipy.org/doc/numpy-1.16.0/numpy-ref-1.16.0.pdf
https://docs.scipy.org/doc/numpy-1.16.1/numpy-user-1.16.1.pdf

And docs without the point version from numpy.org (currently, at 1.16.6, which is more recent than what scipy.org seems to offer!):
https://numpy.org/doc/1.16/numpy-ref.pdf
https://numpy.org/doc/1.16/numpy-user.pdf

I don't think hard-coding the version is a good idea, especially that PORTVERSION makes it more convenient when updating the port. If the missing DISTFILES are an issue, one can modify MASTER_SITES in the following way:
MASTER_SITES=	CHEESESHOP \
		https://docs.scipy.org/doc/${PORTNAME}-${PORTVERSION:R}.1/:doc

Or switch to the numpy.org docs. This properly downloads the documentation.
Comment 2 Andy Mender 2020-04-18 18:02:30 UTC
Created attachment 213543 [details]
Unified diff to use numpy.org for docs

Here's a unified diff for math/py-numpy to use numpy.org as the source of documentation.
Comment 3 Kurt Jaeger freebsd_committer freebsd_triage 2022-01-21 18:16:14 UTC
I think this patch was applied with the update to 1.20.3, see PR#259063 and commit 7e9bec828e31369d9b6bab30ac86218bf3def70d.