diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml
index 8a0bcae..a192c0b 100755
--- a/.azure-pipelines/azure-pipelines-win.yml
+++ b/.azure-pipelines/azure-pipelines-win.yml
@@ -14,6 +14,7 @@ jobs:
timeoutInMinutes: 360
variables:
CONDA_BLD_PATH: D:\\bld\\
+ UPLOAD_TEMP: D:\\tmp
steps:
- task: PythonScript@0
@@ -35,7 +36,7 @@ jobs:
- script: |
call activate base
- mamba.exe install 'python=3.9' conda-build conda pip boa 'conda-forge-ci-setup=3' -c conda-forge --strict-channel-priority --yes
+ mamba.exe install "python=3.9" conda-build conda pip boa conda-forge-ci-setup=3 "py-lief<0.12" -c conda-forge --strict-channel-priority --yes
displayName: Install conda-build
- script: set PYTHONUNBUFFERED=1
@@ -72,6 +73,9 @@ jobs:
- script: |
set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%"
set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%"
+ set "TEMP=$(UPLOAD_TEMP)"
+ if not exist "%TEMP%\" md "%TEMP%"
+ set "TMP=%TEMP%"
call activate base
upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml
displayName: Upload package
diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml
index ffbda61..e4b57e4 100644
--- a/.ci_support/linux_64_.yaml
+++ b/.ci_support/linux_64_.yaml
@@ -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:
diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml
index 0c7991b..b279d69 100644
--- a/.ci_support/linux_aarch64_.yaml
+++ b/.ci_support/linux_aarch64_.yaml
@@ -11,7 +11,7 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
-- '10'
+- '11'
docker_image:
- quay.io/condaforge/linux-anvil-aarch64
target_platform:
diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml
index 361aab7..1559382 100644
--- a/.ci_support/linux_ppc64le_.yaml
+++ b/.ci_support/linux_ppc64le_.yaml
@@ -7,7 +7,7 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
-- '10'
+- '11'
docker_image:
- quay.io/condaforge/linux-anvil-ppc64le
target_platform:
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 3e61aa2..8b4ef2f 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1,6 +1,6 @@
# This file was generated automatically from conda-smithy. To update this configuration,
# update the conda-forge.yml and/or the recipe/meta.yaml.
-# -*- mode: yaml -*-
+# -*- mode: jinja-yaml -*-
version: 2
diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh
index a6b09f6..84431a6 100755
--- a/.scripts/build_steps.sh
+++ b/.scripts/build_steps.sh
@@ -33,9 +33,9 @@ CONDARC
mamba install --update-specs --yes --quiet --channel conda-forge \
- conda-build pip boa conda-forge-ci-setup=3
+ conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12"
mamba update --update-specs --yes --quiet --channel conda-forge \
- conda-build pip boa conda-forge-ci-setup=3
+ conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12"
# set up the condarc
setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh
index 736a39a..b3abaeb 100755
--- a/.scripts/run_osx_build.sh
+++ b/.scripts/run_osx_build.sh
@@ -23,11 +23,10 @@ bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME}
source ${MINIFORGE_HOME}/etc/profile.d/conda.sh
conda activate base
-echo -e "\n\nInstalling ['conda-forge-ci-setup=3'] and conda-build."
mamba install --update-specs --quiet --yes --channel conda-forge \
- conda-build pip boa conda-forge-ci-setup=3
+ conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12"
mamba update --update-specs --yes --quiet --channel conda-forge \
- conda-build pip boa conda-forge-ci-setup=3
+ conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12"
diff --git a/README.md b/README.md
index 063a764..d7a17b9 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-About ninja
-===========
+About ['ninja']
+=======
Home: https://ninja-build.org/
@@ -30,42 +30,42 @@ Current build status
linux_64 |
-
+
|
| linux_aarch64 |
-
+
|
| linux_ppc64le |
-
+
|
| osx_64 |
-
+
|
| osx_arm64 |
-
+
|
| win_64 |
-
+
|
@@ -82,27 +82,28 @@ Current release info
| Name | Downloads | Version | Platforms |
| --- | --- | --- | --- |
| [](https://anaconda.org/conda-forge/ninja) | [](https://anaconda.org/conda-forge/ninja) | [](https://anaconda.org/conda-forge/ninja) | [](https://anaconda.org/conda-forge/ninja) |
+| [](https://anaconda.org/conda-forge/python-ninja) | [](https://anaconda.org/conda-forge/python-ninja) | [](https://anaconda.org/conda-forge/python-ninja) | [](https://anaconda.org/conda-forge/python-ninja) |
-Installing ninja
-================
+Installing ['ninja']
+============
-Installing `ninja` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with:
+Installing `['ninja']` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with:
```
conda config --add channels conda-forge
conda config --set channel_priority strict
```
-Once the `conda-forge` channel has been enabled, `ninja` can be installed with `conda`:
+Once the `conda-forge` channel has been enabled, `ninja, python-ninja` can be installed with `conda`:
```
-conda install ninja
+conda install ninja python-ninja
```
or with `mamba`:
```
-mamba install ninja
+mamba install ninja python-ninja
```
It is possible to list all of the versions of `ninja` available on your platform with `conda`:
@@ -172,17 +173,17 @@ Terminology
produce the finished article (built conda distributions)
-Updating ninja-feedstock
-========================
+Updating ['ninja']-feedstock
+====================
-If you would like to improve the ninja recipe or build a new
+If you would like to improve the ['ninja'] recipe or build a new
package version, please fork this repository and submit a PR. Upon submission,
your changes will be run on the appropriate platforms to give the reviewer an
opportunity to confirm that the changes result in a successful build. Once
merged, the recipe will be re-built and uploaded automatically to the
`conda-forge` channel, whereupon the built conda packages will be available for
everybody to install and use from the `conda-forge` channel.
-Note that all branches in the conda-forge/ninja-feedstock are
+Note that all branches in the conda-forge/['ninja']-feedstock are
immediately built and any created packages are uploaded, so PRs should be based
on branches in forks and branches in the main repository should only be used to
build distinct package versions.
diff --git a/recipe/bld.bat b/recipe/bld_ninja.bat
similarity index 100%
rename from recipe/bld.bat
rename to recipe/bld_ninja.bat
diff --git a/recipe/build.sh b/recipe/build_ninja.sh
similarity index 100%
rename from recipe/build.sh
rename to recipe/build_ninja.sh
diff --git a/recipe/build_python.sh b/recipe/build_python.sh
new file mode 100644
index 0000000..36da37f
--- /dev/null
+++ b/recipe/build_python.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+set -ex
+
+cp -r "${RECIPE_DIR}/python" ./_python
+
+cat > "./_python/setup.cfg" <=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/
@@ -32,3 +57,5 @@ extra:
- frol
- xhochy
- henryiii
+ feedstock-name:
+ - {{ name }}
diff --git a/recipe/python/ninja/__init__.py b/recipe/python/ninja/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/recipe/python/ninja/__main__.py b/recipe/python/ninja/__main__.py
new file mode 100644
index 0000000..3d8b9c6
--- /dev/null
+++ b/recipe/python/ninja/__main__.py
@@ -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)
diff --git a/recipe/python/setup.py b/recipe/python/setup.py
new file mode 100644
index 0000000..6068493
--- /dev/null
+++ b/recipe/python/setup.py
@@ -0,0 +1,3 @@
+from setuptools import setup
+
+setup()