diff --git a/ports-mgmt/distilator/Makefile b/ports-mgmt/distilator/Makefile index 9e7542c8c867..ce221aae46bc 100644 --- a/ports-mgmt/distilator/Makefile +++ b/ports-mgmt/distilator/Makefile @@ -1,26 +1,27 @@ # Created by: Emanuel Haupt PORTNAME= distilator PORTVERSION= 1.3 +PORTREVISION= 1 CATEGORIES= ports-mgmt MASTER_SITES= https://critical.ch/distilator/ \ LOCAL/ehaupt MAINTAINER= ehaupt@FreeBSD.org COMMENT= Command-line script to check the availability of a ports distfiles LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/COPYING RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}requests>=2.18.4_1:www/py-requests@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}requests-ftp>=0.3.1:ftp/py-requests-ftp@${PY_FLAVOR} USES= python shebangfix NO_ARCH= yes NO_BUILD= yes PLIST_FILES= bin/distilator SHEBANG_FILES= distilator.py .include diff --git a/ports-mgmt/distilator/files/patch-distilator.py b/ports-mgmt/distilator/files/patch-distilator.py new file mode 100644 index 000000000000..1a7cfdecbe17 --- /dev/null +++ b/ports-mgmt/distilator/files/patch-distilator.py @@ -0,0 +1,38 @@ +--- distilator.py.orig 2020-07-18 07:41:39 UTC ++++ distilator.py +@@ -1,8 +1,6 @@ + #!/usr/bin/env python + """Command-line script to check the availability of a ports distfiles.""" + +-from __future__ import print_function # Imports print_function from python 3 +- + from multiprocessing import Pool + from functools import partial + +@@ -38,7 +36,7 @@ class Distfiles: + valid_urls = [] + for url in urls: + thisurl = urlparse(url) +- if thisurl.scheme is not "": ++ if thisurl.scheme != "": + valid_urls.append(thisurl.geturl()) + return valid_urls + +@@ -129,7 +127,7 @@ def resolve_or_timeout_error(url, urltype, args): + def validate_url_pool(args, iterable): + """Method to validate a list of URLs.""" + for url, urltype in iterable.items(): +- if urlparse(url).scheme is "http" or "https": ++ if urlparse(url).scheme == "http" or "https": + try: + user_agent = "distilator/%s (%s)" % (__version__, os.uname()[0]) + headers = {"User-Agent": user_agent} +@@ -160,7 +158,7 @@ def validate_url_pool(args, iterable): + status_code = resolve_or_timeout_error(url, urltype, args) + return {"status_code": status_code, "urltype": urltype, "url": url} + +- if urlparse(url).scheme is "ftp": ++ if urlparse(url).scheme == "ftp": + try: + requests_ftp.monkeypatch_session() + session = requests.Session()