FreeBSD Bugzilla – Attachment 260312 Details for
Bug 267901
devel/py-e3-core: Core framework for developing portable automated build systems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
New Port, e3 Core framework for developing portable automated build systems
0001-devel-py-e3-core-New-Port.patch (text/plain), 10.38 KB, created by
Alastair Hogge
on 2025-05-10 07:46:14 UTC
(
hide
)
Description:
New Port, e3 Core framework for developing portable automated build systems
Filename:
MIME Type:
Creator:
Alastair Hogge
Created:
2025-05-10 07:46:14 UTC
Size:
10.38 KB
patch
obsolete
>From 19d67f4814a2651590fdeef1592bc58aed4219b0 Mon Sep 17 00:00:00 2001 >From: Alastair Hogge <agh@riseup.net> >Date: Sat, 10 May 2025 15:41:24 +0800 >Subject: [PATCH] devel/py-e3-core: New Port > >devel/py-e3-core: >* New Port, e3 Core framework for developing portable automated build > systems >* Updated to 22.2.0 >* Take ${MAINTAINER} > >https://pypi.org/project/e3-core/ > > PR: 267901 >--- > devel/Makefile | 1 + > devel/py-e3-core/Makefile | 74 +++++++++++++++++++ > devel/py-e3-core/distinfo | 3 + > devel/py-e3-core/files/patch-src_e3_fs.py | 11 +++ > .../patch-tests_tests__e3_env_main__test.py | 12 +++ > .../patch-tests_tests__e3_main_main__test.py | 56 ++++++++++++++ > ...h-tests_tests__e3_os_process_main__test.py | 11 +++ > devel/py-e3-core/pkg-descr | 3 + > 8 files changed, 171 insertions(+) > create mode 100644 devel/py-e3-core/Makefile > create mode 100644 devel/py-e3-core/distinfo > create mode 100644 devel/py-e3-core/files/patch-src_e3_fs.py > create mode 100644 devel/py-e3-core/files/patch-tests_tests__e3_env_main__test.py > create mode 100644 devel/py-e3-core/files/patch-tests_tests__e3_main_main__test.py > create mode 100644 devel/py-e3-core/files/patch-tests_tests__e3_os_process_main__test.py > create mode 100644 devel/py-e3-core/pkg-descr > >diff --git a/devel/Makefile b/devel/Makefile >index 8095a26700f4..783393269c60 100644 >--- a/devel/Makefile >+++ b/devel/Makefile >@@ -4833,6 +4833,7 @@ > SUBDIR += py-dunamai > SUBDIR += py-durus > SUBDIR += py-dynrules >+ SUBDIR += py-e3-core > SUBDIR += py-easydict > SUBDIR += py-easyprocess > SUBDIR += py-editables >diff --git a/devel/py-e3-core/Makefile b/devel/py-e3-core/Makefile >new file mode 100644 >index 000000000000..f2989716fc88 >--- /dev/null >+++ b/devel/py-e3-core/Makefile >@@ -0,0 +1,74 @@ >+PORTNAME= e3-core >+DISTVERSION= 22.10.0 >+CATEGORIES= devel python >+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} >+ >+MAINTAINER= agh@riseup.net >+COMMENT= Core framework for developing portable automated build systems >+WWW= https://github.com/AdaCore/e3-core >+ >+LICENSE= GPLv3 >+LICENSE_FILE= ${WRKSRC}/COPYING3 >+ >+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=61.0.0:devel/py-setuptools@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} >+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}colorama>0:devel/py-colorama@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}distro>0:sysutils/py-distro@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}packaging>0:devel/py-packaging@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}psutil>0:sysutils/py-psutil@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}python-dateutil>0:devel/py-python-dateutil@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}pyyaml>0:devel/py-pyyaml@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}requests-cache>0:www/py-requests-cache@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}requests-toolbelt>0:www/py-requests-toolbelt@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}resolvelib>0:devel/py-resolvelib@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}stevedore>1.20.0:devel/py-stevedore@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}tqdm>0:misc/py-tqdm@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} \ >+ bash>0:shells/bash >+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}ansi2html>0:textproc/py-ansi2html@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}ptyprocess>0:sysutils/py-ptyprocess@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}pytest-html>0:devel/py-pytest-html@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}pytest-socket>0:devel/py-pytest-socket@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}requests-mock>0:www/py-requests-mock@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \ >+ git>0:devel/git \ >+ rsync>0:net/rsync >+ >+USES= pytest python:3.9+ >+USE_GITHUB= yes >+GH_ACCOUNT= AdaCore >+USE_PYTHON= autoplist concurrent pep517 >+ >+PLIST_FILES+= ${PYTHON_SITELIBDIR}/e3/os/data/rlimit-${_RLIMIT_PLATFORM} >+ >+_RLIMIT_PLATFORM= ${ARCH:S/amd64/x86_64/}-${OPSYS:tl} >+ >+post-patch: >+# Modify ${WRKSRC}/VERSION to reflect the complete upsteam version, to avoid >+# dealing with Python Wheel shenanigans >+ ${REINPLACE_CMD} -e 's|${PORTVERSION:R}|${PORTVERSION}|' \ >+ ${WRKSRC}/VERSION >+ ${REINPLACE_CMD} -e 's|%%PYTHON_VER%%|${PYTHON_VER}|' \ >+ ${WRKSRC}/tests/tests_e3/os/process/main_test.py \ >+ ${WRKSRC}/tests/tests_e3/main/main_test.py >+ >+pre-build: >+# Build required rlimit binary, see GitHub issue 388 for context, >+# https://github.com/AdaCore/e3-core/issues/388 >+ (cd ${WRKSRC}/tools/rlimit && \ >+ ${CC} -o rlimit-${_RLIMIT_PLATFORM} rlimit.c) >+ >+post-install: >+ ${INSTALL_PROGRAM} ${WRKSRC}/tools/rlimit/rlimit-${_RLIMIT_PLATFORM} \ >+ ${STAGEDIR}${PYTHON_SITELIBDIR}/e3/os/data/ >+ >+do-test: >+# Tests require e3 to function >+ (cd ${WRKSRC} && \ >+ ${SETENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} \ >+ ${PYTHON_CMD} -m pytest) >+ >+.include <bsd.port.mk> >diff --git a/devel/py-e3-core/distinfo b/devel/py-e3-core/distinfo >new file mode 100644 >index 000000000000..37c5c737f8ff >--- /dev/null >+++ b/devel/py-e3-core/distinfo >@@ -0,0 +1,3 @@ >+TIMESTAMP = 1746773105 >+SHA256 (AdaCore-e3-core-22.10.0_GH0.tar.gz) = 496b630569579c0b544e5455681076baeb6195d9ed03b4a7c7add9618d9e7127 >+SIZE (AdaCore-e3-core-22.10.0_GH0.tar.gz) = 805122 >diff --git a/devel/py-e3-core/files/patch-src_e3_fs.py b/devel/py-e3-core/files/patch-src_e3_fs.py >new file mode 100644 >index 000000000000..f5080935ec1d >--- /dev/null >+++ b/devel/py-e3-core/files/patch-src_e3_fs.py >@@ -0,0 +1,11 @@ >+--- src/e3/fs.py.orig 2025-03-28 13:21:34 UTC >++++ src/e3/fs.py >+@@ -58,7 +58,7 @@ def cp( >+ if copy_attrs: >+ switches += " -p" >+ if recursive: >+- switches += " -r" >++ switches += " -R" >+ logger.debug("cp %s %s->%s", switches, source, target) >+ >+ if recursive and not copy_attrs: >diff --git a/devel/py-e3-core/files/patch-tests_tests__e3_env_main__test.py b/devel/py-e3-core/files/patch-tests_tests__e3_env_main__test.py >new file mode 100644 >index 000000000000..9b0ec2bfc2b6 >--- /dev/null >+++ b/devel/py-e3-core/files/patch-tests_tests__e3_env_main__test.py >@@ -0,0 +1,12 @@ >+--- tests/tests_e3/env/main_test.py.orig 2025-05-09 08:40:30 UTC >++++ tests/tests_e3/env/main_test.py >+@@ -15,6 +15,9 @@ def test_autodetect(): >+ .replace("win32", "windows") >+ .replace("aix7", "aix") >+ .replace("sunos5", "solaris") >++ .replace("freebsd13", "freebsd") >++ .replace("freebsd14", "freebsd") >++ .replace("freebsd15", "freebsd") >+ ) >+ assert sys_platform in str(e3.platform.Platform.get()) >+ >diff --git a/devel/py-e3-core/files/patch-tests_tests__e3_main_main__test.py b/devel/py-e3-core/files/patch-tests_tests__e3_main_main__test.py >new file mode 100644 >index 000000000000..e076278d8092 >--- /dev/null >+++ b/devel/py-e3-core/files/patch-tests_tests__e3_main_main__test.py >@@ -0,0 +1,56 @@ >+--- tests/tests_e3/main/main_test.py.orig 2025-05-09 10:12:19 UTC >++++ tests/tests_e3/main/main_test.py >+@@ -19,7 +19,7 @@ def test_mainprog(): >+ f.write( >+ "\n".join( >+ ( >+- "#!/usr/bin/env python", >++ "#!/usr/bin/env python%%PYTHON_VER%%", >+ "from e3.main import Main", >+ "import os", >+ 'm = Main(name="testmain")', >+@@ -44,7 +44,7 @@ def to_rework_modules_logging_limitations(): >+ f.write( >+ "\n".join( >+ ( >+- "#!/usr/bin/env python", >++ "#!/usr/bin/env python%%PYTHON_VER%%", >+ "from e3.main import Main", >+ "import requests", >+ "import logging", >+@@ -79,7 +79,7 @@ def test_mainprog_with_console_logs(): >+ f.write( >+ "\n".join( >+ ( >+- "#!/usr/bin/env python", >++ "#!/usr/bin/env python%%PYTHON_VER%%", >+ "from e3.main import Main", >+ "import os", >+ 'm = Main(name="testmain")', >+@@ -111,7 +111,7 @@ def test_x86_64_windows_default(): >+ f.write( >+ "\n".join( >+ ( >+- "#!/usr/bin/env python", >++ "#!/usr/bin/env python%%PYTHON_VER%%", >+ "from e3.main import Main", >+ "m = Main(platform_args=True, default_x86_64_on_windows=True)", >+ "m.parse_args()", >+@@ -128,7 +128,7 @@ def test_default_env_callback(): >+ f.write( >+ "\n".join( >+ ( >+- "#!/usr/bin/env python", >++ "#!/usr/bin/env python%%PYTHON_VER%%", >+ "from e3.main import Main", >+ "from e3.env import Env", >+ "def cb(args):", >+@@ -157,7 +157,7 @@ def test_sigterm(): >+ f.write( >+ "\n".join( >+ ( >+- "#!/usr/bin/env python", >++ "#!/usr/bin/env python%%PYTHON_VER%%", >+ "from e3.main import Main", >+ "import os", >+ "import signal", >diff --git a/devel/py-e3-core/files/patch-tests_tests__e3_os_process_main__test.py b/devel/py-e3-core/files/patch-tests_tests__e3_os_process_main__test.py >new file mode 100644 >index 000000000000..a0399d54e93b >--- /dev/null >+++ b/devel/py-e3-core/files/patch-tests_tests__e3_os_process_main__test.py >@@ -0,0 +1,11 @@ >+--- tests/tests_e3/os/process/main_test.py.orig 2025-03-28 13:21:34 UTC >++++ tests/tests_e3/os/process/main_test.py >+@@ -51,7 +51,7 @@ def test_run_shebang(caplog): >+ """Verify that the parse shebang option works.""" >+ prog_filename = os.path.join(os.getcwd(), "prog") >+ with open(prog_filename, "wb") as f: >+- f.write(b"#!/usr/bin/env python\n") >++ f.write(b"#!/usr/bin/env python%%PYTHON_VER%%\n") >+ f.write(b"import sys\n") >+ f.write(b'print("running %s" % sys.argv[1])\n') >+ e3.os.fs.chmod("a+x", prog_filename) >diff --git a/devel/py-e3-core/pkg-descr b/devel/py-e3-core/pkg-descr >new file mode 100644 >index 000000000000..d877b6bbd40f >--- /dev/null >+++ b/devel/py-e3-core/pkg-descr >@@ -0,0 +1,3 @@ >+The e3 Project is a Python framework to ease the development of portable >+automated build systems (compilation, dependencies management, binary code >+packaging, and automated testing). >-- >2.49.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 267901
:
238227
|
260307
|
260309
|
260310
| 260312