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.
- {ms_env-0.3.1 → ms_env-0.3.2}/PKG-INFO +1 -1
- {ms_env-0.3.1 → ms_env-0.3.2}/docs/guide.md +4 -5
- {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env/app.py +2 -9
- {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env.egg-info/PKG-INFO +1 -1
- {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env.egg-info/scm_version.json +2 -2
- {ms_env-0.3.1 → ms_env-0.3.2}/tests/test_ms_env.py +11 -12
- {ms_env-0.3.1 → ms_env-0.3.2}/.github/workflows/ci.yml +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/.github/workflows/docs.yml +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/.github/workflows/publish.yml +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/.gitignore +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/LICENSE +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/README.md +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/docs/api_reference.md +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/docs/index.md +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/pyproject.toml +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/setup.cfg +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env/__init__.py +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env/host.py +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env/recipes.py +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env/steps.py +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env.egg-info/SOURCES.txt +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env.egg-info/dependency_links.txt +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env.egg-info/requires.txt +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env.egg-info/scm_file_list.json +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/src/ms_env.egg-info/top_level.txt +0 -0
- {ms_env-0.3.1 → ms_env-0.3.2}/zensical.toml +0 -0
|
@@ -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
|
|
181
|
-
its version comes from
|
|
182
|
-
|
|
183
|
-
|
|
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
|
|
40
|
-
|
|
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):
|
|
@@ -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
|
|
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(
|
|
335
|
-
subprocess.run(["git", "-C", str(
|
|
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
|
-
|
|
339
|
-
|
|
340
|
-
git(
|
|
341
|
-
git(
|
|
342
|
-
|
|
343
|
-
git(
|
|
344
|
-
|
|
345
|
-
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|