ms-env 0.3.1__tar.gz → 0.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. {ms_env-0.3.1 → ms_env-0.3.2}/PKG-INFO +1 -1
  2. {ms_env-0.3.1 → ms_env-0.3.2}/docs/guide.md +4 -5
  3. {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env/app.py +2 -9
  4. {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env.egg-info/PKG-INFO +1 -1
  5. {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env.egg-info/scm_version.json +2 -2
  6. {ms_env-0.3.1 → ms_env-0.3.2}/tests/test_ms_env.py +11 -12
  7. {ms_env-0.3.1 → ms_env-0.3.2}/.github/workflows/ci.yml +0 -0
  8. {ms_env-0.3.1 → ms_env-0.3.2}/.github/workflows/docs.yml +0 -0
  9. {ms_env-0.3.1 → ms_env-0.3.2}/.github/workflows/publish.yml +0 -0
  10. {ms_env-0.3.1 → ms_env-0.3.2}/.gitignore +0 -0
  11. {ms_env-0.3.1 → ms_env-0.3.2}/LICENSE +0 -0
  12. {ms_env-0.3.1 → ms_env-0.3.2}/README.md +0 -0
  13. {ms_env-0.3.1 → ms_env-0.3.2}/docs/api_reference.md +0 -0
  14. {ms_env-0.3.1 → ms_env-0.3.2}/docs/index.md +0 -0
  15. {ms_env-0.3.1 → ms_env-0.3.2}/pyproject.toml +0 -0
  16. {ms_env-0.3.1 → ms_env-0.3.2}/setup.cfg +0 -0
  17. {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env/__init__.py +0 -0
  18. {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env/host.py +0 -0
  19. {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env/recipes.py +0 -0
  20. {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env/steps.py +0 -0
  21. {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env.egg-info/SOURCES.txt +0 -0
  22. {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env.egg-info/dependency_links.txt +0 -0
  23. {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env.egg-info/requires.txt +0 -0
  24. {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env.egg-info/scm_file_list.json +0 -0
  25. {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env.egg-info/top_level.txt +0 -0
  26. {ms_env-0.3.1 → ms_env-0.3.2}/zensical.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ms_env
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Environments for MolSuite apps: find or install external tools, on this machine or over ssh.
5
5
  Author: Mario S. Valdés-Tresanco, Mario E. Valdés-Tresanco
6
6
  License-Expression: MIT
@@ -177,11 +177,10 @@ ensure(recipe, host).future.result()
177
177
  What travels and what is downloaded:
178
178
 
179
179
  - A package imported from a source checkout goes as a wheel of its code as it
180
- is now. The wheel is built once for each state of the code and of its tags:
181
- its version comes from the last tag, so the tags of a git checkout are
182
- fetched first. A release tagged on the server would otherwise give the wheel
183
- a development version below it, which the host refuses to install for an app
184
- that asks for that release.
180
+ is now. The wheel is built once for each state of the code and of its last
181
+ tag, where its version comes from. A checkout that lacks the tag of a release
182
+ made on the server builds a development version below it, which the host
183
+ refuses for an app that asks for that release: `git fetch --tags` in it.
185
184
  - A package that is installed here is asked for in the version it has.
186
185
  - Everything else the host downloads, pinned to the versions of this
187
186
  environment, so the two machines may be different systems.
@@ -9,7 +9,6 @@ from __future__ import annotations
9
9
 
10
10
  import hashlib
11
11
  import importlib.util
12
- import os
13
12
  import platform
14
13
  import re
15
14
  import shutil
@@ -36,17 +35,11 @@ def _checkout(module: str) -> Path | None:
36
35
 
37
36
 
38
37
  def _described(root: Path) -> str:
39
- """`git describe` of the checkout at `root`, after fetching its tags: the version of the wheel
40
- comes from the last tag, and one made on the server (a release) is not here until then; a
41
- wheel built without it has a version below the one it is, and pip there refuses it.
42
- Offline or without git, the tags that are here."""
38
+ """`git describe` of the checkout at `root`: the version of its wheel comes from the last tag,
39
+ which may change while the code does not. Without git, nothing."""
43
40
  if not (root / ".git").exists():
44
41
  return ""
45
- env = {**os.environ, "GIT_TERMINAL_PROMPT": "0"}
46
- env.setdefault("GIT_SSH_COMMAND", "ssh -o BatchMode=yes")
47
42
  try:
48
- subprocess.run(["git", "-C", str(root), "fetch", "--tags", "--quiet"],
49
- env=env, capture_output=True, timeout=30, check=False)
50
43
  return subprocess.run(["git", "-C", str(root), "describe", "--tags", "--long", "--always"],
51
44
  capture_output=True, text=True, timeout=30, check=False).stdout.strip()
52
45
  except (OSError, subprocess.TimeoutExpired):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ms_env
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Environments for MolSuite apps: find or install external tools, on this machine or over ssh.
5
5
  Author: Mario S. Valdés-Tresanco, Mario E. Valdés-Tresanco
6
6
  License-Expression: MIT
@@ -1,7 +1,7 @@
1
1
  {
2
- "tag": "0.3.1",
2
+ "tag": "0.3.2",
3
3
  "distance": 0,
4
- "node": "gd9f3490b29e5d08860fdfd2187b472da1e728718",
4
+ "node": "g3f644bbfcaf555dc7cedf971907597ad44ef3f75",
5
5
  "dirty": false,
6
6
  "branch": "HEAD",
7
7
  "node_date": "2026-10-28"
@@ -328,19 +328,18 @@ def test_windows_layout_and_platform_names():
328
328
  assert tools.conda_platform("Linux", "x86_64") == "linux-64" == Host().platform() or sys.platform != "linux"
329
329
 
330
330
 
331
- def test_a_checkout_learns_the_tags_made_on_its_server_before_its_wheel_is_built(tmp_path):
331
+ def test_a_new_tag_on_the_same_code_builds_a_new_wheel(tmp_path):
332
332
  from ms_env import app
333
333
 
334
- def git(where, *words):
335
- subprocess.run(["git", "-C", str(where), "-c", "user.name=t", "-c", "user.email=t@t", *words],
334
+ def git(*words):
335
+ subprocess.run(["git", "-C", str(tmp_path), "-c", "user.name=t", "-c", "user.email=t@t", *words],
336
336
  check=True, capture_output=True)
337
337
 
338
- server, here = tmp_path / "server", tmp_path / "here"
339
- server.mkdir()
340
- git(server, "init", "-q")
341
- git(server, "commit", "-q", "--allow-empty", "-m", "one")
342
- git(server, "tag", "v0.1.0")
343
- git(server, "commit", "-q", "--allow-empty", "-m", "two")
344
- subprocess.run(["git", "clone", "-q", str(server), str(here)], check=True)
345
- git(server, "tag", "v0.2.0") # a release made on the server once the checkout was there
346
- assert app._described(here).startswith("v0.2.0-0-g") and app._described(tmp_path) == ""
338
+ git("init", "-q")
339
+ git("commit", "-q", "--allow-empty", "-m", "one")
340
+ git("tag", "v0.1.0")
341
+ git("commit", "-q", "--allow-empty", "-m", "docs only")
342
+ before = app._described(tmp_path)
343
+ git("tag", "v0.2.0") # a release of the same code: its wheel has another version
344
+ assert before.startswith("v0.1.0-1-g") and app._described(tmp_path).startswith("v0.2.0-0-g")
345
+ assert app._described(tmp_path / "not-a-checkout") == ""
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes