git: 021ceba2e89a - main - devel/py-p4python: Update to 2022.2.2425690
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 09 Apr 2023 01:31:47 UTC
The branch main has been updated by leres: URL: https://cgit.FreeBSD.org/ports/commit/?id=021ceba2e89a7da47ed25e982713d9a63a4766c6 commit 021ceba2e89a7da47ed25e982713d9a63a4766c6 Author: Craig Leres <leres@FreeBSD.org> AuthorDate: 2023-04-09 01:31:00 +0000 Commit: Craig Leres <leres@FreeBSD.org> CommitDate: 2023-04-09 01:31:00 +0000 devel/py-p4python: Update to 2022.2.2425690 Remove BROKEN (this version is 7 years newer). Python 2 no longer supported. PR: 270704 Approved by: antonfb@hesiod.org (maintainer) --- devel/py-p4python/Makefile | 7 +- devel/py-p4python/distinfo | 6 +- devel/py-p4python/files/patch-P4PythonDebug.cpp | 10 -- devel/py-p4python/files/patch-setup.py | 126 +++++++++------------ .../py-p4python/files/patch-tools_PlatformInfo.py | 13 +++ 5 files changed, 74 insertions(+), 88 deletions(-) diff --git a/devel/py-p4python/Makefile b/devel/py-p4python/Makefile index 73f0f3160f54..459b600327d9 100644 --- a/devel/py-p4python/Makefile +++ b/devel/py-p4python/Makefile @@ -1,19 +1,16 @@ PORTNAME= p4python -PORTVERSION= 2016.1.1447008 -PORTREVISION= 2 +PORTVERSION= 2022.2.2425690 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= antonfb@hesiod.org COMMENT= Python bindings for the Perforce API -WWW= https://www.perforce.com/perforce/r14.2/manuals/p4script/python.programming.html +WWW= https://www.perforce.com/manuals/p4python/Content/P4Python/Home-p4python.html LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE.txt -BROKEN_riscv64= fails to build: TypeError: can only concatenate str (not "NoneType") to str - BUILD_DEPENDS+= ${LOCALBASE}/lib/perforce/libclient.a:devel/p4api RUN_DEPENDS:= ${BUILD_DEPENDS} diff --git a/devel/py-p4python/distinfo b/devel/py-p4python/distinfo index 80f6846c2293..643ecdb71f90 100644 --- a/devel/py-p4python/distinfo +++ b/devel/py-p4python/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1517419395 -SHA256 (p4python-2016.1.1447008.tar.gz) = 1907f3c7ace54763651c1ccf20b92e6e9e72de58b240c591d6291ebb24ef0f1b -SIZE (p4python-2016.1.1447008.tar.gz) = 84231 +TIMESTAMP = 1680624240 +SHA256 (p4python-2022.2.2425690.tar.gz) = 3d2a6135b7cc31226d71a056d14abe7b2e120e683e93a6187e651480d2ad64df +SIZE (p4python-2022.2.2425690.tar.gz) = 83439 diff --git a/devel/py-p4python/files/patch-P4PythonDebug.cpp b/devel/py-p4python/files/patch-P4PythonDebug.cpp deleted file mode 100644 index 9509bb0aaa24..000000000000 --- a/devel/py-p4python/files/patch-P4PythonDebug.cpp +++ /dev/null @@ -1,10 +0,0 @@ ---- P4PythonDebug.cpp.orig 2023-04-01 20:37:16 UTC -+++ P4PythonDebug.cpp -@@ -29,6 +29,7 @@ $Id$ - #include <Python.h> - #include <iostream> - -+#include <stdhdrs.h> - #include <debug.h> - - #include "P4PythonDebug.h" diff --git a/devel/py-p4python/files/patch-setup.py b/devel/py-p4python/files/patch-setup.py index 5d7c2e3daa40..20229a81115d 100644 --- a/devel/py-p4python/files/patch-setup.py +++ b/devel/py-p4python/files/patch-setup.py @@ -1,73 +1,59 @@ ---- setup.py.orig 2018-02-02 16:50:17 UTC +--- setup.py.orig 2023-04-04 23:31:58 UTC +++ setup.py -@@ -102,7 +102,12 @@ class P4APIFtp: - - elif system == "FreeBSD": - platform_str += "freebsd" -- release = uname.release -+ if sys.version_info.major == 3: -+ release = uname.release -+ elif sys.version_info.major == 2: -+ release = uname[2] -+ else: -+ raise Exception("Unknown python version %s" % sys.version) - - value = int(''.join(itertools.takewhile(lambda s: s.isdigit(), release))) - -@@ -217,6 +222,8 @@ class VersionInfo: - verFile = os.path.join(p4ApiDir, "sample", "Version") - if not os.path.exists(verFile): - verFile = os.path.join(p4ApiDir, "Version") -+ if not os.path.exists(verFile): -+ verFile = os.path.join(p4ApiDir, "share", "examples", "p4api", "Version") - input = open(verFile) - for line in input: - for pattern, handler in self.patterns: -@@ -398,9 +405,16 @@ class PlatformInfo: - arch = self.architecture(unameOut[4]) - elif unameOut[0] == 'FreeBSD': - unix = "FREEBSD" -- release = unameOut[2][0] -- if release == '5': -- release += unameOut[2][2] -+ if sys.version_info.major == 3: -+ release = unameOut.release.split(".")[0] -+ if release == '5': -+ release += unameOut.release.split(".")[1] -+ elif sys.version_info.major == 2: -+ release = unameOut[2].split(".")[0] -+ if release == '5': -+ release += unameOut[2].split(".")[1] -+ else: -+ raise Exception("Unknown python version %s" % sys.version) - - arch = self.architecture(unameOut[4]) - elif unameOut[0] == 'CYGWIN_NT-5.1': -@@ -475,8 +489,16 @@ def do_setup(p4_api_dir, ssl): - else: - print ("API Release %s.%s" % (ryear, rversion)) - -- inc_path = [p4_api_dir, os.path.join(p4_api_dir, "include", "p4")] -- lib_path = [p4_api_dir, os.path.join(p4_api_dir, "lib")] -+ inc_dir = os.path.join(p4_api_dir, "include", "p4") -+ if not os.path.exists(inc_dir): -+ inc_dir = os.path.join(p4_api_dir, "include", "perforce") +@@ -243,7 +243,7 @@ class p4build_ext(build_ext_module): + pathToFile = os.path.join(p, "openssl") + if os.path.exists(pathToFile) and os.access(pathToFile, os.X_OK): + entry = subprocess.check_output("ldd {0} | grep libssl".format(pathToFile), +- executable="/bin/bash", shell="True") ++ executable="/bin/sh", shell="True") + if entry is not False: + libpath = os.path.dirname(entry.split()[2]) + +@@ -275,7 +275,7 @@ class p4build_ext(build_ext_module): + + ssl_ver = "" + if not p4_ssl_dir: +- if (not self.ssl) and (sys.platform == "linux" or sys.platform == "linux2"): ++ if (not self.ssl): + # check for a version of SSL already installed via 'openssl version' + self.ssl, ssl_ver = self.check_installed_ssl() # return libpath or None + +@@ -313,7 +313,7 @@ class p4build_ext(build_ext_module): + p4_api_dir = self.apidir + + try: +- apiVersion = VersionInfo(p4_api_dir) ++ apiVersion = VersionInfo(".") + releaseVersion = VersionInfo(".") + except IOError: + print("Cannot find Version file in API dir {0}.".format(p4_api_dir)) +@@ -334,9 +334,18 @@ class p4build_ext(build_ext_module): + #spawn._nt_quote_args = monkey_nt_quote_args + + # add the paths for p4 headers and library +- inc_path = [str(os.path.join(p4_api_dir, "include", "p4"))] +- lib_path = [str(os.path.join(p4_api_dir, "lib")), str(p4_ssl_dir)] ++ inc_dir = os.path.join(p4_api_dir, "include", "p4") ++ if not os.path.exists(inc_dir): ++ inc_dir = os.path.join(p4_api_dir, "include", "perforce") + ++ lib_dir = os.path.join(p4_api_dir, "lib", "perforce") ++ if not os.path.exists(lib_dir): ++ lib_dir = os.path.join(p4_api_dir, "lib") + -+ lib_dir = os.path.join(p4_api_dir, "lib", "perforce") -+ if not os.path.exists(lib_dir): -+ lib_dir = os.path.join(p4_api_dir, "lib") ++ inc_path = [p4_api_dir, inc_dir] ++ lib_path = [p4_api_dir, lib_dir] + -+ inc_path = [p4_api_dir, inc_dir] -+ lib_path = [p4_api_dir, lib_dir] - if ssl: - lib_path.append( ssl ) - -@@ -608,7 +630,7 @@ if __name__ == "__main__": - if os.path.exists(distdir): - shutil.rmtree(distdir, False, force_remove_file) - -- p4_api_dir = get_api_dir() -+ p4_api_dir = "%%LOCALBASE%%" - - ssl = None - if '--ssl' in sys.argv: ++ + # check if the interpreter is mayapy.exe + namedir = os.path.dirname(os.path.dirname(sys.executable)) + if "maya" in namedir.lower(): +@@ -469,7 +478,7 @@ def cleanup_api(api_dir, tarball): + + + # declare some evil globals +-p4_api_dir = "" ++p4_api_dir = "%%LOCALBASE%%" + p4_ssl_dir = "" + p4_ssl_ver = "" + ssl_tarball = "" diff --git a/devel/py-p4python/files/patch-tools_PlatformInfo.py b/devel/py-p4python/files/patch-tools_PlatformInfo.py new file mode 100644 index 000000000000..874fb6339737 --- /dev/null +++ b/devel/py-p4python/files/patch-tools_PlatformInfo.py @@ -0,0 +1,13 @@ +--- tools/PlatformInfo.py.orig 2023-04-05 20:18:00 UTC ++++ tools/PlatformInfo.py +@@ -131,9 +131,7 @@ class PlatformInfo: + arch = self.architecture(unameOut[4]) + elif unameOut[0] == 'FreeBSD': + unix = "FREEBSD" +- release = unameOut[2][0] +- if release == '5': +- release += unameOut[2][2] ++ release = re.match("(\d+.\d)", unameOut[2]).group(1).replace(".","") + + arch = self.architecture(unameOut[4]) + elif unameOut[0] == 'CYGWIN_NT-5.1':