svn commit: r524884 - head/mail/py-mail-parser
Steve Wills
swills at FreeBSD.org
Sun Feb 2 14:05:56 UTC 2020
Hi,
On 2/2/20 6:01 AM, Sunpoet Po-Chuan Hsieh wrote:
> Author: sunpoet
> Date: Sun Feb 2 11:01:01 2020
> New Revision: 524884
> URL: https://svnweb.freebsd.org/changeset/ports/524884
>
> Log:
> Limit ipaddress for Python prior to 3.3
This doesn't really say why this change was made. Could you explain
more? I'm guessing it's because ipaddress is part of stdlib in 3.3 and
later?
>
> - Bump PORTREVISION for package change
>
> Modified:
> head/mail/py-mail-parser/Makefile
>
> Modified: head/mail/py-mail-parser/Makefile
> ==============================================================================
> --- head/mail/py-mail-parser/Makefile Sun Feb 2 11:00:56 2020 (r524883)
> +++ head/mail/py-mail-parser/Makefile Sun Feb 2 11:01:01 2020 (r524884)
> @@ -3,6 +3,7 @@
>
> PORTNAME= mail-parser
> PORTVERSION= 3.12.0
> +PORTREVISION= 1
> CATEGORIES= mail python
> MASTER_SITES= CHEESESHOP
> PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
> @@ -23,6 +24,6 @@ USE_PYTHON= autoplist concurrent distutils
> NO_ARCH= yes
>
> post-patch:
> - @${REINPLACE_CMD} -e 's|==|>=|' ${WRKSRC}/requirements.txt
> + @${REINPLACE_CMD} -e "s|==|>=|; /ipaddress/ s|$$|; python_version < '3.3'|" ${WRKSRC}/requirements.txt
>
> .include <bsd.port.mk>
>
I think this would be better as a patch file than REINPLACE_CMD. Using
sed can break silently. It can break in multiple ways, for example,
cases where the sed is still there but does nothing are common. I've
even seen cases where the code changes in such a way that the sed
applied by a port Makefile did something different than it originally
did. Patch files are easier to send upstream or even for upstream
themselves to locate and adopt or modify. These are some of the reasons
why the Porters Handbook says this should be done with patch:
https://www.freebsd.org/doc/en/books/porters-handbook/slow-patch.html
I've gone ahead and created a patch, see attached. I can open a Bugzilla
PR or Phabricator review if you prefer. I also went ahead and opened a
pull request upstream, assuming my understanding about ipaddress is correct.
Thanks,
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: py-mail-parser-rev0.diff
Type: text/x-patch
Size: 927 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-ports-all/attachments/20200202/e06be213/attachment.bin>
More information about the svn-ports-all
mailing list