diff options
author | Sebastian Berg <sebastianb@nvidia.com> | 2023-03-18 09:30:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-18 09:30:46 +0100 |
commit | 0a38ae97ebde272053dbc2109b43f5a44715eb1a (patch) | |
tree | 41b8d848f28fd45b2e8744a47483906f981396da | |
parent | e42c9503a14d66adfd41356ef5640c6975c45218 (diff) | |
parent | 0e4af5f5e4392c5cf65ad18deae19610a6179057 (diff) | |
download | numpy-0a38ae97ebde272053dbc2109b43f5a44715eb1a.tar.gz |
Merge pull request #23407 from jarrodmillman/devpy2spin
MAINT: Rename devpy to spin
-rw-r--r-- | .github/workflows/linux_meson.yml | 6 | ||||
-rw-r--r-- | .github/workflows/linux_musl.yml | 4 | ||||
-rw-r--r-- | build_requirements.txt | 2 | ||||
-rw-r--r-- | building_with_meson.md | 16 | ||||
-rwxr-xr-x | dev.py | 19 | ||||
-rw-r--r-- | environment.yml | 2 | ||||
-rw-r--r-- | pyproject.toml | 8 | ||||
-rwxr-xr-x | spin | 19 |
8 files changed, 38 insertions, 38 deletions
diff --git a/.github/workflows/linux_meson.yml b/.github/workflows/linux_meson.yml index 04fdd40c0..902c06997 100644 --- a/.github/workflows/linux_meson.yml +++ b/.github/workflows/linux_meson.yml @@ -21,7 +21,7 @@ permissions: contents: read # to fetch code (actions/checkout) jobs: - meson_devpy: + meson_spin: if: "github.repository == 'numpy/numpy'" runs-on: ubuntu-latest steps: @@ -41,7 +41,7 @@ jobs: env: TERM: xterm-256color run: - ./dev.py build -- --werror + ./spin build -- --werror - name: Check build-internal dependencies run: ninja -C build -t missingdeps @@ -54,4 +54,4 @@ jobs: TERM: xterm-256color run: | pip install pytest hypothesis typing_extensions - ./dev.py test + ./spin test diff --git a/.github/workflows/linux_musl.yml b/.github/workflows/linux_musl.yml index c25fbbaf5..54c8b7c2d 100644 --- a/.github/workflows/linux_musl.yml +++ b/.github/workflows/linux_musl.yml @@ -62,5 +62,5 @@ jobs: pip install pytest hypothesis typing_extensions # use meson to build and test - ./dev.py build - ./dev.py test + ./spin build + ./spin test diff --git a/build_requirements.txt b/build_requirements.txt index e6f25f26d..3699320c8 100644 --- a/build_requirements.txt +++ b/build_requirements.txt @@ -2,4 +2,4 @@ meson-python>=0.10.0 Cython>=0.29.30,<3.0 wheel==0.38.1 ninja -git+https://github.com/scientific-python/devpy@v0.1 +spin>=0.2 diff --git a/building_with_meson.md b/building_with_meson.md index f9cbd003b..cf198e7d9 100644 --- a/building_with_meson.md +++ b/building_with_meson.md @@ -15,17 +15,17 @@ into a problem._ # also make sure you have pkg-config and the usual system dependencies for # NumPy` -Then install devpy: -- `python -m pip install git+https://github.com/scientific-python/devpy` +Then install spin: +- `python -m pip install spin` -**Compile and install:** `./dev.py build` +**Compile and install:** `./spin build` This builds in the `build/` directory, and installs into the `build-install` directory. -Then run the test suite or a shell via `dev.py`: +Then run the test suite or a shell via `spin`: ``` -./dev.py test -./dev.py ipython +./spin test +./spin ipython ``` Alternatively, to use the package, add it to your `PYTHONPATH`: @@ -44,7 +44,7 @@ Note that `pip` will use the default build system, which is (as of now) still After that is done, `pip install .` or `pip install --no-build-isolation .` will work as expected. As does building an sdist or wheel with `python -m build`. Note, however, that `pip install -e .` (in-place developer install) does not! -Use `dev.py` instead (see above). +Use `spin` instead (see above). @@ -67,5 +67,5 @@ Libs: -L${libdir} -lopenblas Then build with: ``` -./dev.py build -- -Dpkg_config_path=${HOME}/lib/pkgconfig +./spin build -- -Dpkg_config_path=${HOME}/lib/pkgconfig ``` diff --git a/dev.py b/dev.py deleted file mode 100755 index 002885d49..000000000 --- a/dev.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python -# -# Example stub for running `python -m dev.py` -# -# Copy this into your project root. - -import os -import sys -import runpy - -sys.path.remove(os.path.abspath(os.path.dirname(sys.argv[0]))) -try: - runpy.run_module("devpy", run_name="__main__") -except ImportError: - print("Cannot import devpy; please install it using") - print() - print(" pip install git+https://github.com/scientific-python/devpy@v0.1") - print() - sys.exit(1) diff --git a/environment.yml b/environment.yml index 37c94e7f1..7e5ee6cfd 100644 --- a/environment.yml +++ b/environment.yml @@ -17,7 +17,7 @@ dependencies: - ninja - pkg-config - meson-python - - pip # so you can use pip to install devpy + - pip # so you can use pip to install spin # For testing - pytest - pytest-cov diff --git a/pyproject.toml b/pyproject.toml index d95a6f54b..1b0e86023 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -174,9 +174,9 @@ environment = { OPENBLAS64_="openblas", OPENBLAS="", NPY_USE_BLAS_ILP64="1", CFL select = "*-win32" environment = { OPENBLAS64_="", OPENBLAS="openblas", NPY_USE_BLAS_ILP64="0", CFLAGS="-m32", LDFLAGS="-m32" } -[tool.devpy] +[tool.spin] package = 'numpy' -[tool.devpy.commands] -"Build" = ["devpy.cmds.meson.build", "devpy.cmds.meson.test"] -"Environments" = ["devpy.cmds.meson.shell", "devpy.cmds.meson.ipython", "devpy.cmds.meson.python"] +[tool.spin.commands] +"Build" = ["spin.cmds.meson.build", "spin.cmds.meson.test"] +"Environments" = ["spin.cmds.meson.shell", "spin.cmds.meson.ipython", "spin.cmds.meson.python"] @@ -0,0 +1,19 @@ +#!/usr/bin/env python +# +# Example stub for running `python -m spin` +# +# Copy this into your project root. + +import os +import sys +import runpy + +sys.path.remove(os.path.abspath(os.path.dirname(sys.argv[0]))) +try: + runpy.run_module("spin", run_name="__main__") +except ImportError: + print("Cannot import spin; please install it using") + print() + print(" pip install spin") + print() + sys.exit(1) |