ducktools-pythonfinder 0.4.2__tar.gz → 0.4.4__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.4.4/MANIFEST.in +1 -0
  2. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/PKG-INFO +5 -4
  3. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/README.md +4 -3
  4. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/pyproject.toml +4 -0
  5. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/src/ducktools/pythonfinder/__main__.py +24 -18
  6. ducktools_pythonfinder-0.4.4/src/ducktools/pythonfinder/_version.py +2 -0
  7. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/src/ducktools_pythonfinder.egg-info/PKG-INFO +5 -4
  8. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/src/ducktools_pythonfinder.egg-info/SOURCES.txt +0 -5
  9. ducktools_pythonfinder-0.4.2/.github/dependabot.yml +0 -7
  10. ducktools_pythonfinder-0.4.2/.github/incomplete_workflows/build_zipapp.yml +0 -5
  11. ducktools_pythonfinder-0.4.2/.github/workflows/auto_test.yml +0 -31
  12. ducktools_pythonfinder-0.4.2/.github/workflows/publish_to_pypi.yml +0 -87
  13. ducktools_pythonfinder-0.4.2/.github/workflows/publish_to_testpypi.yml +0 -55
  14. ducktools_pythonfinder-0.4.2/MANIFEST.in +0 -9
  15. ducktools_pythonfinder-0.4.2/src/ducktools/pythonfinder/_version.py +0 -16
  16. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/.gitignore +0 -0
  17. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/LICENSE +0 -0
  18. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/scripts/build_zipapp.py +0 -0
  19. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/scripts/detail_this_python.py +0 -0
  20. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/scripts/print_python_versions.py +0 -0
  21. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/setup.cfg +0 -0
  22. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/src/ducktools/pythonfinder/__init__.py +0 -0
  23. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/src/ducktools/pythonfinder/darwin/__init__.py +0 -0
  24. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/src/ducktools/pythonfinder/details_script.py +0 -0
  25. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/src/ducktools/pythonfinder/linux/__init__.py +0 -0
  26. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/src/ducktools/pythonfinder/linux/pyenv_search.py +0 -0
  27. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/src/ducktools/pythonfinder/pythonorg_search.py +0 -0
  28. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/src/ducktools/pythonfinder/shared.py +0 -0
  29. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/src/ducktools/pythonfinder/win32/__init__.py +0 -0
  30. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/src/ducktools/pythonfinder/win32/pyenv_search.py +0 -0
  31. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/src/ducktools/pythonfinder/win32/registry_search.py +0 -0
  32. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/src/ducktools_pythonfinder.egg-info/dependency_links.txt +0 -0
  33. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/src/ducktools_pythonfinder.egg-info/requires.txt +0 -0
  34. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/src/ducktools_pythonfinder.egg-info/top_level.txt +0 -0
  35. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/tests/conftest.py +0 -0
  36. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/tests/sources/python_versions.txt +0 -0
  37. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/tests/sources/release.json +0 -0
  38. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/tests/sources/release_file.json +0 -0
  39. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/tests/test_details_script.py +0 -0
  40. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/tests/test_foldersearch.py +0 -0
  41. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/tests/test_orgsearch.py +0 -0
  42. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/tests/test_pyenv.py +0 -0
  43. {ducktools_pythonfinder-0.4.2 → ducktools_pythonfinder-0.4.4}/tests/test_shared.py +0 -0
@@ -0,0 +1 @@
1
+ prune .github
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ducktools-pythonfinder
3
- Version: 0.4.2
3
+ Version: 0.4.4
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
@@ -28,7 +28,8 @@ Requires-Dist: pyfakefs; extra == "testing"
28
28
 
29
29
  # ducktools: pythonfinder #
30
30
 
31
- Find python installs on Linux, Windows and MacOS.
31
+ Find local python installs on Windows/Linux/MacOS and find the latest installers from python.org
32
+ for Windows and MacOS or sources for Linux (as python.org does not provide linux installers).
32
33
 
33
34
  Requires Python >= 3.8 (but will discover older Python installs)
34
35
 
@@ -46,7 +47,7 @@ Python versions listed can be restricted by using the `--max`, `--min` and
46
47
  and `~=` for compatible in python version specifiers.
47
48
 
48
49
  If you wish to find the latest binaries available from python.org for your platform
49
- (or sources on Linux) there is the additional `--online` option with some other extra flags.
50
+ (or sources on Linux) there is the additional `online` command with some extra flags.
50
51
 
51
52
  By default it will fetch the latest patches for each Python release (eg: 2.7.18 for 2.7) for
52
53
  the hardware you're on. The filters for local versions also work.
@@ -57,7 +58,7 @@ the hardware you're on. The filters for local versions also work.
57
58
  * `--prerelease` includes prerelease versions in the search.
58
59
 
59
60
  Example:
60
- `python pythonfinder.pyz --online --min 3.10 --system Windows --machine AMD64`
61
+ `python pythonfinder.pyz online --min 3.10 --system Windows --machine AMD64`
61
62
 
62
63
  ```
63
64
  | Python Version | URL |
@@ -1,6 +1,7 @@
1
1
  # ducktools: pythonfinder #
2
2
 
3
- Find python installs on Linux, Windows and MacOS.
3
+ Find local python installs on Windows/Linux/MacOS and find the latest installers from python.org
4
+ for Windows and MacOS or sources for Linux (as python.org does not provide linux installers).
4
5
 
5
6
  Requires Python >= 3.8 (but will discover older Python installs)
6
7
 
@@ -18,7 +19,7 @@ Python versions listed can be restricted by using the `--max`, `--min` and
18
19
  and `~=` for compatible in python version specifiers.
19
20
 
20
21
  If you wish to find the latest binaries available from python.org for your platform
21
- (or sources on Linux) there is the additional `--online` option with some other extra flags.
22
+ (or sources on Linux) there is the additional `online` command with some extra flags.
22
23
 
23
24
  By default it will fetch the latest patches for each Python release (eg: 2.7.18 for 2.7) for
24
25
  the hardware you're on. The filters for local versions also work.
@@ -29,7 +30,7 @@ the hardware you're on. The filters for local versions also work.
29
30
  * `--prerelease` includes prerelease versions in the search.
30
31
 
31
32
  Example:
32
- `python pythonfinder.pyz --online --min 3.10 --system Windows --machine AMD64`
33
+ `python pythonfinder.pyz online --min 3.10 --system Windows --machine AMD64`
33
34
 
34
35
  ```
35
36
  | Python Version | URL |
@@ -44,6 +44,10 @@ where = ["src"]
44
44
 
45
45
  [tool.setuptools_scm]
46
46
  version_file = "src/ducktools/pythonfinder/_version.py"
47
+ version_file_template = """
48
+ __version__ = "{version}"
49
+ __version_tuple__ = {version_tuple}
50
+ """
47
51
 
48
52
  [tool.pytest.ini_options]
49
53
  addopts = "--cov=src/ --cov-report=term-missing --cov-report=xml:coverage.xml"
@@ -26,7 +26,7 @@ import sys
26
26
  import os
27
27
 
28
28
  from ducktools.lazyimporter import LazyImporter, ModuleImport, FromImport
29
- from ducktools.pythonfinder import list_python_installs
29
+ from ducktools.pythonfinder import list_python_installs, __version__
30
30
 
31
31
  _laz = LazyImporter(
32
32
  [
@@ -78,35 +78,42 @@ def parse_args(args):
78
78
  prog="ducktools-pythonfinder",
79
79
  description="Discover base Python installs",
80
80
  )
81
- parser.add_argument("--min", help="Specify minimum Python version")
82
- parser.add_argument("--max", help="Specify maximum Python version")
83
- parser.add_argument("--compatible", help="Specify compatible Python version")
84
- parser.add_argument(
85
- "--online",
86
- action="store_true",
87
- help="Get links to binaries from python.org (Windows only)"
81
+ parser.add_argument("-V", "--version", action="version", version=__version__)
82
+
83
+ subparsers = parser.add_subparsers(dest="command", required=False)
84
+
85
+ online = subparsers.add_parser(
86
+ "online",
87
+ help="Get links to binaries from python.org"
88
88
  )
89
- parser.add_argument(
89
+
90
+ # Shared arguments
91
+ for p in [parser, online]:
92
+ p.add_argument("--min", help="Specify minimum Python version")
93
+ p.add_argument("--max", help="Specify maximum Python version")
94
+ p.add_argument("--compatible", help="Specify compatible Python version")
95
+
96
+ online.add_argument(
90
97
  "--all-binaries",
91
98
  action="store_true",
92
99
  help="Provide *all* matching binaries and "
93
- "not just the latest minor versions (Online only)"
100
+ "not just the latest minor versions"
94
101
  )
95
- parser.add_argument(
102
+ online.add_argument(
96
103
  "--system",
97
104
  action="store",
98
- help="Get python installers for a different system (Windows, Darwin, Linux) (Online only)"
105
+ help="Get python installers for a different system (eg: Windows, Darwin, Linux)"
99
106
  )
100
- parser.add_argument(
107
+ online.add_argument(
101
108
  "--machine",
102
109
  action="store",
103
- help="Get python installers for a different architecture (Windows: AMD64, ARM64, x86) (Online only)"
110
+ help="Get python installers for a different architecture (eg: AMD64, ARM64, x86)"
104
111
  )
105
112
 
106
- parser.add_argument(
113
+ online.add_argument(
107
114
  "--prerelease",
108
115
  action="store_true",
109
- help="Include prerelease versions (Online only)"
116
+ help="Include prerelease versions"
110
117
  )
111
118
 
112
119
  vals = parser.parse_args(args)
@@ -224,9 +231,8 @@ def main():
224
231
 
225
232
  if sys.argv[1:]:
226
233
  vals = parse_args(sys.argv[1:])
227
- online = vals.online
228
234
 
229
- if online:
235
+ if vals.command == "online":
230
236
  system = vals.system if vals.system else _laz.platform.system()
231
237
  machine = vals.machine if vals.machine else _laz.platform.machine()
232
238
  try:
@@ -0,0 +1,2 @@
1
+ __version__ = "0.4.4"
2
+ __version_tuple__ = (0, 4, 4)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ducktools-pythonfinder
3
- Version: 0.4.2
3
+ Version: 0.4.4
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
@@ -28,7 +28,8 @@ Requires-Dist: pyfakefs; extra == "testing"
28
28
 
29
29
  # ducktools: pythonfinder #
30
30
 
31
- Find python installs on Linux, Windows and MacOS.
31
+ Find local python installs on Windows/Linux/MacOS and find the latest installers from python.org
32
+ for Windows and MacOS or sources for Linux (as python.org does not provide linux installers).
32
33
 
33
34
  Requires Python >= 3.8 (but will discover older Python installs)
34
35
 
@@ -46,7 +47,7 @@ Python versions listed can be restricted by using the `--max`, `--min` and
46
47
  and `~=` for compatible in python version specifiers.
47
48
 
48
49
  If you wish to find the latest binaries available from python.org for your platform
49
- (or sources on Linux) there is the additional `--online` option with some other extra flags.
50
+ (or sources on Linux) there is the additional `online` command with some extra flags.
50
51
 
51
52
  By default it will fetch the latest patches for each Python release (eg: 2.7.18 for 2.7) for
52
53
  the hardware you're on. The filters for local versions also work.
@@ -57,7 +58,7 @@ the hardware you're on. The filters for local versions also work.
57
58
  * `--prerelease` includes prerelease versions in the search.
58
59
 
59
60
  Example:
60
- `python pythonfinder.pyz --online --min 3.10 --system Windows --machine AMD64`
61
+ `python pythonfinder.pyz online --min 3.10 --system Windows --machine AMD64`
61
62
 
62
63
  ```
63
64
  | Python Version | URL |
@@ -3,11 +3,6 @@ LICENSE
3
3
  MANIFEST.in
4
4
  README.md
5
5
  pyproject.toml
6
- .github/dependabot.yml
7
- .github/incomplete_workflows/build_zipapp.yml
8
- .github/workflows/auto_test.yml
9
- .github/workflows/publish_to_pypi.yml
10
- .github/workflows/publish_to_testpypi.yml
11
6
  scripts/build_zipapp.py
12
7
  scripts/detail_this_python.py
13
8
  scripts/print_python_versions.py
@@ -1,7 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: "github-actions"
4
- directory: "/"
5
- schedule:
6
- # Check for updates to GitHub Actions every week
7
- interval: "weekly"
@@ -1,5 +0,0 @@
1
- name: Build pythonfinder.pyz zipapp
2
-
3
- on:
4
- release:
5
- types: [published]
@@ -1,31 +0,0 @@
1
- name: UnitTests
2
-
3
- on:
4
- push:
5
- branches: [ "main" ]
6
- pull_request:
7
- branches: [ "main" ]
8
-
9
- jobs:
10
- run-tests:
11
-
12
- runs-on: ${{ matrix.os }}
13
- strategy:
14
- fail-fast: false
15
- matrix:
16
- os: [ubuntu-latest, windows-latest, macos-latest]
17
- python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"]
18
-
19
- steps:
20
- - uses: actions/checkout@v4
21
- - name: Set up Python ${{ matrix.python-version }}
22
- uses: actions/setup-python@v5
23
- with:
24
- python-version: ${{ matrix.python-version }}
25
- - name: Install dependencies
26
- run: |
27
- python -m pip install --upgrade pip
28
- python -m pip install -e .[testing]
29
- - name: Test with pytest
30
- run: |
31
- pytest tests/
@@ -1,87 +0,0 @@
1
- name: Publish Package to PyPi
2
-
3
- on:
4
- release:
5
- types: [published]
6
-
7
- jobs:
8
- build:
9
- name: Build distribution 📦
10
- runs-on: ubuntu-latest
11
-
12
- steps:
13
- - uses: actions/checkout@v4
14
- - name: Set up Python
15
- uses: actions/setup-python@v5
16
- with:
17
- python-version: "3.10"
18
- - name: Install pypa/build
19
- run: >-
20
- python3 -m
21
- pip install
22
- build
23
- --user
24
- - name: Build a binary wheel and a source tarball
25
- run: python3 -m build
26
- - name: Store the distribution packages
27
- uses: actions/upload-artifact@v4
28
- with:
29
- name: python-package-distributions
30
- path: dist/
31
-
32
- publish-to-pypi:
33
- name: >-
34
- Publish Python 🐍 distribution 📦 to PyPI
35
- needs:
36
- - build
37
- runs-on: ubuntu-latest
38
- environment:
39
- name: pypi
40
- url: https://pypi.org/p/ducktools-pythonfinder
41
- permissions:
42
- id-token: write # IMPORTANT: mandatory for trusted publishing
43
-
44
- steps:
45
- - name: Download all the dists
46
- uses: actions/download-artifact@v4
47
- with:
48
- name: python-package-distributions
49
- path: dist/
50
- - name: Publish distribution 📦 to PyPI
51
- uses: pypa/gh-action-pypi-publish@release/v1
52
-
53
- github-release:
54
- name: >-
55
- Sign the Python 🐍 distribution 📦 with Sigstore
56
- and upload them to GitHub Release
57
- needs:
58
- - publish-to-pypi
59
- runs-on: ubuntu-latest
60
-
61
- permissions:
62
- contents: write # IMPORTANT: mandatory for making GitHub Releases
63
- id-token: write # IMPORTANT: mandatory for sigstore
64
-
65
- steps:
66
- - name: Download all the dists
67
- uses: actions/download-artifact@v4
68
- with:
69
- name: python-package-distributions
70
- path: dist/
71
- - name: Sign the dists with Sigstore
72
- uses: sigstore/gh-action-sigstore-python@v3.0.0
73
- with:
74
- release-signing-artifacts: false
75
- inputs: >-
76
- ./dist/*.tar.gz
77
- ./dist/*.whl
78
- - name: Upload artifact signatures to GitHub Release
79
- env:
80
- GITHUB_TOKEN: ${{ github.token }}
81
- # Upload to GitHub Release using the `gh` CLI.
82
- # `dist/` contains the built packages, and the
83
- # sigstore-produced signatures and certificates.
84
- run: >-
85
- gh release upload
86
- '${{ github.ref_name }}' dist/**
87
- --repo '${{ github.repository }}'
@@ -1,55 +0,0 @@
1
- name: Test Publish Package to TestPyPi
2
-
3
- on:
4
- push:
5
- tags:
6
- - "v[0-9]+.[0-9]+.[0-9]+*"
7
-
8
- jobs:
9
- build:
10
- name: Build distribution 📦
11
- runs-on: ubuntu-latest
12
-
13
- steps:
14
- - uses: actions/checkout@v4
15
- - name: Set up Python
16
- uses: actions/setup-python@v5
17
- with:
18
- python-version: "3.10"
19
- - name: Install pypa/build
20
- run: >-
21
- python3 -m
22
- pip install
23
- build
24
- --user
25
- - name: Build a binary wheel and a source tarball
26
- run: python3 -m build
27
- - name: Store the distribution packages
28
- uses: actions/upload-artifact@v4
29
- with:
30
- name: python-package-distributions
31
- path: dist/
32
-
33
- publish-to-testpypi:
34
- name: Publish Python 🐍 distribution 📦 to TestPyPI
35
- needs:
36
- - build
37
- runs-on: ubuntu-latest
38
-
39
- environment:
40
- name: testpypi
41
- url: https://test.pypi.org/p/ducktools-pythonfinder
42
-
43
- permissions:
44
- id-token: write # IMPORTANT: mandatory for trusted publishing
45
-
46
- steps:
47
- - name: Download all the dists
48
- uses: actions/download-artifact@v4
49
- with:
50
- name: python-package-distributions
51
- path: dist/
52
- - name: Publish distribution 📦 to TestPyPI
53
- uses: pypa/gh-action-pypi-publish@release/v1
54
- with:
55
- repository-url: https://test.pypi.org/legacy/
@@ -1,9 +0,0 @@
1
- graft src
2
- graft tests
3
- graft docs
4
-
5
- prune */build
6
- prune */dist
7
- prune */.pytest_cache
8
-
9
- global-exclude *~ *.py[cod] *.so
@@ -1,16 +0,0 @@
1
- # file generated by setuptools_scm
2
- # don't change, don't track in version control
3
- TYPE_CHECKING = False
4
- if TYPE_CHECKING:
5
- from typing import Tuple, Union
6
- VERSION_TUPLE = Tuple[Union[int, str], ...]
7
- else:
8
- VERSION_TUPLE = object
9
-
10
- version: str
11
- __version__: str
12
- __version_tuple__: VERSION_TUPLE
13
- version_tuple: VERSION_TUPLE
14
-
15
- __version__ = version = '0.4.2'
16
- __version_tuple__ = version_tuple = (0, 4, 2)