Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
- '10'
- '11'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
target_platform:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/linux_aarch64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
- '10'
- '11'
docker_image:
- quay.io/condaforge/linux-anvil-aarch64
target_platform:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/linux_ppc64le_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
- '10'
- '11'
docker_image:
- quay.io/condaforge/linux-anvil-ppc64le
target_platform:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions .scripts/run_osx_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 19 additions & 18 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions recipe/build_python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

set -ex

cp -r "${RECIPE_DIR}/python" ./_python

cat > "./_python/setup.cfg" <<EOF
[metadata]
name = ninja
version = ${PKG_VERSION}
[options]
packages = find:
EOF

"${PYTHON}" -m pip install "./_python" -v --no-deps
43 changes: 35 additions & 8 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{% set name = "ninja" %}
{% set version = "1.11.1" %}

package:
name: ninja
name: {{ name }}-pkg
version: {{ version }}

source:
Expand All @@ -11,14 +12,38 @@ source:
build:
number: 0

requirements:
build:
- {{ compiler("cxx") }}
- python *
outputs:
- name: {{ name }}
script: build_ninja.sh # [unix]
script: bld_ninja.bat # [win]
requirements:
build:
- {{ compiler("cxx") }}
- python *

test:
commands:
- ninja --version
test:
commands:
- ninja --version
{% if linux %}
- name: python-{{ name }}
script: build_python.sh
build:
noarch: python
requirements:
host:
- pip
- python >=3.7
- setuptools
run:
- python >=3.7
- {{ name }} =={{ version }}
test:
requires:
- pip
commands:
- pip check
- ${PYTHON} -m ninja --version
{% endif %}

about:
home: https://ninja-build.org/
Expand All @@ -32,3 +57,5 @@ extra:
- frol
- xhochy
- henryiii
feedstock-name:
- {{ name }}
Empty file.
20 changes: 20 additions & 0 deletions recipe/python/ninja/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import os
import subprocess
import sys
from pathlib import Path

if __name__ == "__main__":
# File at lib/pythonX.Y/site-packages/ninja/__main__.py
# Binary at Library/bin/ninja.exe # [win]
# at bin/ninja # [unix]
prefix = Path(__file__).parent.parent.parent.parent.parent.parent
if os.name == "nt":
ninja = prefix / "Library" / "bin" / "ninja.exe"
else:
ninja = prefix / "bin" / "ninja"

try:
subprocess.run([str(ninja.resolve()), *sys.argv[1:]], check=True)
except subprocess.CalledProcessError as error:
print(str(error))
sys.exit(1)
3 changes: 3 additions & 0 deletions recipe/python/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from setuptools import setup

setup()