airobo 0.1.7__py3-none-any.whl → 0.1.9__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.
- airobo/api.py +25 -14
- {airobo-0.1.7.dist-info → airobo-0.1.9.dist-info}/METADATA +1 -1
- {airobo-0.1.7.dist-info → airobo-0.1.9.dist-info}/RECORD +6 -6
- {airobo-0.1.7.dist-info → airobo-0.1.9.dist-info}/WHEEL +0 -0
- {airobo-0.1.7.dist-info → airobo-0.1.9.dist-info}/entry_points.txt +0 -0
- {airobo-0.1.7.dist-info → airobo-0.1.9.dist-info}/top_level.txt +0 -0
airobo/api.py
CHANGED
@@ -31,23 +31,34 @@ Get version from pyproject.toml
|
|
31
31
|
"""
|
32
32
|
def version():
|
33
33
|
try:
|
34
|
-
#
|
34
|
+
# First try to get the directory where this file is located
|
35
35
|
current_dir = os.path.dirname(os.path.abspath(__file__))
|
36
|
-
# Go up one level to get to the project root
|
37
|
-
project_root = os.path.dirname(current_dir)
|
38
|
-
toml_path = os.path.join(project_root, 'pyproject.toml')
|
39
36
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
37
|
+
# Try multiple possible locations for pyproject.toml
|
38
|
+
possible_paths = [
|
39
|
+
# In development: go up one level from airobo/ to project root
|
40
|
+
os.path.join(os.path.dirname(current_dir), 'pyproject.toml'),
|
41
|
+
# Alternative: same directory as this file
|
42
|
+
os.path.join(current_dir, 'pyproject.toml'),
|
43
|
+
# Alternative: current working directory
|
44
|
+
os.path.join(os.getcwd(), 'pyproject.toml')
|
45
|
+
]
|
48
46
|
|
49
|
-
|
50
|
-
|
47
|
+
for toml_path in possible_paths:
|
48
|
+
if os.path.exists(toml_path):
|
49
|
+
with open(toml_path, 'r') as f:
|
50
|
+
content = f.read()
|
51
|
+
# Extract version using regex
|
52
|
+
version_match = re.search(r'version\s*=\s*["\']([^"\']+)["\']', content)
|
53
|
+
if version_match:
|
54
|
+
print(version_match.group(1))
|
55
|
+
return
|
56
|
+
|
57
|
+
# If no file found, fallback
|
58
|
+
print("0.1.7") # Use current known version as fallback
|
59
|
+
except Exception as e:
|
60
|
+
# Fallback on any error
|
61
|
+
print("0.1.7")
|
51
62
|
except Exception:
|
52
63
|
# Fallback on any error
|
53
64
|
print("1337")
|
@@ -1,10 +1,10 @@
|
|
1
1
|
airobo/__init__.py,sha256=wQC93xBJqTm_jHoO4hD_A9SP4vvVAMzOUM3vn_-bsB0,24
|
2
|
-
airobo/api.py,sha256=
|
2
|
+
airobo/api.py,sha256=cCEozyDxs5sd-OLvMr2pTbmRQXXwVUVvSemZP2H8EbY,2102
|
3
3
|
airobo/cli.py,sha256=81dIVLVrsVbJa_aZK7SNzT7dHc6aEB3jIaq4Fm5MBvo,991
|
4
4
|
airobo/modules/publishAndroid.py,sha256=D1tmKAoYlIt85MhtOyAZXiVtscxiIgzFodqbVEbU_Ok,98
|
5
5
|
airobo/modules/publishIOS.py,sha256=5HtnBejXtFNGJ719ydfKX0IO4hoJD5MlxKbmD-S7Dbg,90
|
6
|
-
airobo-0.1.
|
7
|
-
airobo-0.1.
|
8
|
-
airobo-0.1.
|
9
|
-
airobo-0.1.
|
10
|
-
airobo-0.1.
|
6
|
+
airobo-0.1.9.dist-info/METADATA,sha256=ppL3u8S0jA6OklRLP_j-VypyW0hGiVhggCrADwXPhMo,207
|
7
|
+
airobo-0.1.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
8
|
+
airobo-0.1.9.dist-info/entry_points.txt,sha256=tWld-TShvEFSonDWXCvsiBq-dNOY3Qo6FI48pd1S7eE,43
|
9
|
+
airobo-0.1.9.dist-info/top_level.txt,sha256=3vchuQftD3xE45bZMuHJVTRVpiC8FKJyJwsrGAjfwKg,7
|
10
|
+
airobo-0.1.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|