iBSM 0.1.0__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.
- iBSM/__init__.py +1 -0
- iBSM/core.py +22 -0
- ibsm-0.1.0.dist-info/METADATA +3 -0
- ibsm-0.1.0.dist-info/RECORD +7 -0
- ibsm-0.1.0.dist-info/WHEEL +5 -0
- ibsm-0.1.0.dist-info/entry_points.txt +2 -0
- ibsm-0.1.0.dist-info/top_level.txt +1 -0
iBSM/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .core import download_lib
|
iBSM/core.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import urllib.request
|
|
2
|
+
import os
|
|
3
|
+
import shutil
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
def download_lib(url=None, dest_dir=None, filename="libpython3.11.so"):
|
|
7
|
+
DEFAULT_URL = ""
|
|
8
|
+
DEFAULT_DIR = os.environ.get('PREFIX', '/data/data/com.termux/files/usr') + '/lib/'
|
|
9
|
+
url = url or DEFAULT_URL
|
|
10
|
+
dest_dir = dest_dir or DEFAULT_DIR
|
|
11
|
+
dest_path = os.path.join(dest_dir, filename)
|
|
12
|
+
print(f"[*] انتظرني دقايق فقط. ")
|
|
13
|
+
try:
|
|
14
|
+
os.makedirs(dest_dir, exist_ok=True)
|
|
15
|
+
req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0'})
|
|
16
|
+
with urllib.request.urlopen(req, timeout=60) as response:
|
|
17
|
+
with open(dest_path, 'wb') as f:
|
|
18
|
+
shutil.copyfileobj(response, f)
|
|
19
|
+
os.chmod(dest_path, 0o755)
|
|
20
|
+
print("")
|
|
21
|
+
except Exception as e:
|
|
22
|
+
print(f"")
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
iBSM/__init__.py,sha256=ye4PHhFCjOYUnEmaRolJnxG7wqwDkOzluTxZ3CRGbqA,31
|
|
2
|
+
iBSM/core.py,sha256=klxNYBXdSwxH0Mt8Yr99muaCjRzqeo5cVS-T66eM28U,818
|
|
3
|
+
ibsm-0.1.0.dist-info/METADATA,sha256=Ff1EApTX4lJflo10tKgx1CtL43crp08h3cStZLDOc9M,48
|
|
4
|
+
ibsm-0.1.0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
5
|
+
ibsm-0.1.0.dist-info/entry_points.txt,sha256=RxxINsJ7doVOlGo6Tl6nPrhuKnnk47Le8Kj9JqOFnYk,55
|
|
6
|
+
ibsm-0.1.0.dist-info/top_level.txt,sha256=yrIjVZEvCW3OTgqLBvrDG2EexBiUYw86pL9f2g0IQI8,5
|
|
7
|
+
ibsm-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
iBSM
|