python-wheel

Include run-time dependencies in Python wheels

好久不见. 提交于 2019-11-30 12:10:06
I'd like to distribute a whole virtualenv, or a bunch of Python wheels of exact versions with their runtime dependencies, for example: pycurl pycurl.so libcurl.so libz.so libssl.so libcrypto.so libgssapi_krb5.so libkrb5.so libresolv.so I suppose I could rely on the system to have libssl.so installed, but surely not libcurl.so of the correct version and probably not Kerberos. What is the easiest way to package one library in a wheel with all the run-time dependency? Or is that a fool's errand and I should package entire virtualenv? How to do that reliably? P.S. compiling on the fly is not an

List dependencies of Python wheel file

吃可爱长大的小学妹 提交于 2019-11-30 06:46:17
I have Python wheel file: psutil-5.4.5-cp26-none-linux_x86_64.whl How can I list the dependencies this wheel has? As previously mentioned, .whl files are just ZIP archives. You can just open them and poke around in the METADATA file. There is a tool, however, that can make this manual process a bit easier. You can use pkginfo , which can be installed by just using pip. $ pip install pkginfo $ pkginfo -f 'requires_dist' psutil-5.4.5-cp27-none-win32.whl requires_dist: ["enum34; extra == 'enum'"] I just tried to unzip (not gunzip) a wheel package I had lying around. The packagename-version.dist

Wheel files : What is the meaning of “none-any” in protobuf-3.4.0-py2.py3-none-any.whl

☆樱花仙子☆ 提交于 2019-11-30 03:13:32
问题 I used pip to get .whl file for numpy pip wheel --wheel-dir=./ numpy and I have got numpy-1.13.3-cp27-cp27mu-linux_armv7l.whl because I am using ARM platform, but when run pip for protobuf pip wheel --wheel-dir=./ protobuf I got protobuf-3.4.0-py2.py3-none-any.whl So, why isn't linux_armv7l like the case of numpy, I didn't alter the machine and searched for that difference but no information. thanks for advice . 回答1: Let's split package names by components: numpy — package name 1.13.3 —

How can I make a Python Wheel from an existing native library?

你离开我真会死。 提交于 2019-11-29 21:48:12
Suppose I have a native shared library (.dll or .so), built independently of any Python mechanism, and a Python module using ctypes to interface to the library. Is there a way that I can build those into a .whl package? If so, how? Assuming this is possible, I think I'd need the wheel package installed and to use python setup.py bdist_wheel but what would my setup.py need to look like? I'd like to do this so I can upload Wheels for various platforms into a private package index and be able to pip install the appropriate one for the platform I'm on. Eric Smith Edit : Updated for newer versions

Wheel is a reference to the other Python

北战南征 提交于 2019-11-29 09:15:13
PEP 427 describes the move to .whl files from .egg for Python packaging. In the comparisons section of the PEP, there is point 6: Wheel is a reference to the other Python. I don't understand this point, what are they trying to say? .egg is a reference to the snake variety of python, .whl is a reference to Monty Python's "wheel of cheese" 来源: https://stackoverflow.com/questions/21113163/wheel-is-a-reference-to-the-other-python

List dependencies of Python wheel file

Deadly 提交于 2019-11-29 06:43:19
问题 I have Python wheel file: psutil-5.4.5-cp26-none-linux_x86_64.whl How can I list the dependencies this wheel has? 回答1: As previously mentioned, .whl files are just ZIP archives. You can just open them and poke around in the METADATA file. There is a tool, however, that can make this manual process a bit easier. You can use pkginfo, which can be installed with pip. CLI usage: $ pip install pkginfo $ pkginfo -f requires_dist psutil-5.4.5-cp27-none-win32.whl requires_dist: ["enum34; extra ==

What is the meaning of “Failed building wheel for X” in pip install?

血红的双手。 提交于 2019-11-29 02:52:12
This is a truly popular question here at SO, but none of the many answers I have looked at, clearly explain what this error really mean, and why it occurs. One source of confusion, is that when (for example) you do pip install pycparser , you first get the error: Failed building wheel for pycparser which is then followed by the message that the package was: Successfully installed pycparser-2.19 . # pip3 install pycparser Collecting pycparser Using cached https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz Building

Python packaging: wheels vs tarball (tar.gz)

好久不见. 提交于 2019-11-28 21:36:37
问题 The advantage of wheels over eggs is clear (see section why not egg? https://pypi.python.org/pypi/wheel). However, it is not entirely clear to me what is the advantage of using wheels over tar.gz . I might be missing something obvious like "they are the same". As I see it both can be installed directly using pip (even in Windows), have similar size and when packaging require a similar effort. It sounds to me like the kind of questions you might get when justifying a packaging methodology.

Install python wheel file without using pip

邮差的信 提交于 2019-11-28 21:27:02
Is it possible to install a Python wheel without using pip ? I always have issues with installing with pip , so I usually install libraries manually by copying and pasting. I'm wondering if there is a way to do wheel files in a similar manner. It is. Actually .whl files are just zip archives, so you can just extract their content and play with libraries path variable to make it work. Yet it is really bad practice. I'm assuming you have internet access , but you don't have a working pip installation . Download the pip wheel: wget https://files.pythonhosted.org/packages/0f/74

How to include external library with python wheel package

隐身守侯 提交于 2019-11-28 18:21:34
I want to create package for python that embeds and uses an external library ( .so ) on Linux using the cffi module. Is there standard way to include .so file into python package? The package will be used only internally and won't be published to pypi. I think Wheel packages are the best option - they would create platform specific package with all files ready to be copied so there will be no need to build anything on target environments. You can use auditwheel to inject the external libraries into the wheel: auditwheel repair: copies these external shared libraries into the wheel itself, and