ducktools-pythonfinder 0.7.6__tar.gz → 0.7.7__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 (43) hide show
  1. {ducktools_pythonfinder-0.7.6/src/ducktools_pythonfinder.egg-info → ducktools_pythonfinder-0.7.7}/PKG-INFO +1 -1
  2. ducktools_pythonfinder-0.7.7/src/ducktools/pythonfinder/_version.py +2 -0
  3. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/src/ducktools/pythonfinder/venv.py +9 -15
  4. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7/src/ducktools_pythonfinder.egg-info}/PKG-INFO +1 -1
  5. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/tests/test_venv_finder.py +3 -2
  6. ducktools_pythonfinder-0.7.6/src/ducktools/pythonfinder/_version.py +0 -2
  7. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/.gitignore +0 -0
  8. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/LICENSE +0 -0
  9. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/MANIFEST.in +0 -0
  10. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/README.md +0 -0
  11. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/pyproject.toml +0 -0
  12. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/scripts/build_zipapp.py +0 -0
  13. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/scripts/detail_this_python.py +0 -0
  14. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/scripts/list_python_venvs.py +0 -0
  15. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/scripts/print_python_versions.py +0 -0
  16. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/setup.cfg +0 -0
  17. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/src/ducktools/pythonfinder/__init__.py +0 -0
  18. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/src/ducktools/pythonfinder/__main__.py +0 -0
  19. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/src/ducktools/pythonfinder/darwin/__init__.py +0 -0
  20. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/src/ducktools/pythonfinder/details_script.py +0 -0
  21. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/src/ducktools/pythonfinder/linux/__init__.py +0 -0
  22. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/src/ducktools/pythonfinder/linux/pyenv_search.py +0 -0
  23. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/src/ducktools/pythonfinder/package_list_script.py +0 -0
  24. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/src/ducktools/pythonfinder/pythonorg_search.py +0 -0
  25. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/src/ducktools/pythonfinder/shared.py +0 -0
  26. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/src/ducktools/pythonfinder/win32/__init__.py +0 -0
  27. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/src/ducktools/pythonfinder/win32/pyenv_search.py +0 -0
  28. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/src/ducktools/pythonfinder/win32/registry_search.py +0 -0
  29. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/src/ducktools_pythonfinder.egg-info/SOURCES.txt +0 -0
  30. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/src/ducktools_pythonfinder.egg-info/dependency_links.txt +0 -0
  31. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/src/ducktools_pythonfinder.egg-info/entry_points.txt +0 -0
  32. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/src/ducktools_pythonfinder.egg-info/requires.txt +0 -0
  33. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/src/ducktools_pythonfinder.egg-info/top_level.txt +0 -0
  34. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/tests/conftest.py +0 -0
  35. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/tests/sources/python_versions.txt +0 -0
  36. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/tests/sources/release.json +0 -0
  37. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/tests/sources/release_file.json +0 -0
  38. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/tests/test_details_script.py +0 -0
  39. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/tests/test_foldersearch.py +0 -0
  40. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/tests/test_orgsearch.py +0 -0
  41. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/tests/test_pyenv.py +0 -0
  42. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/tests/test_shared.py +0 -0
  43. {ducktools_pythonfinder-0.7.6 → ducktools_pythonfinder-0.7.7}/tests/test_uv_finder.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ducktools-pythonfinder
3
- Version: 0.7.6
3
+ Version: 0.7.7
4
4
  Summary: Cross platform tool to find available python installations
5
5
  Author: David C Ellis
6
6
  Project-URL: Homepage, https://github.com/davidcellis/ducktools-pythonfinder
@@ -0,0 +1,2 @@
1
+ __version__ = "0.7.7"
2
+ __version_tuple__ = (0, 7, 7)
@@ -175,27 +175,21 @@ class PythonVEnv(Prefab):
175
175
  :param cfg_path: Path to a virtualenv config file
176
176
  :return: PythonVEnv with details relative to that config file
177
177
  """
178
- parent_path, version_str, parent_exe = None, None, None
179
178
  venv_base = os.path.dirname(cfg_path)
180
179
 
181
180
  with open(cfg_path, 'r') as f:
181
+ conf = {}
182
182
  for line in f:
183
- key, value = (item.strip() for item in line.split("="))
183
+ key, _, value = [item.strip() for item in line.partition("=")]
184
+ conf[key] = value
184
185
 
185
- if key == "home":
186
- parent_path = value
187
- elif key in {"version", "version_info"}:
188
- # venv and uv use different key names :)
189
- version_str = value
190
- elif key == "executable":
191
- parent_exe = value
186
+ parent_path = conf.get("home")
187
+ version_str = conf.get("version", conf.get("version_info"))
188
+ parent_exe = conf.get("executable", conf.get("base-executable"))
192
189
 
193
- if parent_path and version_str and parent_exe:
194
- break
195
-
196
- if parent_path is None or version_str is None:
197
- # Not a valid venv
198
- raise InvalidVEnvError(f"Path or version not defined in {cfg_path}")
190
+ if parent_path is None or version_str is None:
191
+ # Not a valid venv
192
+ raise InvalidVEnvError(f"Path or version not defined in {cfg_path}")
199
193
 
200
194
  if sys.platform == "win32":
201
195
  venv_exe = os.path.join(venv_base, "Scripts", "python.exe")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ducktools-pythonfinder
3
- Version: 0.7.6
3
+ Version: 0.7.7
4
4
  Summary: Cross platform tool to find available python installations
5
5
  Author: David C Ellis
6
6
  Project-URL: Homepage, https://github.com/davidcellis/ducktools-pythonfinder
@@ -127,8 +127,9 @@ def test_found_parent(with_venvs, this_python, this_venv):
127
127
  parent = venv_ex.get_parent_install()
128
128
  assert os.path.dirname(parent.executable) == os.path.dirname(this_python.executable)
129
129
 
130
- # venv version str works same as parent
131
- assert venv_ex.version_str == parent.version_str
130
+ # venvs created by the venv module don't record prerelease details in the version
131
+ # That's not my fault that's venv!
132
+ assert venv_ex.version[:3] == parent.version[:3]
132
133
 
133
134
 
134
135
  def test_found_parent_cache(with_venvs, this_python):
@@ -1,2 +0,0 @@
1
- __version__ = "0.7.6"
2
- __version_tuple__ = (0, 7, 6)