Can pip write their binary disks?

I am trying to solve the difference in behavior between two python installations, which are usually deterministic and have the same python package packages.

I suspect different .so files. Is there any reason to establish which binary disks of binary disks are installed, and for which architectures?

Update -

% pip show Name: scipy Version: 1.0.0rc1 Summary: SciPy: Scientific Library for Python Home-page: https://www.scipy.org Author: SciPy Developers Author-email: scipy-dev@python.org License: BSD Location: /usr/local/lib/python2.7/dist-packages Requires: numpy

The above package depends on things like libopenblas that need to be compiled. I'm not sure if pip used system installation or compiled BLAS during pip installation or was used as a precompiled version of BLAS for i386 or i686 - who knows.

In the above case, I:

 /usr/local/lib/python2.7/dist-packages/scipy/.libs/libopenblasp-r0-39a31c03.2.18.so 

I would like to see which package has differences in their installed .sos in difference systems.

+5
source share
1 answer

There is information, but you have to dig into the dist-info and / or egg-info subdirectories to find it.

  • Binary distributions include the RECORD file in a metadata subdirectory.
  • Source distribution includes the installed-files.txt in the metadata subdirectory.

RECORD files are csv lines (path, hash, size), as described in PEP-376 . The older installed-files.txt from the egg is just the names of the files, and you have to install these files manually.

As a simple example, I have the source and binary distributions of my copyingmock package available on PyPI . If the binary distribution is installed ( pip install copyingmock ):

 $ pip show --files copyingmock Name: copyingmock Version: 0.1 Summary: A subclass of MagicMock that copies the arguments Home-page: https://github.com/wimglenn/copyingmock Author: Wim Glenn Author-email: hey@wimglenn.com License: MIT Location: /tmp/blah/venv/lib/python3.6/site-packages Requires: Files: __pycache__/copyingmock.cpython-36.pyc copyingmock-0.1.dist-info/DESCRIPTION.rst copyingmock-0.1.dist-info/INSTALLER copyingmock-0.1.dist-info/LICENSE.txt copyingmock-0.1.dist-info/METADATA copyingmock-0.1.dist-info/RECORD copyingmock-0.1.dist-info/WHEEL copyingmock-0.1.dist-info/metadata.json copyingmock-0.1.dist-info/top_level.txt copyingmock.py $ cat venv/lib/python3.6/site-packages/copyingmock-0.1.dist-info/RECORD copyingmock.py,sha256=DoLAuaS7KqGT87BIlD93G1M7q9bNWgHYu1m1TZP1D1g,345 copyingmock-0.1.dist-info/DESCRIPTION.rst,sha256=L_0CS_8XNYgAVfq3tj3GZEYg_9vML9nDP-FUU37GIbs,1541 copyingmock-0.1.dist-info/LICENSE.txt,sha256=sDdX5cBRRpk3rmZ8hbYEfAUIYRdDqrlXmChOUkqf62o,1066 copyingmock-0.1.dist-info/METADATA,sha256=bKJ5RXwvj0rGrg22p4K91WiJoLM5MqLHYqlpWYWUhPU,2031 copyingmock-0.1.dist-info/RECORD,, copyingmock-0.1.dist-info/WHEEL,sha256=5wvfB7GvgZAbKBSE9uX9Zbi6LCL-_KgezgHblXhCRnM,113 copyingmock-0.1.dist-info/metadata.json,sha256=SLtuqq4tUGr0A2h4hQnZEdPIm_4MrvcunLzP-_1I7Qc,677 copyingmock-0.1.dist-info/top_level.txt,sha256=X3FsY_0npOxR5rKvOJ-b2rdiNfSiIivwVKN4JgY7cac,12 copyingmock-0.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 __pycache__/copyingmock.cpython-36.pyc,, 

Then force reinstall with the original distribution ( pip uninstall copyingmock and then pip install --no-binary=copyingmock copyingmock ):

 $ pip show --files copyingmock Name: copyingmock Version: 0.1 Summary: A subclass of MagicMock that copies the arguments Home-page: https://github.com/wimglenn/copyingmock Author: Wim Glenn Author-email: hey@wimglenn.com License: MIT Location: /tmp/blah/venv/lib/python3.6/site-packages Requires: Files: __pycache__/copyingmock.cpython-36.pyc copyingmock-0.1-py3.6.egg-info/PKG-INFO copyingmock-0.1-py3.6.egg-info/SOURCES.txt copyingmock-0.1-py3.6.egg-info/dependency_links.txt copyingmock-0.1-py3.6.egg-info/top_level.txt copyingmock.py $ cat venv/lib/python3.6/site-packages/copyingmock-0.1-py3.6.egg-info/installed-files.txt ../copyingmock.py ../__pycache__/copyingmock.cpython-36.pyc dependency_links.txt PKG-INFO top_level.txt SOURCES.txt 
+4
source

Source: https://habr.com/ru/post/1272678/


All Articles