summaryrefslogtreecommitdiff
path: root/numpy/_build_utils
diff options
context:
space:
mode:
authorRalf Gommers <ralf.gommers@gmail.com>2022-11-13 11:42:10 +0100
committerRalf Gommers <ralf.gommers@gmail.com>2022-11-13 13:48:12 +0100
commit5da91cf5edfaba4ff4bb73e466225b5909041c2a (patch)
tree1c1a337d76b39094174f5a9f3ecf0c8026bf8cab /numpy/_build_utils
parent4174312473634b5a414e32d3f9aed7209ee33c3c (diff)
downloadnumpy-5da91cf5edfaba4ff4bb73e466225b5909041c2a.tar.gz
BLD: meson: build `random` module
Also remove the unused `cythoner.py` script. Meson itself has sufficient Cython support now for what we need. And the `-3 --fast-fail` flags are the default already.
Diffstat (limited to 'numpy/_build_utils')
-rw-r--r--numpy/_build_utils/cythoner.py37
-rwxr-xr-x[-rw-r--r--]numpy/_build_utils/tempita.py11
2 files changed, 4 insertions, 44 deletions
diff --git a/numpy/_build_utils/cythoner.py b/numpy/_build_utils/cythoner.py
deleted file mode 100644
index 49fcbbd5b..000000000
--- a/numpy/_build_utils/cythoner.py
+++ /dev/null
@@ -1,37 +0,0 @@
-#!python3
-""" Scipy variant of Cython command
-
-Cython, as applied to single pyx file.
-
-Expects two arguments, infile and outfile.
-
-Other options passed through to cython command line parser.
-"""
-
-import os
-import os.path as op
-import sys
-import subprocess as sbp
-
-
-def main():
- in_fname, out_fname = (op.abspath(p) for p in sys.argv[1:3])
-
- sbp.run(
- [
- 'cython',
- '-3',
- '--fast-fail',
- '--output-file',
- out_fname,
- '--include-dir',
- os.getcwd(),
- ]
- + sys.argv[3:]
- + [in_fname],
- check=True,
- )
-
-
-if __name__ == '__main__':
- main()
diff --git a/numpy/_build_utils/tempita.py b/numpy/_build_utils/tempita.py
index 018746426..61dff877d 100644..100755
--- a/numpy/_build_utils/tempita.py
+++ b/numpy/_build_utils/tempita.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
import sys
import os
import argparse
@@ -31,7 +32,7 @@ def process_tempita(fromfile, outfile=None):
def main():
parser = argparse.ArgumentParser()
parser.add_argument("infile", type=str, help="Path to the input file")
- parser.add_argument("-o", "--outdir", type=str, help="Path to the output directory")
+ parser.add_argument("-o", "--outfile", type=str, help="Path to the output file")
parser.add_argument(
"-i",
"--ignore",
@@ -44,12 +45,8 @@ def main():
if not args.infile.endswith('.in'):
raise ValueError(f"Unexpected extension: {args.infile}")
- outdir_abs = os.path.join(os.getcwd(), args.outdir)
- outfile = os.path.join(
- outdir_abs, os.path.splitext(os.path.split(args.infile)[1])[0]
- )
-
- process_tempita(args.infile, outfile)
+ outfile_abs = os.path.join(os.getcwd(), args.outfile)
+ process_tempita(args.infile, outfile_abs)
if __name__ == "__main__":