Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Apr 2026 09:58:25 +0000
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: a9e1854d594b - main - devel/py-ninja: New port: Python package providing the Ninja build tool
Message-ID:  <69d4d541.45d76.55eca708@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a9e1854d594b78a9f4574ec7a790ff9825d6a607

commit a9e1854d594b78a9f4574ec7a790ff9825d6a607
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-04-07 05:02:56 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-04-07 09:58:09 +0000

    devel/py-ninja: New port: Python package providing the Ninja build tool
---
 devel/Makefile                            |  1 +
 devel/py-ninja/Makefile                   | 25 +++++++++++++++++++++++++
 devel/py-ninja/distinfo                   |  3 +++
 devel/py-ninja/files/patch-CMakeLists.txt | 11 +++++++++++
 devel/py-ninja/files/patch-pyproject.toml | 13 +++++++++++++
 devel/py-ninja/pkg-descr                  |  3 +++
 6 files changed, 56 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 029421b21cab..d97685a5c6db 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5382,6 +5382,7 @@
     SUBDIR += py-nbformat
     SUBDIR += py-nbval
     SUBDIR += py-nest-asyncio
+    SUBDIR += py-ninja
     SUBDIR += py-node-semver
     SUBDIR += py-nodeenv
     SUBDIR += py-nose
diff --git a/devel/py-ninja/Makefile b/devel/py-ninja/Makefile
new file mode 100644
index 000000000000..c029f6905269
--- /dev/null
+++ b/devel/py-ninja/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	ninja
+DISTVERSION=	1.13.0
+CATEGORIES=	devel python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Python package providing the Ninja build tool
+WWW=		https://github.com/scikit-build/ninja-python-distributions
+
+LICENSE=	APACHE20 BSD2CLAUSE
+LICENSE_COMB=	dual
+LICENSE_FILE=	${WRKSRC}/LICENSE_Apache_20
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}scikit-build-core>=0.10:devel/py-scikit-build-core@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}hatch-fancy-pypi-readme>=22.3:devel/py-hatch-fancy-pypi-readme@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}setuptools-scm>0:devel/py-setuptools-scm@${PY_FLAVOR}
+RUN_DEPENDS=	ninja:devel/ninja
+
+USES=		cmake:indirect python
+USE_PYTHON=	pep517 autoplist
+
+MAKE_ENV+=	NINJA_PYTHON_DIST_ALLOW_NINJA_DEP=1
+
+.include <bsd.port.mk>
diff --git a/devel/py-ninja/distinfo b/devel/py-ninja/distinfo
new file mode 100644
index 000000000000..d05fe6670ef5
--- /dev/null
+++ b/devel/py-ninja/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1775500352
+SHA256 (ninja-1.13.0.tar.gz) = 4a40ce995ded54d9dc24f8ea37ff3bf62ad192b547f6c7126e7e25045e76f978
+SIZE (ninja-1.13.0.tar.gz) = 242558
diff --git a/devel/py-ninja/files/patch-CMakeLists.txt b/devel/py-ninja/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..550a644742a9
--- /dev/null
+++ b/devel/py-ninja/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig	2026-04-06 13:19:14.054748000 UTC
++++ CMakeLists.txt	2026-04-06 13:19:14.097244000 UTC
+@@ -33,5 +33,7 @@
+   )
+ endif()
+ 
+-install(TARGETS ninja COMPONENT python DESTINATION "${SKBUILD_SCRIPTS_DIR}")
++if(NOT DEFINED ENV{NINJA_PYTHON_DIST_ALLOW_NINJA_DEP})
++  install(TARGETS ninja COMPONENT python DESTINATION "${SKBUILD_SCRIPTS_DIR}")
++endif()
+ install(FILES "${ninja_SOURCE_DIR}/misc/ninja_syntax.py" COMPONENT python DESTINATION ninja)
diff --git a/devel/py-ninja/files/patch-pyproject.toml b/devel/py-ninja/files/patch-pyproject.toml
new file mode 100644
index 000000000000..bec91cfeff06
--- /dev/null
+++ b/devel/py-ninja/files/patch-pyproject.toml
@@ -0,0 +1,13 @@
+--- pyproject.toml.orig	2026-04-06 13:12:36.737527000 UTC
++++ pyproject.toml	2026-04-06 13:13:02.176526000 UTC
+@@ -84,6 +84,10 @@
+ replacement = ""
+ 
+ 
++[tool.scikit-build.cmake.define]
++BUILD_TESTING = false
++RUN_NINJA_TEST = false
++
+ [tool.cibuildwheel]
+ archs = ["auto64", "auto32"]
+ build = "cp39-*"
diff --git a/devel/py-ninja/pkg-descr b/devel/py-ninja/pkg-descr
new file mode 100644
index 000000000000..e500b6408583
--- /dev/null
+++ b/devel/py-ninja/pkg-descr
@@ -0,0 +1,3 @@
+This Python package provides access to the Ninja build system from Python.
+It installs the ninja binary and the ninja_syntax module for programmatically
+generating Ninja build files.


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69d4d541.45d76.55eca708>