whoruv 0.0.4__py3-none-any.whl
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.
Potentially problematic release.
This version of whoruv might be problematic. Click here for more details.
- whoruv/__init__.py +3 -0
- whoruv/__main__.py +9 -0
- whoruv/_core.py +25 -0
- whoruv-0.0.4.dist-info/METADATA +128 -0
- whoruv-0.0.4.dist-info/RECORD +7 -0
- whoruv-0.0.4.dist-info/WHEEL +4 -0
- whoruv-0.0.4.dist-info/entry_points.txt +3 -0
whoruv/__init__.py
ADDED
whoruv/__main__.py
ADDED
whoruv/_core.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
import sys
|
|
3
|
+
import os
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@dataclass
|
|
7
|
+
class PythonInfo:
|
|
8
|
+
version: str
|
|
9
|
+
executable_path: str
|
|
10
|
+
script_path: str
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def whoruv() -> PythonInfo:
|
|
14
|
+
return PythonInfo(
|
|
15
|
+
version=sys.version,
|
|
16
|
+
executable_path=sys.executable,
|
|
17
|
+
script_path=os.path.abspath(__file__),
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def format_python_info(info: PythonInfo) -> str:
|
|
22
|
+
return f"""Python Version: {info.version}
|
|
23
|
+
Executable Path: {info.executable_path}
|
|
24
|
+
Script Path: {info.script_path}
|
|
25
|
+
"""
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: whoruv
|
|
3
|
+
Version: 0.0.4
|
|
4
|
+
Summary: Display Python version, executable path, and script path when run with uv
|
|
5
|
+
Keywords: uv,python,version,path,tool
|
|
6
|
+
Author: heiwa4126
|
|
7
|
+
Author-email: heiwa4126 <heiwa4126@gmail.com>
|
|
8
|
+
License: MIT License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2025 heiwa4126@gmail.com
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
30
|
+
Classifier: Operating System :: OS Independent
|
|
31
|
+
Classifier: Programming Language :: Python :: 3
|
|
32
|
+
Requires-Python: >=3.9
|
|
33
|
+
Project-URL: Documentation, https://github.com/heiwa4126/whoruv#readme
|
|
34
|
+
Project-URL: Issues, https://github.com/heiwa4126/whoruv/issues
|
|
35
|
+
Project-URL: Source, https://github.com/heiwa4126/whoruv
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
|
|
38
|
+
# whoruv
|
|
39
|
+
|
|
40
|
+
[](https://pypi.org/project/whoruv)
|
|
41
|
+

|
|
42
|
+

|
|
43
|
+
[](https://opensource.org/licenses/MIT)
|
|
44
|
+
|
|
45
|
+
English | [日本語](https://github.com/heiwa4126/whoruv/blob/main/README-ja.md)
|
|
46
|
+
|
|
47
|
+
## Overview
|
|
48
|
+
|
|
49
|
+
A package that displays the following information when installed and executed with [Astral's uv](https://docs.astral.sh/uv/) using `uvx` or `uv tool install`:
|
|
50
|
+
|
|
51
|
+
- Python version
|
|
52
|
+
- Python executable path
|
|
53
|
+
- Script path
|
|
54
|
+
|
|
55
|
+
Created to understand the effects of uv's `--python` option.
|
|
56
|
+
|
|
57
|
+
## Usage Examples
|
|
58
|
+
|
|
59
|
+
```console
|
|
60
|
+
$ uvx whoruv
|
|
61
|
+
|
|
62
|
+
Installed 1 package in 3ms
|
|
63
|
+
Python Version: 3.12.12 (main, Oct 28 2025, 12:10:49) [Clang 20.1.4 ]
|
|
64
|
+
Executable Path: /home/user1/.cache/uv/archive-v0/VEm-1_LGBHubU7SZHYbs2/bin/python
|
|
65
|
+
Script Path: /home/user1/.cache/uv/archive-v0/VEm-1_LGBHubU7SZHYbs2/lib/python3.12/site-packages/whoruv/whoruv.py
|
|
66
|
+
|
|
67
|
+
$ uvx --python 3.10 whoruv
|
|
68
|
+
|
|
69
|
+
Installed 1 package in 3ms
|
|
70
|
+
Python Version: 3.10.12 (main, Aug 15 2025, 14:32:43) [GCC 11.4.0]
|
|
71
|
+
Executable Path: /home/user1/.cache/uv/archive-v0/Vcsgj4kD85VznE7HmFNsb/bin/python
|
|
72
|
+
Script Path: /home/user1/.cache/uv/archive-v0/Vcsgj4kD85VznE7HmFNsb/lib/python3.10/site-packages/whoruv/whoruv.py
|
|
73
|
+
|
|
74
|
+
$ uv tool install whoruv && whoruv
|
|
75
|
+
|
|
76
|
+
Resolved 1 package in 1ms
|
|
77
|
+
Installed 1 package in 3ms
|
|
78
|
+
+ whoruv==0.0.1
|
|
79
|
+
Installed 1 executable: whoruv
|
|
80
|
+
Python Version: 3.12.12 (main, Oct 28 2025, 12:10:49) [Clang 20.1.4 ]
|
|
81
|
+
Executable Path: /home/user1/.local/share/uv/tools/whoruv/bin/python
|
|
82
|
+
Script Path: /home/user1/.local/share/uv/tools/whoruv/lib/python3.12/site-packages/whoruv/whoruv.py
|
|
83
|
+
|
|
84
|
+
$ uv tool install --python 3.10 whoruv && whoruv
|
|
85
|
+
|
|
86
|
+
Ignoring existing environment for `whoruv`: the requested Python interpreter does not match the environment interpreter
|
|
87
|
+
Resolved 1 package in 1ms
|
|
88
|
+
Installed 1 package in 4ms
|
|
89
|
+
+ whoruv==0.0.1
|
|
90
|
+
Installed 1 executable: whoruv
|
|
91
|
+
Python Version: 3.10.12 (main, Aug 15 2025, 14:32:43) [GCC 11.4.0]
|
|
92
|
+
Executable Path: /home/user1/.local/share/uv/tools/whoruv/bin/python
|
|
93
|
+
Script Path: /home/user1/.local/share/uv/tools/whoruv/lib/python3.10/site-packages/whoruv/whoruv.py
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Development
|
|
97
|
+
|
|
98
|
+
### Setup
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
uv sync
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Task Execution
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Run tests
|
|
108
|
+
poe test
|
|
109
|
+
|
|
110
|
+
# Lint and format
|
|
111
|
+
poe check
|
|
112
|
+
poe format
|
|
113
|
+
|
|
114
|
+
# Type check
|
|
115
|
+
poe mypy
|
|
116
|
+
|
|
117
|
+
# Run all checks & build & smoke test
|
|
118
|
+
poe build
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Development Requirements
|
|
122
|
+
|
|
123
|
+
- Python >= 3.12
|
|
124
|
+
- uv
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
|
|
128
|
+
MIT
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
whoruv/__init__.py,sha256=JwfOz1soE26y70Xmq8femQ4HKr9S0sAB7mXZBYAjYN4,74
|
|
2
|
+
whoruv/__main__.py,sha256=9wPAJcgnQoqGd2-PRxS_JvAZR8s3T5WFvtdGAPaiXc0,148
|
|
3
|
+
whoruv/_core.py,sha256=v2j-oHKXhgaj9eDXhQ-qhNl1mY_e4DatwSWfiKPyYGM,497
|
|
4
|
+
whoruv-0.0.4.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
|
|
5
|
+
whoruv-0.0.4.dist-info/entry_points.txt,sha256=iUshjgsUnTGe8R6C_TWrxV4si67MSsRwK8SE9C8PcYI,49
|
|
6
|
+
whoruv-0.0.4.dist-info/METADATA,sha256=vZMDNTF8xVhiu6H268edZLET4yjxr9gOD9GTw8622k8,4473
|
|
7
|
+
whoruv-0.0.4.dist-info/RECORD,,
|