From 73b5ca3bea50aea99b6b4acbdae893268501ed24 Mon Sep 17 00:00:00 2001 From: Logan Lang Date: Wed, 29 Oct 2025 20:00:42 -0400 Subject: [PATCH 1/6] Support both ninja Python package and ninja_syntax Fall back to importing ninja_syntax if the ninja Python package is not available. This allows ccimport to work with conda-forge's ninja and ninja_syntax package or other system-installed ninja versions that provide ninja_syntax.py, while maintaining compatibility with the ninja-python-distributions package. The import order prioritizes the Python package first --- ccimport/buildtools/writer.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ccimport/buildtools/writer.py b/ccimport/buildtools/writer.py index 93e9131..813b597 100644 --- a/ccimport/buildtools/writer.py +++ b/ccimport/buildtools/writer.py @@ -7,7 +7,12 @@ from pathlib import Path from typing import Any, Dict, List, Optional, Tuple, Type, Union -from ninja.ninja_syntax import Writer + +try: + from ninja.ninja_syntax import Writer +except ImportError: + from ninja_syntax import Writer # from system ninja + from ccimport import compat from ccimport.constants import get_compiler_map, CXX, CUDACXX, HIPCXX from ccimport.buildmeta import BuildMeta From 6ebc5671593833bf79fba0880013cca9e333250a Mon Sep 17 00:00:00 2001 From: Logan Lang Date: Tue, 11 Nov 2025 20:10:12 -0500 Subject: [PATCH 2/6] Update version to 0.4.5 --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.txt b/version.txt index b300caa..c8a5397 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.4.4 \ No newline at end of file +0.4.5 \ No newline at end of file From 7db82e367b7e249b091f0bb32d1ee12dbfc3b434 Mon Sep 17 00:00:00 2001 From: Logan Lang Date: Tue, 11 Nov 2025 20:36:24 -0500 Subject: [PATCH 3/6] Update setup.py to replace 'ninja' with 'ninja_syntax' in the REQUIRED packages list --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5cb8426..bed8c8d 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ # What packages are required for this module to be executed? REQUIRED = [ "pybind11", - "ninja", + "ninja_syntax", "requests", "importlib-metadata>=2.0; python_version < \"3.8\"", "dataclasses; python_version == \"3.6\"", From 5da516099cb8563e7636e359c32d22bcea0380ed Mon Sep 17 00:00:00 2001 From: Logan Lang Date: Wed, 12 Nov 2025 06:59:57 -0500 Subject: [PATCH 4/6] Update README.md to clarify package origin and Python version support --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ccd5482..634b11b 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,11 @@ [![Build Status](https://github.com/FindDefinition/ccimport/workflows/build/badge.svg)](https://github.com/FindDefinition/ccimport/actions?query=workflow%3Abuild) -a tiny package for fast python c++ binding build. +A tiny package for fast python c++ binding build. Orginally developed by @FindDefinition. This fork was produced to be compatible with conda-forge. ccimport 0.2.x support python 3.5. ccimport >= 0.3 support python 3.6-3.10. +ccimport >=0.4.5 support 3.10-3.13 ## Usage From 81335f24f95ee209a8a7a74209852a31861d514c Mon Sep 17 00:00:00 2001 From: Logan Lang Date: Wed, 12 Nov 2025 07:03:57 -0500 Subject: [PATCH 5/6] Correct typo in README.md regarding package origin --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 634b11b..b021679 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://github.com/FindDefinition/ccimport/workflows/build/badge.svg)](https://github.com/FindDefinition/ccimport/actions?query=workflow%3Abuild) -A tiny package for fast python c++ binding build. Orginally developed by @FindDefinition. This fork was produced to be compatible with conda-forge. +A tiny package for fast python c++ binding build. Originally developed by @FindDefinition. This fork was produced to be compatible with conda-forge. ccimport 0.2.x support python 3.5. ccimport >= 0.3 support python 3.6-3.10. From f02dfb485de36d075beb46bcd7152e01d5709f45 Mon Sep 17 00:00:00 2001 From: Logan Lang Date: Sat, 15 Nov 2025 20:27:20 -0500 Subject: [PATCH 6/6] Refactor README.md to remove outdated origin information and update setup.py to simplify dependency specifications --- README.md | 2 +- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b021679..ede7e3c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://github.com/FindDefinition/ccimport/workflows/build/badge.svg)](https://github.com/FindDefinition/ccimport/actions?query=workflow%3Abuild) -A tiny package for fast python c++ binding build. Originally developed by @FindDefinition. This fork was produced to be compatible with conda-forge. +A tiny package for fast python c++ binding build. ccimport 0.2.x support python 3.5. ccimport >= 0.3 support python 3.6-3.10. diff --git a/setup.py b/setup.py index bed8c8d..a3775b0 100644 --- a/setup.py +++ b/setup.py @@ -25,8 +25,8 @@ "pybind11", "ninja_syntax", "requests", - "importlib-metadata>=2.0; python_version < \"3.8\"", - "dataclasses; python_version == \"3.6\"", + "importlib-metadata>=2.0", + "dataclasses", ] # What packages are optional?