I have a python wheel package, when extracted I find some python code, I'd like to edit this code and re-generate the same .whl package again and test it to see the edits .. How do I do that?
You need a suitable software like Python from Python Software Foundation to open a WHL file. Without proper software you will receive a Windows message "How do you want to open this file?" or "Windows cannot open this file" or a similar Mac/iPhone/Android alert.
What Is a Python Wheel? A Python . whl file is essentially a ZIP ( . zip ) archive with a specially crafted filename that tells installers what Python versions and platforms the wheel will support. A wheel is a type of built distribution.
A WHL (Wheel) file is a distribution package file saved in Python's wheel format. It is a standard format installation of Python distributions and contains all the files and metadata required for installation. The WHL file also contains information about the Python versions and platforms supported by this wheel file.
Wheel provides the wheel
command in addition to just setup.py bdist_wheel
. Use wheel unpack [file.whl]
to open the wheel, edit what you will, and then use wheel pack [directory]
to put it back together again.
You usually don't.
Normally you get the source package instead of the wheel (or use development mode
to install the package in editable form) and rebuild the wheel from that, e.g. by running python setup.py bdist_wheel
.
Have a look at https://packaging.python.org/distributing/ for a lot of information how to build those wheel packages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With