Giter Club home page Giter Club logo

ninja-python-distributions's Introduction

Ninja Python Distributions

Ninja is a small build system with a focus on speed.

The latest Ninja python wheels provide ninja 1.11.1.g95dee.kitware.jobserver-1 executable and ninja_syntax.py for generating .ninja files.

https://raw.githubusercontent.com/scikit-build/ninja-python-distributions/master/ninja-python-distributions-logo.png

Latest Release

Versions Downloads

Build Status

  GitHub Actions (Windows, macOS, Linux)
PyPI

Maintainers

Miscellaneous

Python Version Support

Versions after 1.11.1 no longer support Python 2-3.6, and require manylinux2010+ on linux.

License

This project is maintained by Jean-Christophe Fillion-Robin from Kitware Inc. It is covered by the Apache License, Version 2.0.

Ninja is also distributed under the Apache License, Version 2.0. For more information about Ninja, visit https://ninja-build.org

Logo was originally created by Libby Rose from Kitware Inc. It is covered by CC BY 4.0.

ninja-python-distributions's People

Contributors

anthrotype avatar awsjswinney avatar dependabot[bot] avatar henryiii avatar jackenmen avatar jcfr avatar kjerstadius avatar mayeut avatar pre-commit-ci[bot] avatar thewtex avatar zheddie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ninja-python-distributions's Issues

[3.12] Can't build ninja 1.11.1 from source

Trying to install ninja from source with Python 3.12 results in an error.
AFAICT it's because of versioneer which was removed some time ago.

Maybe all that's missing here is a new release?

$ pip install --no-binary ninja ninja==1.11.1
Collecting ninja==1.11.1
  Using cached ninja-1.11.1.tar.gz (27 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [27 lines of output]
      Traceback (most recent call last):
        File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        ...
        File "/tmp/pip-install-3smybk6x/ninja_debf47e70b994022aef1019cb1d0f823/versioneer.py", line 344, in get_config_from_root
          parser = configparser.SafeConfigParser()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Install Via pip Fails Due to Dependency scikit-build

Originally submitted here: ninja-build/ninja#1608

I believe that scikit-build should be added as a dependency in pip install as I get the following error if it is not installed:

$ pip install ninja
Collecting ninja
  Using cached https://files.pythonhosted.org/packages/dd/96/e2ec4acccb8dee33b4987f553d531d61e3081c8d4cfbce249655dfe23906/ninja-1.9.0.post1.tar.gz
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-av7tfuja/ninja/setup.py", line 7, in <module>
        from skbuild import setup
    ModuleNotFoundError: No module named 'skbuild'
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-av7tfuja/ninja/

Edit: System & platform information:

OS: Microsoft Windows 10 64-bit
Python & pip info:

$ python --version
Python 3.7.4

$ python -c 'import sys; print("64-bit: {}".format(sys.maxsize > 2**32))'
64-bit: True

$ pip --version
pip 19.1 from /usr/lib/python3.7/site-packages/pip (python 3.7)

$ pip search ninja
ninja (1.9.0.post1)                               - Ninja is a small build
                                                    system with a focus on
                                                    speed
...

Availability on conda

Hi,

Could this be made available on conda? There is a package called ninja [ref] but it doesn't provide the python bindings.

Cheers,
Sarthak

Trouble building on Raspberry PI 4

I get the following error with whichever way I try to build...

cmake version 3.26.4
python version 3.11.3
(I've confirmed the same issue with python 3.11.4)

[89/402] BuildTest.WrongOutputInDepfileCausesRebuild
*** Failure in /home/pi/Downloads/ninja-python-distributions/Ninja-src/src/build_test.cc:574
build_res
[386/402] TokenPoolTest.IgnoreWithJNninja: warning: -jN forced on command line; ignoring GNU make jobserver.
[402/402] ElideMiddle.ElideInTheMiddle
failed
make[2]: *** [CMakeFiles/build_ninja.dir/build.make:120: build_ninja-prefix/src/build_ninja-stamp/build_ninja-run_ninja_test_suite] Error 1
make[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/build_ninja.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Any help would be appreciated.

Unable to pip install 1.10.2.1 on Mac

Hi,

I'm unable to pip install 1.10.2.1 onto my Mac (and several others).

The error I've seen is:

(env382) FWMBP064:src mark.final$ pip install ninja==1.10.2.1
Collecting ninja==1.10.2.1
  Using cached https://files.pythonhosted.org/packages/07/2b/84175ca3e5978f9e1be3672b7618c6be713b69e3a50c98617b7ba4422d58/ninja-1.10.2.1.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: ninja
  Building wheel for ninja (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/mark.final/dev/conan/env382/bin/python3 /Users/mark.final/dev/conan/env382/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/90/7pnh_dhd19n9lpynqd0ppwt80000gn/T/tmp4x8ea5_h
       cwd: /private/var/folders/90/7pnh_dhd19n9lpynqd0ppwt80000gn/T/pip-install-n2vn6py8/ninja
  Complete output (13 lines):
  Traceback (most recent call last):
    File "/Users/mark.final/dev/conan/env382/bin/cmake", line 6, in <module>
      from cmake import cmake
  ModuleNotFoundError: No module named 'cmake'
    File "/private/var/folders/90/7pnh_dhd19n9lpynqd0ppwt80000gn/T/pip-build-env-ljc4cp78/overlay/lib/python3.8/site-packages/skbuild/setuptools_wrap.py", line 564, in setup
      cmkr = cmaker.CMaker(cmake_executable)
    File "/private/var/folders/90/7pnh_dhd19n9lpynqd0ppwt80000gn/T/pip-build-env-ljc4cp78/overlay/lib/python3.8/site-packages/skbuild/cmaker.py", line 95, in __init__
      self.cmake_version = get_cmake_version(self.cmake_executable)
    File "/private/var/folders/90/7pnh_dhd19n9lpynqd0ppwt80000gn/T/pip-build-env-ljc4cp78/overlay/lib/python3.8/site-packages/skbuild/cmaker.py", line 81, in get_cmake_version
      raise SKBuildError(
  Traceback (most recent call last):

  Problem with the CMake installation, aborting build. CMake executable is cmake
  ----------------------------------------
  ERROR: Failed building wheel for ninja
  Running setup.py clean for ninja
Failed to build ninja
ERROR: Could not build wheels for ninja which use PEP 517 and cannot be installed directly
WARNING: You are using pip version 19.2.3, however version 21.2.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

I also have CMake in my virtual environment:

(env382) FWMBP064:src mark.final$ cmake --version
cmake version 3.21.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
(env382) FWMBP064:src mark.final$ which cmake
/Users/mark.final/dev/conan/env382/bin/cmake

and this is

(env382) FWMBP064:src mark.final$ python --version
Python 3.8.2

and my system info

(env382) FWMBP064:src mark.final$ uname -a
Darwin FWMBP064.local 18.7.0 Darwin Kernel Version 18.7.0: Tue Jun 22 19:37:08 PDT 2021; root:xnu-4903.278.70~1/RELEASE_X86_64 x86_64

I can pip install ninja==1.10.2 without error.

Fails to build in Alpine 3.9

Here is the error:

      [ 70%] No install step for 'download_ninja_source'
      [ 80%] Completed 'download_ninja_source'
      [ 80%] Built target download_ninja_source
      Scanning dependencies of target build_ninja
      [ 90%] Generating ../../../src/ninja
      ./src/disk_interface.cc: In member function 'virtual TimeStamp RealDiskInterface::Stat(const string&, std::__cxx11::string*) const':
      ./src/disk_interface.cc:219:51: error: 'struct stat' has no member named 'st_mtimensec'; did you mean 'st_mtim'?
         return (int64_t)st.st_mtime * 1000000000LL + st.st_mtimensec;
                                                         ^~~~~~~~~~~~
                                                         st_mtim

I can provide the exact steps to reproduce. This looks like a bug, as things should compile. I think this is related to Alpine using musl instead of glibc.

ninja v1.11.0 is out

ninja v1.11.0 has been out for a little bit over a month:
https://github.com/ninja-build/ninja/releases/tag/v1.11.0

It seems that the PyPI is the package is behind on that and I'm just wondering if there are any blockers for this release or if it's just perhaps been missed. Or maybe it's neither and the maintainers didn't yet have time to release a new version which is fine as well, I was just hoping to get some information about that and mention the new release in case the maintainers actually didn't know it is out :)

Installation of ninja failed due to access https://github.com/Kitware/ninja

My network environment is within the company's internal network and I am unable to access external networks

When I install deepspeed, it needs to install ninja.ninja, which will be accessed during installation https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz , resulting in installation failure

The following is the installation log

If you need any other information, please contact me

[root@ai-app-2-46-msxf build]# DS_BUILD_FUSED_ADAM=1 pip3 --no-cache-dir install deepspeed --global-option="build_ext" --global-option="-j64"
DEPRECATION: --build-option and --global-option are deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use --config-settings. Discussion can be found at https://github.com/pypa/pip/issues/11859
WARNING: Implying --no-binary=:all: due to the presence of --build-option / --global-option.
Looking in indexes: http://nexus3.msxf.com/repository/pypi/simple
Collecting deepspeed
 Downloading http://nexus3.msxf.com/repository/pypi/packages/deepspeed/0.10.3/deepspeed-0.10.3.tar.gz (867 kB)
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 867.3/867.3 kB 114.6 MB/s eta 0:00:00
 Preparing metadata (setup.py) ... done
Collecting hjson (from deepspeed)
 Downloading http://nexus3.msxf.com/repository/pypi/packages/hjson/3.1.0/hjson-3.1.0.tar.gz (40 kB)
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.5/40.5 kB 67.5 MB/s eta 0:00:00
 Preparing metadata (setup.py) ... done
Collecting ninja (from deepspeed)
 Downloading http://nexus3.msxf.com/repository/pypi/packages/ninja/1.11.1/ninja-1.11.1.tar.gz (27 kB)
 Installing build dependencies ... done
 Getting requirements to build wheel ... done
 Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in /usr/local/python3/lib/python3.9/site-packages (from deepspeed) (1.25.2)
Requirement already satisfied: packaging>=20.0 in /usr/local/python3/lib/python3.9/site-packages (from deepspeed) (23.1)
Requirement already satisfied: psutil in /usr/local/python3/lib/python3.9/site-packages (from deepspeed) (5.9.5)
Collecting py-cpuinfo (from deepspeed)
 Downloading http://nexus3.msxf.com/repository/pypi/packages/py-cpuinfo/9.0.0/py-cpuinfo-9.0.0.tar.gz (104 kB)
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 104.7/104.7 kB 99.6 MB/s eta 0:00:00
 Installing build dependencies ... done
 Getting requirements to build wheel ... done
 Preparing metadata (pyproject.toml) ... done
Collecting pydantic<2.0.0 (from deepspeed)
 Downloading http://nexus3.msxf.com/repository/pypi/packages/pydantic/1.10.13/pydantic-1.10.13.tar.gz (348 kB)
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 348.3/348.3 kB 124.8 MB/s eta 0:00:00
 Preparing metadata (setup.py) ... done
Requirement already satisfied: torch in /usr/local/python3/lib/python3.9/site-packages (from deepspeed) (2.0.1+cu118)
Requirement already satisfied: tqdm in /usr/local/python3/lib/python3.9/site-packages (from deepspeed) (4.66.1)
Requirement already satisfied: typing-extensions>=4.2.0 in /usr/local/python3/lib/python3.9/site-packages (from pydantic<2.0.0->deepspeed) (4.7.1)
Requirement already satisfied: filelock in /usr/local/python3/lib/python3.9/site-packages (from torch->deepspeed) (3.12.4)
Requirement already satisfied: sympy in /usr/local/python3/lib/python3.9/site-packages (from torch->deepspeed) (1.12)
Requirement already satisfied: networkx in /usr/local/python3/lib/python3.9/site-packages (from torch->deepspeed) (3.1)
Requirement already satisfied: jinja2 in /usr/local/python3/lib/python3.9/site-packages (from torch->deepspeed) (3.1.2)
Requirement already satisfied: triton==2.0.0 in /usr/local/python3/lib/python3.9/site-packages (from torch->deepspeed) (2.0.0)
Requirement already satisfied: cmake in /usr/local/python3/lib/python3.9/site-packages (from triton==2.0.0->torch->deepspeed) (3.27.5)
Requirement already satisfied: lit in /usr/local/python3/lib/python3.9/site-packages (from triton==2.0.0->torch->deepspeed) (17.0.1)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/python3/lib/python3.9/site-packages (from jinja2->torch->deepspeed) (2.1.3)
Requirement already satisfied: mpmath>=0.19 in /usr/local/python3/lib/python3.9/site-packages (from sympy->torch->deepspeed) (1.3.0)
Building wheels for collected packages: deepspeed, pydantic, hjson, ninja, py-cpuinfo
 Building wheel for deepspeed (setup.py) ... done
 Created wheel for deepspeed: filename=deepspeed-0.10.3-cp39-cp39-linux_x86_64.whl size=4152088 sha256=98453be7391547ca3526e4fedfce22af8f48072c8b31b9ce931938927b386160
 Stored in directory: /tmp/pip-ephem-wheel-cache-6cr62s4z/wheels/49/35/db/aae5b7b65d41ded8e3236c80173246396d29dfbe8d74ae6c53
 Building wheel for pydantic (setup.py) ... done
 Created wheel for pydantic: filename=pydantic-1.10.13-cp39-cp39-linux_x86_64.whl size=3156349 sha256=e2aee2b425bd43c2674b6053659f19d91646902d8de4ff4ffbeae18f136a7bd4
 Stored in directory: /tmp/pip-ephem-wheel-cache-6cr62s4z/wheels/a3/76/da/eed6b1d795f6597060e4bf898f74b7c51cc6fe2e60f8ec4afa
 Building wheel for hjson (setup.py) ... done
 Created wheel for hjson: filename=hjson-3.1.0-py3-none-any.whl size=54019 sha256=798a1235ffdb1a55ac4051bd80796c4795d0b8ec51f8732ecd226cce01d95e82
 Stored in directory: /tmp/pip-ephem-wheel-cache-6cr62s4z/wheels/91/36/58/11e6ef4dd170250e99ce88cd34ca44f848d0bf0c52dbb30fd4
 WARNING: Ignoring --global-option when building ninja using PEP 517
 Building wheel for ninja (pyproject.toml) ... error
 error: subprocess-exited-with-error

 × Building wheel for ninja (pyproject.toml) did not run successfully.
 │ exit code: 1
 ╰─> [250 lines of output]


 --------------------------------------------------------------------------------
 -- Trying 'Ninja' generator
 --------------------------------
 ---------------------------
 ----------------------
 -----------------
 ------------
 -------
 --
 CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
 Compatibility with CMake < 3.5 will be removed from a future version of
 CMake.

 Update the VERSION argument <min> value or use a ...<max> suffix to tell
 CMake that the project does not need compatibility with older versions.

 Not searching for unused variables given on the command line.

 -- The C compiler identification is GNU 9.5.0
 -- Detecting C compiler ABI info
 -- Detecting C compiler ABI info - done
 -- Check for working C compiler: /usr/bin/cc - skipped
 -- Detecting C compile features
 -- Detecting C compile features - done
 -- The CXX compiler identification is GNU 9.5.0
 -- Detecting CXX compiler ABI info
 -- Detecting CXX compiler ABI info - done
 -- Check for working CXX compiler: /usr/bin/c++ - skipped
 -- Detecting CXX compile features
 -- Detecting CXX compile features - done
 -- Configuring done (0.8s)
 -- Generating done (0.0s)
 -- Build files have been written to: /tmp/pip-install-v_53kpbe/ninja_0d385c4eca7949fd95dd1fd48807f7ee/_cmake_test_compile/build
 --
 -------
 ------------
 -----------------
 ----------------------
 ---------------------------
 --------------------------------
 -- Trying 'Ninja' generator - success
 --------------------------------------------------------------------------------

 Configuring Project
 Working directory:
 /tmp/pip-install-v_53kpbe/ninja_0d385c4eca7949fd95dd1fd48807f7ee/_skbuild/linux-x86_64-3.9/cmake-build
 Command:
 /usr/local/bin/cmake /tmp/pip-install-v_53kpbe/ninja_0d385c4eca7949fd95dd1fd48807f7ee -G Ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-v_53kpbe/ninja_0d385c4eca7949fd95dd1fd48807f7ee/_skbuild/linux-x86_64-3.9/cmake-install -DPYTHON_VERSION_STRING:STRING=3.9.17 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-q0kpnrhc/overlay/lib/python3.9/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3 -DPYTHON_INCLUDE_DIR:PATH=/usr/local/python3/include/python3.9 -DPYTHON_LIBRARY:PATH=/usr/local/python3/lib/libpython3.9.a -DPython_EXECUTABLE:PATH=/usr/bin/python3 -DPython_ROOT_DIR:PATH=/usr/local/python3 -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/usr/local/python3/include/python3.9 -DPython3_EXECUTABLE:PATH=/usr/bin/python3 -DPython3_ROOT_DIR:PATH=/usr/local/python3 -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/usr/local/python3/include/python3.9 -DCMAKE_BUILD_TYPE:STRING=Release

 Not searching for unused variables given on the command line.
 -- The C compiler identification is GNU 9.5.0
 -- The CXX compiler identification is GNU 9.5.0
 -- Detecting C compiler ABI info
 -- Detecting C compiler ABI info - done
 -- Check for working C compiler: /usr/bin/cc - skipped
 -- Detecting C compile features
 -- Detecting C compile features - done
 -- Detecting CXX compiler ABI info
 -- Detecting CXX compiler ABI info - done
 -- Check for working CXX compiler: /usr/bin/c++ - skipped
 -- Detecting CXX compile features
 -- Detecting CXX compile features - done
 -- *********************************************
 -- Ninja Python Distribution
 --
 -- BUILD_VERBOSE : OFF
 -- RUN_NINJA_TEST : ON
 --
 -- ARCHIVE_DOWNLOAD_DIR : /tmp/pip-install-v_53kpbe/ninja_0d385c4eca7949fd95dd1fd48807f7ee/_skbuild/linux-x86_64-3.9/cmake-build
 --
 -- src_archive : unix_source
 -- <src_archive>_url : https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz
 -- <src_archive>_sha256 : 7ba84551f5b315b4270dc7c51adef5dff83a2154a3665a6c9744245c122dd0db
 -- *********************************************
 CMake Warning (dev) at /usr/local/share/cmake-3.27/Modules/ExternalProject.cmake:3136 (message):
 The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
 not set. The policy's OLD behavior will be used. When using a URL
 download, the timestamps of extracted files should preferably be that of
 the time of extraction, otherwise code that depends on the extracted
 contents might not be rebuilt if the URL changes. The OLD behavior
 preserves the timestamps from the archive instead, but this is usually not
 what you want. Update your project to the NEW behavior or specify the
 DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
 robustness issue.
 Call Stack (most recent call first):
 /usr/local/share/cmake-3.27/Modules/ExternalProject.cmake:4345 (_ep_add_download_command)
 CMakeLists.txt:65 (ExternalProject_add)
 This warning is for project developers. Use -Wno-dev to suppress it.

 -- download_ninja_source - URL: https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz
 -- SuperBuild - CMAKE_BUILD_TYPE: Release
 -- Configuring done (0.9s)
 -- Generating done (0.0s)
 -- Build files have been written to: /tmp/pip-install-v_53kpbe/ninja_0d385c4eca7949fd95dd1fd48807f7ee/_skbuild/linux-x86_64-3.9/cmake-build
 [1/19] Creating directories for 'download_ninja_source'
 [1/19] Performing download step (download, verify and extract) for 'download_ninja_source'
 -- Downloading...
 dst='/tmp/pip-install-v_53kpbe/ninja_0d385c4eca7949fd95dd1fd48807f7ee/_skbuild/linux-x86_64-3.9/cmake-build/v1.11.1.g95dee.kitware.jobserver-1.tar.gz'
 timeout='none'
 inactivity timeout='none'
 -- Using src='https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz'
 -- Retrying...
 -- Using src='https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz'
 -- Retry after 5 seconds (attempt #2) ...
 -- Using src='https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz'
 -- Retry after 5 seconds (attempt #3) ...
 -- Using src='https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz'
 -- Retry after 15 seconds (attempt #4) ...
 -- Using src='https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz'
 -- Retry after 60 seconds (attempt #5) ...
 -- Using src='https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz'
 CMake Error at _skbuild/linux-x86_64-3.9/cmake-build/download_ninja_source-prefix/src/download_ninja_source-stamp/download-download_ninja_source.cmake:170 (message):
 Each download failed!

 error: downloading 'https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz' failed
 status_code: 28
 status_string: "Timeout was reached"
 log:
 --- LOG BEGIN ---
 timeout on name lookup is not supported
 Trying 20.205.243.166:443...

 connect to 20.205.243.166 port 443 failed: Connection timed out

 Failed to connect to github.com port 443 after 127217 ms: Couldn't connect
 to server

 Closing connection 0



 --- LOG END ---
 error: downloading 'https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz' failed
 status_code: 28
 status_string: "Timeout was reached"
 log:
 --- LOG BEGIN ---
 timeout on name lookup is not supported
 Trying 20.205.243.166:443...

 connect to 20.205.243.166 port 443 failed: Connection timed out

 Failed to connect to github.com port 443 after 127227 ms: Couldn't connect
 to server

 Closing connection 0



 --- LOG END ---
 error: downloading 'https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz' failed
 status_code: 28
 status_string: "Timeout was reached"
 log:
 --- LOG BEGIN ---
 timeout on name lookup is not supported
 Trying 20.205.243.166:443...

 connect to 20.205.243.166 port 443 failed: Connection timed out

 Failed to connect to github.com port 443 after 127335 ms: Couldn't connect
 to server

 Closing connection 0



 --- LOG END ---
 error: downloading 'https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz' failed
 status_code: 28
 status_string: "Timeout was reached"
 log:
 --- LOG BEGIN ---
 timeout on name lookup is not supported
 Trying 20.205.243.166:443...

 connect to 20.205.243.166 port 443 failed: Connection timed out

 Failed to connect to github.com port 443 after 127336 ms: Couldn't connect
 to server

 Closing connection 0



 --- LOG END ---
 error: downloading 'https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz' failed
 status_code: 28
 status_string: "Timeout was reached"
 log:
 --- LOG BEGIN ---
 timeout on name lookup is not supported
 Trying 20.205.243.166:443...

 connect to 20.205.243.166 port 443 failed: Connection timed out

 Failed to connect to github.com port 443 after 127325 ms: Couldn't connect
 to server

 Closing connection 0



 --- LOG END ---
 error: downloading 'https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz' failed
 status_code: 28
 status_string: "Timeout was reached"
 log:
 --- LOG BEGIN ---
 timeout on name lookup is not supported
 Trying 20.205.243.166:443...

 connect to 20.205.243.166 port 443 failed: Connection timed out

 Failed to connect to github.com port 443 after 127380 ms: Couldn't connect
 to server

 Closing connection 0



 --- LOG END ---




 FAILED: download_ninja_source-prefix/src/download_ninja_source-stamp/download_ninja_source-download /tmp/pip-install-v_53kpbe/ninja_0d385c4eca7949fd95dd1fd48807f7ee/_skbuild/linux-x86_64-3.9/cmake-build/download_ninja_source-prefix/src/download_ninja_source-stamp/download_ninja_source-download
 cd /tmp/pip-install-v_53kpbe/ninja_0d385c4eca7949fd95dd1fd48807f7ee && /usr/local/bin/cmake -P /tmp/pip-install-v_53kpbe/ninja_0d385c4eca7949fd95dd1fd48807f7ee/_skbuild/linux-x86_64-3.9/cmake-build/download_ninja_source-prefix/src/download_ninja_source-stamp/download-download_ninja_source.cmake && /usr/local/bin/cmake -P /tmp/pip-install-v_53kpbe/ninja_0d385c4eca7949fd95dd1fd48807f7ee/_skbuild/linux-x86_64-3.9/cmake-build/download_ninja_source-prefix/src/download_ninja_source-stamp/verify-download_ninja_source.cmake && /usr/local/bin/cmake -P /tmp/pip-install-v_53kpbe/ninja_0d385c4eca7949fd95dd1fd48807f7ee/_skbuild/linux-x86_64-3.9/cmake-build/download_ninja_source-prefix/src/download_ninja_source-stamp/extract-download_ninja_source.cmake && /usr/local/bin/cmake -E touch /tmp/pip-install-v_53kpbe/ninja_0d385c4eca7949fd95dd1fd48807f7ee/_skbuild/linux-x86_64-3.9/cmake-build/download_ninja_source-prefix/src/download_ninja_source-stamp/download_ninja_source-download
 ninja: build stopped: subcommand failed.
 Traceback (most recent call last):
 File "/tmp/pip-build-env-q0kpnrhc/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 674, in setup
 cmkr.make(make_args, install_target=cmake_install_target, env=env)
 File "/tmp/pip-build-env-q0kpnrhc/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 697, in make
 self.make_impl(clargs=clargs, config=config, source_dir=source_dir, install_target=install_target, env=env)
 File "/tmp/pip-build-env-q0kpnrhc/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 742, in make_impl
 raise SKBuildError(msg)

 An error occurred while building with CMake.
 Command:
 /usr/local/bin/cmake --build . --target install --config Release --
 Install target:
 install
 Source directory:
 /tmp/pip-install-v_53kpbe/ninja_0d385c4eca7949fd95dd1fd48807f7ee
 Working directory:
 /tmp/pip-install-v_53kpbe/ninja_0d385c4eca7949fd95dd1fd48807f7ee/_skbuild/linux-x86_64-3.9/cmake-build
 Please check the install target is valid and see CMake's output for more information.

 [end of output]

 note: This error originates from a subprocess, and is likely not a problem with pip.
 ERROR: Failed building wheel for ninja
 WARNING: Ignoring --global-option when building py-cpuinfo using PEP 517
 Building wheel for py-cpuinfo (pyproject.toml) ... done
 Created wheel for py-cpuinfo: filename=py_cpuinfo-9.0.0-py3-none-any.whl size=22315 sha256=8b9156706a97208c31e0f1df4bb6775e06422ac57b18622380cba4f97fa05d8f
 Stored in directory: /tmp/pip-ephem-wheel-cache-6cr62s4z/wheels/38/9d/b3/e4ec03bd0ce395add8ee687545908f5d98c446402d4f19d79d
Successfully built deepspeed pydantic hjson py-cpuinfo
Failed to build ninja
ERROR: Could not build wheels for ninja, which is required to install pyproject.toml-based projects

PyPy support?

I've noticed that when running PyPy (7.3.7, 3.7) on my Mac, ninja doesn't have a wheel. We should be distributing PyPy wheels too, I guess? Or should PyPy pick up py2.py3-none wheels (it doesn't seem to)?

Avoid downloading ninja source

I'm trying to package this package as it is a dependency of meson-python. ninja-python-distributions tries to download a ninja source from the web. How can we avoid that and let it use a local version that?

1.11.1 release seems broken (edit: fixed now)

The version released today fails when called like ninja --version and doesn't have a zero return code.

$ ninja --version
1.11.1.git.kitware.jobserver-1
$ echo $? 
245

This makes for example meson fail which calls ninja --version to detect the ninja version.

$ meson _build
The Meson build system
[...]
ERROR: Could not detect Ninja v1.8.2 or newer

This is on Ubuntu 22.04 using Python 3.10.7

Exec-ing ninja when profitable?

As it currently stands, the _program function in src/ninja/__init__.py uses subprocess.call.
When used via the ninja main, it merely waits for the exit-code and then propagates it as its own.
This is visible in that when this wrapper is Ctrl-C-ed, we see the interruption traceback in the Python interpreter.
In addition, a long-running Python process is parked without much remaining purpose.
I was wondering whether it would be a good idea to exec ninja instead of wrap it, when the platform supports it.
What do you think?

Add ninja.__main__

It's weird that after installing ninja in a virtual environment one can invoke it with ./my_venv/bin/ninja but not also with ./my_venv/bin/python -m ninja.

ENVIRONMENT:
Ubuntu 20.04 LTS

STEPS TO REPRODUCE:

  1. python3.8 -m venv my_venv
  2. ./my_venv/bin/python -m pip install --upgrade pip
  3. ./my_venv/bin/python -m pip install --upgrade ninja
  4. ./my_venv/bin/ninja --version
  5. ./my_venv/bin/python -m ninja --version

EXPECTED RESULTS:
I would expect that the ./my_venv/bin/python -m ninja --version execution would produce the same output as that produced by the ./my_venv/bin/ninja --version execution.

OBSERVED RESULTS:
./my_venv/bin/python -m ninja --version outputs /home/nathaniel/temp-temp/my_venv/bin/python: No module named ninja.__main__; 'ninja' is a package and cannot be directly executed.

ERROR: Could not build wheels for ninja

The problem:

I'm trying to install ninja in a Docker container on an arm32v7/debian image which doesn't have a corresponding wheel on PyPi and I am getting an error during the build process.
Currently I'm using python 3.9 and pip 23.3.1
I tried different versions of either of them and got the same result

Dockerfile:

FROM arm32v7/debian:bullseye

ENV DEBIAN_FRONTEND=noninteractive

RUN \
    apt-get update --yes && \
    apt-get install --no-install-recommends --yes \
        build-essential cmake bison flex re2c binutils \
        fakeroot file ca-certificates \
        subversion git \
        binutils-arm-linux-gnueabihf \
        pkg-config libtool automake autoconf \
        python python3-pip zlib1g-dev libxrandr-dev \
        libdrm-dev libxdamage-dev libxcb-glx0-dev libxcb-shm0-dev \
        libx11-xcb-dev libxcb-dri2-0-dev libxcb-dri3-dev \
        libxcb-present-dev libxshmfence-dev libxxf86vm-dev

RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --upgrade setuptools
RUN python3 -m pip install --upgrade wheel
RUN python3 -m pip install --upgrade scikit-build

RUN python3 -m pip install ninja --verbose

Console output:

[+] Building 439.2s (11/11) FINISHED                                                                                                                                                                                                                     docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                     0.0s
 => => transferring dockerfile: 867B                                                                                                                                                                                                                                     0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                          0.0s
 => [internal] load metadata for docker.io/arm32v7/debian:bullseye                                                                                                                                                                                                       1.6s
 => [auth] arm32v7/debian:pull token for registry-1.docker.io                                                                                                                                                                                                            0.0s
 => [1/7] FROM docker.io/arm32v7/debian:bullseye@sha256:bede2623dae269454c5b6dd4af15a10810a5f4ef75963d4eb6531628f98bd633                                                                                                                                                 0.0s
 => CACHED [2/7] RUN     apt-get update --yes &&     apt-get install --no-install-recommends --yes         build-essential cmake bison flex re2c binutils         fakeroot file ca-certificates         subversion git         binutils-arm-linux-gnueabihf         pkg  0.0s
 => CACHED [3/7] RUN python3 -m pip install --upgrade pip                                                                                                                                                                                                                0.0s
 => CACHED [4/7] RUN python3 -m pip install --upgrade setuptools                                                                                                                                                                                                         0.0s
 => CACHED [5/7] RUN python3 -m pip install --upgrade wheel                                                                                                                                                                                                              0.0s
 => CACHED [6/7] RUN python3 -m pip install --upgrade scikit-build                                                                                                                                                                                                       0.0s
 => ERROR [7/7] RUN python3 -m pip install ninja --verbose                                                                                                                                                                                                             437.6s
------                                                                                                                                                                                                                                                                        
 > [7/7] RUN python3 -m pip install ninja --verbose:                                                                                                                                                                                                                          
1.604 Using pip 23.3.1 from /usr/local/lib/python3.9/dist-packages/pip (python 3.9)                                                                                                                                                                                           
2.285 Collecting ninja                                                                                                                                                                                                                                                        
2.584   Downloading ninja-1.11.1.1.tar.gz (132 kB)                                                                                                                                                                                                                            
2.897      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 132.4/132.4 kB 458.9 kB/s eta 0:00:00                                                                                                                                                                                        
2.977   Installing build dependencies: started
2.978   Running command pip subprocess to install build dependencies
5.822   Collecting setuptools>=42
5.831     Using cached setuptools-68.2.2-py3-none-any.whl.metadata (6.3 kB)
5.975   Collecting scikit-build
5.983     Using cached scikit_build-0.17.6-py3-none-any.whl.metadata (14 kB)
6.333   Collecting setuptools-scm[toml]
6.543     Downloading setuptools_scm-8.0.4-py3-none-any.whl.metadata (6.4 kB)
6.973   Collecting packaging>=20 (from setuptools-scm[toml])
6.981     Using cached packaging-23.2-py3-none-any.whl.metadata (3.2 kB)
7.119   Collecting typing-extensions (from setuptools-scm[toml])
7.185     Downloading typing_extensions-4.8.0-py3-none-any.whl.metadata (3.0 kB)
7.318   Collecting tomli>=1 (from setuptools-scm[toml])
7.324     Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
7.583   Collecting distro (from scikit-build)
7.590     Using cached distro-1.8.0-py3-none-any.whl (20 kB)
7.806   Collecting wheel>=0.32.0 (from scikit-build)
7.813     Using cached wheel-0.41.3-py3-none-any.whl.metadata (2.2 kB)
7.880   Using cached setuptools-68.2.2-py3-none-any.whl (807 kB)
7.893   Using cached scikit_build-0.17.6-py3-none-any.whl (84 kB)
7.900   Using cached packaging-23.2-py3-none-any.whl (53 kB)
7.908   Using cached wheel-0.41.3-py3-none-any.whl (65 kB)
7.958   Downloading setuptools_scm-8.0.4-py3-none-any.whl (42 kB)
8.026      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.1/42.1 kB 686.9 kB/s eta 0:00:00
8.084   Downloading typing_extensions-4.8.0-py3-none-any.whl (31 kB)
8.813   Installing collected packages: wheel, typing-extensions, tomli, setuptools, packaging, distro, setuptools-scm, scikit-build
11.24   Successfully installed distro-1.8.0 packaging-23.2 scikit-build-0.17.6 setuptools-68.2.2 setuptools-scm-8.0.4 tomli-2.0.1 typing-extensions-4.8.0 wheel-0.41.3
11.24   WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
11.36   Installing build dependencies: finished with status 'done'
11.37   Getting requirements to build wheel: started
11.37   Running command Getting requirements to build wheel
12.27   /tmp/pip-build-env-174q2c58/overlay/lib/python3.9/site-packages/setuptools_scm/git.py:308: UserWarning: git archive did not support describe output
12.27     warnings.warn("git archive did not support describe output")
12.27   /tmp/pip-build-env-174q2c58/overlay/lib/python3.9/site-packages/setuptools_scm/git.py:327: UserWarning: unprocessed git archival found (no export subst applied)
12.28     warnings.warn("unprocessed git archival found (no export subst applied)")
12.41   running egg_info
12.41   writing src/ninja.egg-info/PKG-INFO
12.42   writing dependency_links to src/ninja.egg-info/dependency_links.txt
12.42   writing entry points to src/ninja.egg-info/entry_points.txt
12.43   writing requirements to src/ninja.egg-info/requires.txt
12.43   writing top-level names to src/ninja.egg-info/top_level.txt
12.49   ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
12.49   reading manifest file 'src/ninja.egg-info/SOURCES.txt'
12.50   reading manifest template 'MANIFEST.in'
12.50   warning: no previously-included files matching '*' found under directory '_skbuild'
12.50   warning: no previously-included files matching '*' found under directory 'Ninja-src'
12.50   warning: no files found matching 'versioneer.py'
12.50   adding license file 'LICENSE_Apache_20'
12.50   adding license file 'AUTHORS.rst'
12.51   writing manifest file 'src/ninja.egg-info/SOURCES.txt'
12.56   Getting requirements to build wheel: finished with status 'done'
12.57   Preparing metadata (pyproject.toml): started
12.57   Running command Preparing metadata (pyproject.toml)
13.48   /tmp/pip-build-env-174q2c58/overlay/lib/python3.9/site-packages/setuptools_scm/git.py:308: UserWarning: git archive did not support describe output
13.48     warnings.warn("git archive did not support describe output")
13.48   /tmp/pip-build-env-174q2c58/overlay/lib/python3.9/site-packages/setuptools_scm/git.py:327: UserWarning: unprocessed git archival found (no export subst applied)
13.48     warnings.warn("unprocessed git archival found (no export subst applied)")
13.59   running dist_info
13.60   creating /tmp/pip-modern-metadata-j639jt5h/ninja.egg-info
13.60   writing /tmp/pip-modern-metadata-j639jt5h/ninja.egg-info/PKG-INFO
13.61   writing dependency_links to /tmp/pip-modern-metadata-j639jt5h/ninja.egg-info/dependency_links.txt
13.61   writing entry points to /tmp/pip-modern-metadata-j639jt5h/ninja.egg-info/entry_points.txt
13.62   writing requirements to /tmp/pip-modern-metadata-j639jt5h/ninja.egg-info/requires.txt
13.62   writing top-level names to /tmp/pip-modern-metadata-j639jt5h/ninja.egg-info/top_level.txt
13.62   writing manifest file '/tmp/pip-modern-metadata-j639jt5h/ninja.egg-info/SOURCES.txt'
13.67   ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
13.68   reading manifest file '/tmp/pip-modern-metadata-j639jt5h/ninja.egg-info/SOURCES.txt'
13.68   reading manifest template 'MANIFEST.in'
13.68   warning: no previously-included files matching '*' found under directory '_skbuild'
13.68   warning: no previously-included files matching '*' found under directory 'Ninja-src'
13.68   warning: no files found matching 'versioneer.py'
13.68   adding license file 'LICENSE_Apache_20'
13.69   adding license file 'AUTHORS.rst'
13.69   writing manifest file '/tmp/pip-modern-metadata-j639jt5h/ninja.egg-info/SOURCES.txt'
13.69   creating '/tmp/pip-modern-metadata-j639jt5h/ninja-1.11.1.1.dist-info'
13.75   Preparing metadata (pyproject.toml): finished with status 'done'
13.79 Building wheels for collected packages: ninja
13.79   Building wheel for ninja (pyproject.toml): started
13.80   Running command Building wheel for ninja (pyproject.toml)
14.69   /tmp/pip-build-env-174q2c58/overlay/lib/python3.9/site-packages/setuptools_scm/git.py:308: UserWarning: git archive did not support describe output
14.69     warnings.warn("git archive did not support describe output")
14.69   /tmp/pip-build-env-174q2c58/overlay/lib/python3.9/site-packages/setuptools_scm/git.py:327: UserWarning: unprocessed git archival found (no export subst applied)
14.69     warnings.warn("unprocessed git archival found (no export subst applied)")
14.84 
14.84 
14.84   --------------------------------------------------------------------------------
14.85   -- Trying 'Ninja' generator
14.85   --------------------------------
14.85   ---------------------------
14.85   ----------------------
14.85   -----------------
14.85   ------------
14.85   -------
14.85   --
14.93   Not searching for unused variables given on the command line.
15.02   CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
15.02   -- Configuring incomplete, errors occurred!
15.02   See also "/tmp/pip-install-db8u1c7g/ninja_caee880361904b2eb54024d544948cce/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
15.04   --
15.04   -------
15.04   ------------
15.04   -----------------
15.04   ----------------------
15.04   ---------------------------
15.04   --------------------------------
15.04   -- Trying 'Ninja' generator - failure
15.04   --------------------------------------------------------------------------------
15.04 
15.04 
15.04 
15.05   --------------------------------------------------------------------------------
15.05   -- Trying 'Unix Makefiles' generator
15.05   --------------------------------
15.05   ---------------------------
15.05   ----------------------
15.05   -----------------
15.05   ------------
15.05   -------
15.05   --
15.13   Not searching for unused variables given on the command line.
15.85   -- The C compiler identification is GNU 10.2.1
15.92   -- Detecting C compiler ABI info
16.74   -- Detecting C compiler ABI info - done
16.84   -- Check for working C compiler: /usr/bin/cc - skipped
16.84   -- Detecting C compile features
16.84   -- Detecting C compile features - done
17.50   -- The CXX compiler identification is GNU 10.2.1
17.56   -- Detecting CXX compiler ABI info
18.37   -- Detecting CXX compiler ABI info - done
18.46   -- Check for working CXX compiler: /usr/bin/c++ - skipped
18.47   -- Detecting CXX compile features
18.47   -- Detecting CXX compile features - done
18.48   -- Configuring done
18.48   -- Generating done
18.49   -- Build files have been written to: /tmp/pip-install-db8u1c7g/ninja_caee880361904b2eb54024d544948cce/_cmake_test_compile/build
18.50   --
18.50   -------
18.50   ------------
18.50   -----------------
18.50   ----------------------
18.50   ---------------------------
18.50   --------------------------------
18.50   -- Trying 'Unix Makefiles' generator - success
18.50   --------------------------------------------------------------------------------
18.50 
18.51   Configuring Project
18.51     Working directory:
18.51       /tmp/pip-install-db8u1c7g/ninja_caee880361904b2eb54024d544948cce/_skbuild/linux-armv7l-3.9/cmake-build
18.51     Command:
18.51       /usr/bin/cmake /tmp/pip-install-db8u1c7g/ninja_caee880361904b2eb54024d544948cce -G 'Unix Makefiles' --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-db8u1c7g/ninja_caee880361904b2eb54024d544948cce/_skbuild/linux-armv7l-3.9/cmake-install -DPYTHON_VERSION_STRING:STRING=3.9.2 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-174q2c58/overlay/lib/python3.9/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.9 -DPython_EXECUTABLE:PATH=/usr/bin/python3 -DPython_ROOT_DIR:PATH=/usr -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/usr/include/python3.9 -DPython3_EXECUTABLE:PATH=/usr/bin/python3 -DPython3_ROOT_DIR:PATH=/usr -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/usr/include/python3.9 -DCMAKE_BUILD_TYPE:STRING=Release
18.51 
18.59   Not searching for unused variables given on the command line.
19.19   -- The C compiler identification is GNU 10.2.1
19.80   -- The CXX compiler identification is GNU 10.2.1
19.86   -- Detecting C compiler ABI info
20.64   -- Detecting C compiler ABI info - done
20.73   -- Check for working C compiler: /usr/bin/cc - skipped
20.73   -- Detecting C compile features
20.73   -- Detecting C compile features - done
20.75   -- Detecting CXX compiler ABI info
21.54   -- Detecting CXX compiler ABI info - done
21.63   -- Check for working CXX compiler: /usr/bin/c++ - skipped
21.63   -- Detecting CXX compile features
21.63   -- Detecting CXX compile features - done
21.64   -- *********************************************
21.64   -- Ninja Python Distribution
21.64   --
21.64   --   BUILD_VERBOSE             : OFF
21.64   --   RUN_NINJA_TEST            : ON
21.64   --
21.64   --   ARCHIVE_DOWNLOAD_DIR      : /tmp/pip-install-db8u1c7g/ninja_caee880361904b2eb54024d544948cce/_skbuild/linux-armv7l-3.9/cmake-build
21.64   --
21.64   --     src_archive             : unix_source
21.64   --     <src_archive>_url       : https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz
21.65   --     <src_archive>_sha256    : 7ba84551f5b315b4270dc7c51adef5dff83a2154a3665a6c9744245c122dd0db
21.65   -- *********************************************
21.80   -- download_ninja_source - URL: https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz
21.80   -- SuperBuild - CMAKE_BUILD_TYPE: Release
21.90   -- Configuring done
21.93   -- Generating done
21.94   -- Build files have been written to: /tmp/pip-install-db8u1c7g/ninja_caee880361904b2eb54024d544948cce/_skbuild/linux-armv7l-3.9/cmake-build
22.32   Scanning dependencies of target download_ninja_source
22.41   [  5%] Creating directories for 'download_ninja_source'
22.87   [ 11%] Performing download step (download, verify and extract) for 'download_ninja_source'
22.95   -- Downloading...
22.96      dst='/tmp/pip-install-db8u1c7g/ninja_caee880361904b2eb54024d544948cce/_skbuild/linux-armv7l-3.9/cmake-build/v1.11.1.g95dee.kitware.jobserver-1.tar.gz'
22.96      timeout='none'
22.96   -- Using src='https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz'
26.44   -- verifying file...
26.44          file='/tmp/pip-install-db8u1c7g/ninja_caee880361904b2eb54024d544948cce/_skbuild/linux-armv7l-3.9/cmake-build/v1.11.1.g95dee.kitware.jobserver-1.tar.gz'
26.45   -- Downloading... done
26.65   -- extracting...
26.65        src='/tmp/pip-install-db8u1c7g/ninja_caee880361904b2eb54024d544948cce/_skbuild/linux-armv7l-3.9/cmake-build/v1.11.1.g95dee.kitware.jobserver-1.tar.gz'
26.65        dst='/tmp/pip-install-db8u1c7g/ninja_caee880361904b2eb54024d544948cce/Ninja-src'
26.65   -- extracting... [tar xfz]
26.77   -- extracting... [analysis]
26.77   -- extracting... [rename]
26.77   -- extracting... [clean up]
26.77   -- extracting... done
26.92   [ 16%] No update step for 'download_ninja_source'
27.10   [ 22%] No patch step for 'download_ninja_source'
27.29   [ 27%] No configure step for 'download_ninja_source'
27.50   [ 33%] No build step for 'download_ninja_source'
27.72   [ 38%] No install step for 'download_ninja_source'
27.93   [ 44%] Completed 'download_ninja_source'
28.17   [ 44%] Built target download_ninja_source
28.30   Scanning dependencies of target build_ninja
28.41   [ 50%] Creating directories for 'build_ninja'
28.90   [ 55%] No download step for 'build_ninja'
29.12   [ 61%] No update step for 'build_ninja'
29.33   [ 66%] No patch step for 'build_ninja'
29.51   [ 72%] Performing configure step for 'build_ninja'
29.60   loading initial cache file /tmp/pip-install-db8u1c7g/ninja_caee880361904b2eb54024d544948cce/_skbuild/linux-armv7l-3.9/cmake-build/build_ninja-prefix/tmp/build_ninja-cache-Release.cmake
30.32   -- The C compiler identification is GNU 10.2.1
30.95   -- The CXX compiler identification is GNU 10.2.1
31.02   -- Detecting C compiler ABI info
31.83   -- Detecting C compiler ABI info - done
31.92   -- Check for working C compiler: /usr/bin/cc - skipped
31.92   -- Detecting C compile features
31.93   -- Detecting C compile features - done
31.95   -- Detecting CXX compiler ABI info
32.84   -- Detecting CXX compiler ABI info - done
32.93   -- Check for working CXX compiler: /usr/bin/c++ - skipped
32.93   -- Detecting CXX compile features
32.94   -- Detecting CXX compile features - done
37.96   -- IPO / LTO enabled
37.97   -- Performing Test flag_no_deprecated
38.72   -- Performing Test flag_no_deprecated - Success
38.72   -- Performing Test flag_color_diag
39.47   -- Performing Test flag_color_diag - Success
39.57   -- Looking for fork
40.34   -- Looking for fork - found
40.34   -- Looking for pipe
41.10   -- Looking for pipe - found
41.15   -- Configuring done
41.35   -- Generating done
41.36   -- Build files have been written to: /tmp/pip-install-db8u1c7g/ninja_caee880361904b2eb54024d544948cce/_skbuild/linux-armv7l-3.9/cmake-build/Ninja-build
41.51   [ 77%] Performing build step for 'build_ninja'
41.82   [  1%] Generating lexer.cc
41.95   [  2%] Generating depfile_parser.cc
42.08   Scanning dependencies of target libninja-re2c
42.18   [  4%] Building CXX object CMakeFiles/libninja-re2c.dir/depfile_parser.cc.o
44.05   [  5%] Building CXX object CMakeFiles/libninja-re2c.dir/lexer.cc.o
46.17   [  5%] Built target libninja-re2c
46.31   Scanning dependencies of target libninja
46.42   [  7%] Building CXX object CMakeFiles/libninja.dir/src/build_log.cc.o
50.01   [  8%] Building CXX object CMakeFiles/libninja.dir/src/build.cc.o
55.84   [ 10%] Building CXX object CMakeFiles/libninja.dir/src/clean.cc.o
59.49   [ 11%] Building CXX object CMakeFiles/libninja.dir/src/clparser.cc.o
61.63   [ 13%] Building CXX object CMakeFiles/libninja.dir/src/dyndep.cc.o
64.66   [ 14%] Building CXX object CMakeFiles/libninja.dir/src/dyndep_parser.cc.o
67.94   [ 15%] Building CXX object CMakeFiles/libninja.dir/src/debug_flags.cc.o
68.23   [ 17%] Building CXX object CMakeFiles/libninja.dir/src/deps_log.cc.o
71.21   [ 18%] Building CXX object CMakeFiles/libninja.dir/src/disk_interface.cc.o
73.30   [ 20%] Building CXX object CMakeFiles/libninja.dir/src/edit_distance.cc.o
74.99   [ 21%] Building CXX object CMakeFiles/libninja.dir/src/eval_env.cc.o
77.91   [ 23%] Building CXX object CMakeFiles/libninja.dir/src/graph.cc.o
82.09   [ 24%] Building CXX object CMakeFiles/libninja.dir/src/graphviz.cc.o
84.75   [ 26%] Building CXX object CMakeFiles/libninja.dir/src/json.cc.o
86.13   [ 27%] Building CXX object CMakeFiles/libninja.dir/src/line_printer.cc.o
87.81   [ 28%] Building CXX object CMakeFiles/libninja.dir/src/manifest_parser.cc.o
91.32   [ 30%] Building CXX object CMakeFiles/libninja.dir/src/metrics.cc.o
93.08   [ 31%] Building CXX object CMakeFiles/libninja.dir/src/missing_deps.cc.o
97.68   [ 33%] Building CXX object CMakeFiles/libninja.dir/src/parser.cc.o
99.55   [ 34%] Building CXX object CMakeFiles/libninja.dir/src/state.cc.o
103.4   [ 36%] Building CXX object CMakeFiles/libninja.dir/src/status.cc.o
106.4   [ 37%] Building CXX object CMakeFiles/libninja.dir/src/string_piece_util.cc.o
108.3   [ 39%] Building CXX object CMakeFiles/libninja.dir/src/tokenpool-gnu-make.cc.o
109.8   [ 40%] Building CXX object CMakeFiles/libninja.dir/src/util.cc.o
113.6   [ 42%] Building CXX object CMakeFiles/libninja.dir/src/version.cc.o
115.0   [ 43%] Building CXX object CMakeFiles/libninja.dir/src/subprocess-posix.cc.o
117.2   [ 44%] Building CXX object CMakeFiles/libninja.dir/src/tokenpool-gnu-make-posix.cc.o
117.9   [ 44%] Built target libninja
118.0   Scanning dependencies of target manifest_parser_perftest
118.1   [ 46%] Building CXX object CMakeFiles/manifest_parser_perftest.dir/src/manifest_parser_perftest.cc.o
121.1   [ 47%] Linking CXX executable manifest_parser_perftest
133.3   [ 47%] Built target manifest_parser_perftest
133.4   Scanning dependencies of target hash_collision_bench
133.5   [ 49%] Building CXX object CMakeFiles/hash_collision_bench.dir/src/hash_collision_bench.cc.o
135.6   [ 50%] Linking CXX executable hash_collision_bench
138.3   [ 50%] Built target hash_collision_bench
138.4   Scanning dependencies of target depfile_parser_perftest
138.5   [ 52%] Building CXX object CMakeFiles/depfile_parser_perftest.dir/src/depfile_parser_perftest.cc.o
140.3   [ 53%] Linking CXX executable depfile_parser_perftest
143.2   [ 53%] Built target depfile_parser_perftest
143.4   Scanning dependencies of target clparser_perftest
143.5   [ 55%] Building CXX object CMakeFiles/clparser_perftest.dir/src/clparser_perftest.cc.o
145.2   [ 56%] Linking CXX executable clparser_perftest
148.5   [ 56%] Built target clparser_perftest
148.6   Scanning dependencies of target canon_perftest
148.7   [ 57%] Building CXX object CMakeFiles/canon_perftest.dir/src/canon_perftest.cc.o
150.3   [ 59%] Linking CXX executable canon_perftest
152.7   [ 59%] Built target canon_perftest
152.8   Scanning dependencies of target ninja_test
152.9   [ 60%] Building CXX object CMakeFiles/ninja_test.dir/src/build_log_test.cc.o
156.3   [ 62%] Building CXX object CMakeFiles/ninja_test.dir/src/build_test.cc.o
166.6   [ 63%] Building CXX object CMakeFiles/ninja_test.dir/src/clean_test.cc.o
170.9   [ 65%] Building CXX object CMakeFiles/ninja_test.dir/src/clparser_test.cc.o
173.8   [ 66%] Building CXX object CMakeFiles/ninja_test.dir/src/depfile_parser_test.cc.o
177.3   [ 68%] Building CXX object CMakeFiles/ninja_test.dir/src/deps_log_test.cc.o
180.8   [ 69%] Building CXX object CMakeFiles/ninja_test.dir/src/disk_interface_test.cc.o
184.5   [ 71%] Building CXX object CMakeFiles/ninja_test.dir/src/dyndep_parser_test.cc.o
188.3   [ 72%] Building CXX object CMakeFiles/ninja_test.dir/src/edit_distance_test.cc.o
190.9   [ 73%] Building CXX object CMakeFiles/ninja_test.dir/src/graph_test.cc.o
195.9   [ 75%] Building CXX object CMakeFiles/ninja_test.dir/src/json_test.cc.o
198.6   [ 76%] Building CXX object CMakeFiles/ninja_test.dir/src/lexer_test.cc.o
201.3   [ 78%] Building CXX object CMakeFiles/ninja_test.dir/src/manifest_parser_test.cc.o
205.6   [ 79%] Building CXX object CMakeFiles/ninja_test.dir/src/missing_deps_test.cc.o
209.4   [ 81%] Building CXX object CMakeFiles/ninja_test.dir/src/ninja_test.cc.o
212.1   [ 82%] Building CXX object CMakeFiles/ninja_test.dir/src/state_test.cc.o
215.1   [ 84%] Building CXX object CMakeFiles/ninja_test.dir/src/string_piece_util_test.cc.o
218.0   [ 85%] Building CXX object CMakeFiles/ninja_test.dir/src/subprocess_test.cc.o
221.1   [ 86%] Building CXX object CMakeFiles/ninja_test.dir/src/test.cc.o
225.2   [ 88%] Building CXX object CMakeFiles/ninja_test.dir/src/tokenpool_test.cc.o
227.9   [ 89%] Building CXX object CMakeFiles/ninja_test.dir/src/util_test.cc.o
230.8   [ 91%] Linking CXX executable ninja_test
375.9   [ 91%] Built target ninja_test
376.0   [ 92%] Generating build/browse_py.h
376.3   Scanning dependencies of target ninja
376.4   [ 94%] Building CXX object CMakeFiles/ninja.dir/src/ninja.cc.o
382.0   [ 95%] Building CXX object CMakeFiles/ninja.dir/src/browse.cc.o
383.2   [ 97%] Linking CXX executable ninja
420.5   [ 97%] Built target ninja
420.6   Scanning dependencies of target build_log_perftest
420.7   [ 98%] Building CXX object CMakeFiles/build_log_perftest.dir/src/build_log_perftest.cc.o
423.6   [100%] Linking CXX executable build_log_perftest
435.9   [100%] Built target build_log_perftest
436.0   [ 83%] Stripping CMake executables
436.1   [ 88%] Running Ninja test suite
437.3   gmake[2]: *** [CMakeFiles/build_ninja.dir/build.make:143: build_ninja-prefix/src/build_ninja-stamp/build_ninja-run_ninja_test_suite] Error 130
437.3   gmake[1]: *** [CMakeFiles/Makefile2:97: CMakeFiles/build_ninja.dir/all] Error 2
437.3   gmake: *** [Makefile:149: all] Error 2
437.3   Traceback (most recent call last):
437.3     File "/tmp/pip-build-env-174q2c58/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 674, in setup
437.3       cmkr.make(make_args, install_target=cmake_install_target, env=env)
437.3     File "/tmp/pip-build-env-174q2c58/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 697, in make
437.3       self.make_impl(clargs=clargs, config=config, source_dir=source_dir, install_target=install_target, env=env)
437.3     File "/tmp/pip-build-env-174q2c58/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 742, in make_impl
437.3       raise SKBuildError(msg)
437.3 
437.3   An error occurred while building with CMake.
437.3     Command:
437.3       /usr/bin/cmake --build . --target install --config Release --
437.3     Install target:
437.3       install
437.3     Source directory:
437.3       /tmp/pip-install-db8u1c7g/ninja_caee880361904b2eb54024d544948cce
437.3     Working directory:
437.3       /tmp/pip-install-db8u1c7g/ninja_caee880361904b2eb54024d544948cce/_skbuild/linux-armv7l-3.9/cmake-build
437.3   Please check the install target is valid and see CMake's output for more information.
437.3 
437.4   error: subprocess-exited-with-error
437.4   
437.4   × Building wheel for ninja (pyproject.toml) did not run successfully.
437.4   │ exit code: 1
437.4   ╰─> See above for output.
437.4   
437.4   note: This error originates from a subprocess, and is likely not a problem with pip.
437.4   full command: /usr/bin/python3 /usr/local/lib/python3.9/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmpdw_4oh6w
437.4   cwd: /tmp/pip-install-db8u1c7g/ninja_caee880361904b2eb54024d544948cce
437.4   Building wheel for ninja (pyproject.toml): finished with status 'error'
437.4   ERROR: Failed building wheel for ninja
437.4 Failed to build ninja
437.4 ERROR: Could not build wheels for ninja, which is required to install pyproject.toml-based projects
------
Dockerfile:23
--------------------
  21 |     RUN python3 -m pip install --upgrade scikit-build
  22 |     
  23 | >>> RUN python3 -m pip install ninja --verbose
--------------------
ERROR: failed to solve: process "/bin/sh -c python3 -m pip install ninja --verbose" did not complete successfully: exit code: 1

ninja 1.9.0 has been released

Hello!

I came to discover the other day that ninja 1.9.0 was released on January 31st. The main site has not been updated and you wouldn't know a release had taken place unless someone had gone to check. I figured I'd let someone know, as the latest release brings better performance from CMake and also ANSI color output support on Windows 🙂.

Thank you!

Support building on AIX

Attempting to build a ninja wheel on AIX using ninja-python-distributions fails:

(PyDevenv) $ pip -install . -vvv --no-build-isolation

Usage:   
  pip <command> [options]

no such option: -i
(PyDevenv) $ pip install . -vvv --no-build-isolation 
Using pip 23.1.2 from /home/ben/PyDevenv/lib/python3.9/site-packages/pip (python 3.9)
Non-user install because user site-packages disabled
Created temporary directory: /tmp/pip-build-tracker-d81mqio_
Initialized build tracking at /tmp/pip-build-tracker-d81mqio_
Created build tracker: /tmp/pip-build-tracker-d81mqio_
Entered build tracker: /tmp/pip-build-tracker-d81mqio_
Created temporary directory: /tmp/pip-install-2w9q21_w
Created temporary directory: /tmp/pip-ephem-wheel-cache-bomz0y6m
Processing /home/ben/ninja-python-distributions
  Added file:///home/ben/ninja-python-distributions to build tracker '/tmp/pip-build-tracker-d81mqio_'
  Created temporary directory: /tmp/pip-modern-metadata-hzo9m60v
  Running command Preparing metadata (pyproject.toml)
  running dist_info
  creating /tmp/pip-modern-metadata-hzo9m60v/ninja.egg-info
  writing /tmp/pip-modern-metadata-hzo9m60v/ninja.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-modern-metadata-hzo9m60v/ninja.egg-info/dependency_links.txt
  writing entry points to /tmp/pip-modern-metadata-hzo9m60v/ninja.egg-info/entry_points.txt
  writing requirements to /tmp/pip-modern-metadata-hzo9m60v/ninja.egg-info/requires.txt
  writing top-level names to /tmp/pip-modern-metadata-hzo9m60v/ninja.egg-info/top_level.txt
  writing manifest file '/tmp/pip-modern-metadata-hzo9m60v/ninja.egg-info/SOURCES.txt'
  reading manifest file '/tmp/pip-modern-metadata-hzo9m60v/ninja.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files matching '*' found under directory '_skbuild'
  warning: no previously-included files matching '*' found under directory 'Ninja-src'
  warning: no files found matching 'versioneer.py'
  adding license file 'LICENSE_Apache_20'
  adding license file 'AUTHORS.rst'
  writing manifest file '/tmp/pip-modern-metadata-hzo9m60v/ninja.egg-info/SOURCES.txt'
  creating '/tmp/pip-modern-metadata-hzo9m60v/ninja.dist-info'
  Preparing metadata (pyproject.toml) ... done
  Source in /home/ben/ninja-python-distributions has version 0.0.0, which satisfies requirement ninja==0.0.0 from file:///home/ben/ninja-python-distributions
  Removed ninja==0.0.0 from file:///home/ben/ninja-python-distributions from build tracker '/tmp/pip-build-tracker-d81mqio_'
Created temporary directory: /tmp/pip-unpack-570005ka
Building wheels for collected packages: ninja
  Created temporary directory: /tmp/pip-wheel-qjukbymy
  Destination directory: /tmp/pip-wheel-qjukbymy
  Running command Building wheel for ninja (pyproject.toml)
  Target "CMakeFiles/download_ninja_source.dir/build" is up to date.
  [ 44%] Built target download_ninja_source
  [ 50%] Performing build step for 'build_ninja'
  Target "CMakeFiles/libninja-re2c.dir/build" is up to date.
  [  2%] Built target libninja-re2c
  [  4%] Building CXX object CMakeFiles/libninja.dir/src/build_log.cc.o
  "/home/ben/ninja-python-distributions/Ninja-src/src/hash_map.h", line 94.10: 1540-0836 (S) The #include file <ext/hash_map> is not found.
  make: 1254-004 The error code from the last command is 1.


  Stop.
  make: 1254-004 The error code from the last command is 2.


  Stop.
  make: 1254-004 The error code from the last command is 2.


  Stop.
  make: 1254-004 The error code from the last command is 2.


  Stop.
  make: 1254-004 The error code from the last command is 2.


  Stop.
  make: 1254-004 The error code from the last command is 2.


  Stop.
  Traceback (most recent call last):
    File "/home/ben/PyDevenv/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 674, in setup
      cmkr.make(make_args, install_target=cmake_install_target, env=env)
    File "/home/ben/PyDevenv/lib/python3.9/site-packages/skbuild/cmaker.py", line 697, in make
      self.make_impl(clargs=clargs, config=config, source_dir=source_dir, install_target=install_target, env=env)
    File "/home/ben/PyDevenv/lib/python3.9/site-packages/skbuild/cmaker.py", line 742, in make_impl
      raise SKBuildError(msg)

  An error occurred while building with CMake.
    Command:
      /usr/local/bin/cmake --build . --target install --config Release --
    Install target:
      install
    Source directory:
      /home/ben/ninja-python-distributions
    Working directory:
      /home/ben/ninja-python-distributions/_skbuild/aix-7301-9988-64-3.9/cmake-build
  Please check the install target is valid and see CMake's output for more information.

  error: subprocess-exited-with-error
  
  Building wheel for ninja (pyproject.toml) did not run successfully.
  exit code: 1
  
  See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /home/ben/PyDevenv/bin/python3 /home/ben/PyDevenv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmpxukan2jt
  cwd: /home/ben/ninja-python-distributions
  Building wheel for ninja (pyproject.toml) ... error
  ERROR: Failed building wheel for ninja
Failed to build ninja
ERROR: Could not build wheels for ninja, which is required to install pyproject.toml-based projects
Exception information:
Traceback (most recent call last):
  File "/home/ben/PyDevenv/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 169, in exc_logging_wrapper
    status = run_func(*args)
  File "/home/ben/PyDevenv/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 248, in wrapper
    return func(self, options, args)
  File "/home/ben/PyDevenv/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 426, in run
    raise InstallationError(
pip._internal.exceptions.InstallationError: Could not build wheels for ninja, which is required to install pyproject.toml-based projects
Remote version of pip: 23.1.2
Local version of pip:  23.1.2
Was pip installed by pip? True
Removed build tracker: '/tmp/pip-build-tracker-d81mqio_'

Some details:

  • Patches have been merged to scikit-build to enable this.
  • This is AIX 7.3 (7300-01-01).
  • The compiler in use is XL C 16.1, but I also have 17.1 as an option.
  • CMake is version 3.26.4
  • The header ext/hash_map is available in /opt/IBM/xlC/16.1.0/include2/c++/ext/hash_map

I could use a little help in determining, is this a problem with ninja-python-distributions, ninja itself, or CMake?

ninja on ARM processor

tried to install ninja on a AWS ARM instance (a1.4xlarge). meson works fine, pip3 works fine, ninja fails. OS is ubuntu16. Probably also related to #27 also loading scikit-build and cmake before did not work. tnx.

sudo -H pip3 install scikit-build
sudo -H pip3 install "cmake==3.6.3"
sudo -H  pip3 install meson
Requirement already satisfied: meson in /usr/local/lib/python3.5/dist-packages (0.53.2)
---


 sudo -H pip3 install ninja
Collecting ninja
  Using cached ninja-1.9.0.post1.tar.gz (25 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qwm9exys/ninja/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qwm9exys/ninja/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-qwm9exys/ninja/pip-egg-info
         cwd: /tmp/pip-install-qwm9exys/ninja/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-qwm9exys/ninja/setup.py", line 7, in <module>
        from skbuild import setup
    ImportError: No module named 'skbuild'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.


----
sudo  pip3 install ninja
WARNING: The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting ninja
  Downloading ninja-1.9.0.post1.tar.gz (25 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-szjzp_04/ninja/setup.py'"'"'; __file__='"'"'/tmp/pip-install-szjzp_04/ninja/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-szjzp_04/ninja/pip-egg-info
         cwd: /tmp/pip-install-szjzp_04/ninja/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-szjzp_04/ninja/setup.py", line 7, in <module>
        from skbuild import setup
    ImportError: No module named 'skbuild'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
----
 pip3 install ninja
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
Collecting ninja
  Downloading ninja-1.9.0.post1.tar.gz (25 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-l7j_g1jq/ninja/setup.py'"'"'; __file__='"'"'/tmp/pip-install-l7j_g1jq/ninja/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-l7j_g1jq/ninja/pip-egg-info
         cwd: /tmp/pip-install-l7j_g1jq/ninja/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-l7j_g1jq/ninja/setup.py", line 7, in <module>
        from skbuild import setup
    ImportError: No module named 'skbuild'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

---
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.6 LTS
Release:        16.04
Codename:       xenial
---
 lscpu
Architecture:          aarch64
Byte Order:            Little Endian
CPU(s):                16
On-line CPU(s) list:   0-15
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             4
NUMA node(s):          1
L1d cache:             32K
L1i cache:             48K
L2 cache:              2048K
NUMA node0 CPU(s):     0-15
---

after install of scikit-build

sudo -H pip3 install scikit-build

 sudo -H  pip3 install ninja
Collecting ninja
  Using cached ninja-1.9.0.post1.tar.gz (25 kB)
Building wheels for collected packages: ninja
  Building wheel for ninja (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-likc8w01/ninja/setup.py'"'"'; __file__='"'"'/tmp/pip-install-likc8w01/ninja/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-n6jnxwz2
       cwd: /tmp/pip-install-likc8w01/ninja/
  Complete output (82 lines):


  --------------------------------------------------------------------------------
  -- Trying "Ninja" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  Not searching for unused variables given on the command line.
  CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
  -- Configuring incomplete, errors occurred!
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Ninja" generator - failure
  --------------------------------------------------------------------------------



  --------------------------------------------------------------------------------
  -- Trying "Unix Makefiles" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  Not searching for unused variables given on the command line.
  -- The C compiler identification is GNU 5.4.0
  -- Check for working C compiler: /usr/bin/cc
  -- Check for working C compiler: /usr/bin/cc -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- The CXX compiler identification is GNU 5.4.0
  -- Check for working CXX compiler: /usr/bin/c++
  -- Check for working CXX compiler: /usr/bin/c++ -- works
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /tmp/pip-install-likc8w01/ninja/_cmake_test_compile/build
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Unix Makefiles" generator - success
  --------------------------------------------------------------------------------

  CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
    CMake 3.6 or higher is required.  You are running version 3.5.1


  -- Configuring incomplete, errors occurred!
  Traceback (most recent call last):
    File "/usr/local/lib/python3.5/dist-packages/skbuild/setuptools_wrap.py", line 574, in setup
      languages=cmake_languages
    File "/usr/local/lib/python3.5/dist-packages/skbuild/cmaker.py", line 232, in configure
      os.path.abspath(CMAKE_BUILD_DIR())))

  An error occurred while configuring with CMake.
    Command:
      "cmake" "/tmp/pip-install-likc8w01/ninja" "-G" "Unix Makefiles" "-DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-likc8w01/ninja/_skbuild/linux-aarch64-3.5/cmake-install" "-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3" "-DPYTHON_VERSION_STRING:STRING=3.5.2" "-DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.5m" "-DPYTHON_LIBRARY:FILEPATH=/usr/lib/aarch64-linux-gnu/libpython3.5m.so" "-DSKBUILD:BOOL=TRUE" "-DCMAKE_MODULE_PATH:PATH=/usr/local/lib/python3.5/dist-packages/skbuild/resources/cmake" "-DCMAKE_BUILD_TYPE:STRING=Release"
    Source directory:
      /tmp/pip-install-likc8w01/ninja
    Working directory:
      /tmp/pip-install-likc8w01/ninja/_skbuild/linux-aarch64-3.5/cmake-build
  Please see CMake's output for more information.
  ----------------------------------------
  ERROR: Failed building wheel for ninja
  Running setup.py clean for ninja
Failed to build ninja
Installing collected packages: ninja
    Running setup.py install for ninja ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-likc8w01/ninja/setup.py'"'"'; __file__='"'"'/tmp/pip-install-likc8w01/ninja/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ewi052c5/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.5/ninja
         cwd: /tmp/pip-install-likc8w01/ninja/
    Complete output (82 lines):


    --------------------------------------------------------------------------------
    -- Trying "Ninja" generator
    --------------------------------
    ---------------------------
    ----------------------
    -----------------
    ------------
    -------
    --
    Not searching for unused variables given on the command line.
    CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
    -- Configuring incomplete, errors occurred!
    --
    -------
    ------------
    -----------------
    ----------------------
    ---------------------------
    --------------------------------
    -- Trying "Ninja" generator - failure
    --------------------------------------------------------------------------------



    --------------------------------------------------------------------------------
    -- Trying "Unix Makefiles" generator
    --------------------------------
    ---------------------------
    ----------------------
    -----------------
    ------------
    -------
    --
    Not searching for unused variables given on the command line.
    -- The C compiler identification is GNU 5.4.0
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- The CXX compiler identification is GNU 5.4.0
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /tmp/pip-install-likc8w01/ninja/_cmake_test_compile/build
    --
    -------
    ------------
    -----------------
    ----------------------
    ---------------------------
    --------------------------------
    -- Trying "Unix Makefiles" generator - success
    --------------------------------------------------------------------------------

    CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
      CMake 3.6 or higher is required.  You are running version 3.5.1


    -- Configuring incomplete, errors occurred!
    Traceback (most recent call last):
      File "/usr/local/lib/python3.5/dist-packages/skbuild/setuptools_wrap.py", line 574, in setup
        languages=cmake_languages
      File "/usr/local/lib/python3.5/dist-packages/skbuild/cmaker.py", line 232, in configure
        os.path.abspath(CMAKE_BUILD_DIR())))

    An error occurred while configuring with CMake.
      Command:
        "cmake" "/tmp/pip-install-likc8w01/ninja" "-G" "Unix Makefiles" "-DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-likc8w01/ninja/_skbuild/linux-aarch64-3.5/cmake-install" "-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3" "-DPYTHON_VERSION_STRING:STRING=3.5.2" "-DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.5m" "-DPYTHON_LIBRARY:FILEPATH=/usr/lib/aarch64-linux-gnu/libpython3.5m.so" "-DSKBUILD:BOOL=TRUE" "-DCMAKE_MODULE_PATH:PATH=/usr/local/lib/python3.5/dist-packages/skbuild/resources/cmake" "-DCMAKE_BUILD_TYPE:STRING=Release"
      Source directory:
        /tmp/pip-install-likc8w01/ninja
      Working directory:
        /tmp/pip-install-likc8w01/ninja/_skbuild/linux-aarch64-3.5/cmake-build
    Please see CMake's output for more information.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-likc8w01/ninja/setup.py'"'"'; __file__='"'"'/tmp/pip-install-likc8w01/ninja/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ewi052c5/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.5/ninja Check the logs for full command output.

`pip check` fails on amd64 linux and macOS

👋🏼 Hi, it looks like pip 24.2 causes ninja to register as incompatible with my local OS due to something in the package's metadata tags.

Environments tested (all amd64):

  • Python 3.9 through 3.12 on WSL2 (Ubuntu 22.04 LTS)
  • Python 3.9 on GitHub Actions runners (both Ubuntu 22.04 and 24.04)
  • Python 3.9 on macOS

Steps to replicate:

  1. Create a new virtualenv (python3.12 -m venv .venv)
  2. pip install --upgrade pip
  3. pip install ninja
  4. pip check

Expected behavior:

  • Output saying there are no package conflicts found

Actual behavior:

  • ninja 1.11.1.1 is not supported on this platform

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.