Skip to content

Commit c8f65c5

Browse files
authored
Merge pull request #910 from padix-key/pixi-fix
Ensure Biotite installation is available to all environments
2 parents 039fd62 + e7be73d commit c8f65c5

3 files changed

Lines changed: 19 additions & 10 deletions

File tree

doc/contribution/documentation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ or in a ``pixi``-managed environment
2525

2626
.. code-block:: console
2727
28-
$ pixi run doc-full
28+
$ pixi run -e doc doc-full
2929
3030
Documentation structure
3131
-----------------------
@@ -89,7 +89,7 @@ or, equivalently,
8989

9090
.. code-block:: console
9191
92-
$ pixi run doc
92+
$ pixi run -e doc doc
9393
9494
You may also ask the *Biotite* maintainers to run the example script and check
9595
the generated page, if building the gallery on your device is not possible.

doc/contribution/testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ In a Pixi-managed environment this is equivalent to
3636

3737
.. code-block:: console
3838
39-
$ pixi run test
39+
$ pixi run -e test test
4040
4141
Benchmarks
4242
----------

pyproject.toml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -247,26 +247,35 @@ doc = { features = ["doc", "interface", "application"] }
247247
# -> Add interfaced packages as well
248248
lint = { features = ["lint", "interface"] }
249249

250-
# Editable install — re-runs only when a Cython or Rust source file changes
251-
[tool.pixi.tasks._pip-install-editable]
250+
[tool.pixi.tasks._pip-install-rust]
252251
cmd = "python -m pip install -e ."
253-
# Editable install only need to re-run when a Cython or Rust source file changes
254-
inputs = ["src/**/*.pyx", "src/**/*.pxd", "src/**/*.rs", "Cargo.toml", "pyproject.toml"]
252+
env = { BIOTITE_OMIT_CYTHON = "1" }
253+
inputs = ["src/**/*.rs", "Cargo.toml", "pyproject.toml"]
254+
255+
[tool.pixi.tasks._pip-install-cython]
256+
cmd = "python -m pip install -e ."
257+
env = { BIOTITE_OMIT_RUST = "1" }
258+
inputs = ["src/**/*.pyx", "src/**/*.pxd", "pyproject.toml"]
259+
260+
[tool.pixi.tasks._pip-install]
261+
cmd = "python -m pip install -e ."
262+
env = { BIOTITE_OMIT_CYTHON = "1", BIOTITE_OMIT_RUST = "1" }
263+
depends-on = ["_pip-install-rust", "_pip-install-cython"]
255264

256265
[tool.pixi.tasks._current-date]
257266
# Writes the current ISO year-month into a marker file
258267
cmd = "date +%Y-%m > .date"
259268

260269
[tool.pixi.tasks._setup-ccd]
261270
cmd = "python -m biotite.setup_ccd"
262-
depends-on = ["_pip-install-editable", "_current-date"]
271+
depends-on = ["_pip-install", "_current-date"]
263272
# Cached: only re-runs once per month
264273
inputs = [".date"]
265274
outputs = ["src/biotite/structure/info/components.bcif"]
266275

267276
[tool.pixi.tasks.install]
268277
cmd = "true"
269-
depends-on = ["_pip-install-editable", "_setup-ccd"]
278+
depends-on = ["_pip-install", "_setup-ccd"]
270279
description = "Install Biotite in editable mode"
271280

272281
[tool.pixi.tasks._bundle-licenses]
@@ -296,7 +305,7 @@ description = "Run the test suite"
296305
_ruff-check = { cmd = "ruff check", default-environment = "lint" }
297306
_ruff-format-check = { cmd = "ruff format --diff", default-environment = "lint" }
298307
# `pyright` complains if it does not see Biotite's extension modules
299-
_pyright = { cmd = "pyright", depends-on = ["_pip-install-editable"], default-environment = "lint" }
308+
_pyright = { cmd = "pyright", depends-on = ["_pip-install"], default-environment = "lint" }
300309
_numpydoc = { cmd = "numpydoc lint src/biotite/**/*.py", default-environment = "lint" }
301310
_cargo-fmt-check = { cmd = "cargo fmt --check", default-environment = "lint" }
302311
_cargo-clippy = { cmd = "cargo clippy -- -Dwarnings", default-environment = "lint" }

0 commit comments

Comments
 (0)