Unpacking wheel files - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Unpacking wheel files (/thread-31481.html) |
Unpacking wheel files - DavidTheGrockle - Dec-14-2020 I am trying to open a .whl file. I went to https://pypi.org/project/tidegravity which takes you into GitHub. I then downloaded tidegravity-0.40b1-py3-none-any.whl into my Download file. I want to unzip this so I can check the authors' algebra coincides with the research paper they are working from. Following https://wheel.readthedocs.io/en/stable I wrote various little programs along the lines of unpack.py where unpack had two lines wheel upack tidegravity-0.40b1-py3-none-any.whl Unpacking to ./<some path> I cannot get this to work. I made various obvious variants but it said unpack was a syntax error. I checked that wheel was installed by trying >>>pip install wheel. I missed something obvious - please tell me what ! RE: Unpacking wheel files - buran - Dec-14-2020 why would you need to unzip the wheel file? Just look at the github repo. why would you write a py script to unzip the wheel? Just unzip it as regular archive with your program of choice and open the wheel or tar.gz file from pypi. if you want to use wheel unpack tidegravity-0.4.0b1-py3-none-any.whl - you need to run this from cmd/terminal shell, not inside python moduleif you still want to use py script - post your code in python tags and full traceback if you get any error. import zipfile with zipfile.ZipFile("tidegravity-0.4.0b1-py3-none-any.whl") as f: f.extractall('./somepath')or import subprocess subprocess.run(['wheel', 'unpack', 'tidegravity-0.4.0b1-py3-none-any.whl']) RE: Unpacking wheel files - snippsat - Dec-14-2020 As mention look at GitHub Repo As long a setup.py(what is used to make the wheel) is not outdated. Then files on Repo will be the same as the packed wheel. Then using git make more sense if want files local.G:\div_code λ git clone https://github.com/bradyzp/LongmanTide.git Cloning into 'LongmanTide'... remote: Enumerating objects: 7, done. remote: Counting objects: 100% (7/7), done. remote: Compressing objects: 100% (7/7), done. Receivinng objects: 92% (14emote: Total 161 (delta 0), reused 2 (delta 0), pack-reused 1549/161), 492.00 KiB | 302.00 KiB/s Receiving objects: 100% (161/161), 538.28 KiB | 302.00 KiB/s, done. Resolving deltas: 100% (67/67), done. Checking connectivity... done. G:\div_code λ cd LongmanTide\ G:\div_code\LongmanTide (master) λ ls LICENSE MANIFEST.in README.rst examples/ requirements.txt setup.cfg setup.py tests/ tidegravity/ RE: Unpacking wheel files - DavidTheGrockle - Dec-15-2020 OK Thank you all for this. I didn't understand how to use GitHub properly and I eventually found the code by poking my white stick here and there. DavidTheGrockle |