Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Minimise retyped code.

Aathish0971573cefd4
diff --git a/scripts/pycairoinstall.py b/scripts/pycairoinstall.py
index 3821f17af..41d9fa195 100644
--- a/scripts/pycairoinstall.py
+++ b/scripts/pycairoinstall.py
@@ -9,35 +9,30 @@ if "Windows" in platform.system():
# In case the python version is 3.6 and the system is 32-bit, try pycairo‑{ver_num}‑cp37‑cp37m‑win32.whl version of cairo
if sys.version[:3] == "3.6" and platform.machine() == "x86":
url = f"https://github.com/{fork}/pycairo/releases/download/v{ver_num}/pycairo-{ver_num}-cp36-cp36m-win32.whl"
- filename = f"pycairo-{ver_num}-cp36-cp36m-win32.whl"
# In case the python version is 3.6 and the system is 64-bit, try pycairo‑{ver_num}‑cp37‑cp37m‑win32.whl version of cairo
elif sys.version[:3] == "3.6" and platform.machine() == "AMD64":
url = f"https://github.com/{fork}/pycairo/releases/download/v{ver_num}/pycairo-{ver_num}-cp36-cp36m-win_amd64.whl"
- filename = f"pycairo-{ver_num}-cp36-cp36m-win_amd64.whl"
# In case the python version is 3.7 and the system is 32-bit, try pycairo‑{ver_num}‑cp37‑cp37m‑win32.whl version of cairo
elif sys.version[:3] == "3.7" and platform.machine() == "x86":
url = f"https://github.com/{fork}/pycairo/releases/download/v{ver_num}/pycairo-{ver_num}-cp37-cp37m-win32.whl"
- filename = f"pycairo-{ver_num}-cp37-cp37m-win32.whl"
# In case the python version is 3.7 and the system is AMD64, try pycairo-{ver_num}-cp37-cp37m-win_amd64.whl version of cairo
elif sys.version[:3] == "3.7" and platform.machine() == "AMD64":
url = f"https://github.com/{fork}/pycairo/releases/download/v{ver_num}/pycairo-{ver_num}-cp37-cp37m-win_amd64.whl"
- filename = f"pycairo-{ver_num}-cp37-cp37m-win_amd64.whl"
# In case the python version is 3.8 and the system is 32-bit, try pycairo-{ver_num}-cp38-cp38-win32.whl version of cairo
elif sys.version[:3] == "3.8" and platform.machine() == "x86":
url = f"https://github.com/{fork}/pycairo/releases/download/v{ver_num}/pycairo-{ver_num}-cp38-cp38-win32.whl"
- filename = f"pycairo-{ver_num}-cp38-cp38-win32.whl"
# In case the python version is 3.8 and the system is AMD64, try pycairo-{ver_num}-cp38-cp38-win_amd64.whl version of cairo
elif sys.version[:3] == "3.8" and platform.machine() == "AMD64":
url = f"https://github.com/{fork}/pycairo/releases/download/v{ver_num}/pycairo-{ver_num}-cp38-cp38-win_amd64.whl"
- filename = f"pycairo-{ver_num}-cp38-cp38-win_amd64.whl"
else:
raise Exception("Could not find a PyCairo version for your system!")
+ filename = url.split("/")[-1]
urllib.request.urlretrieve(url, filename)
os.system(f"pip{sys.version[:3]} install {filename}")
print("Installed PyCairo.\nCleaning up...")