

Breaking 'pip install' to smaller steps, so I can modify the package before it i...
source link: https://www.codesd.com/item/breaking-pip-install-to-smaller-steps-so-i-can-modify-the-package-before-it-is-installed.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Breaking 'pip install' to smaller steps, so I can modify the package before it is installed
My familiarity with pip ends up with the ability to do: 'pip install', 'pip uninstall', and 'pip list' - with the name of the package I want to install as the single argument.
This limited knowledge carried me so far, to the extent I'm able to install most of the simple packages, and sometime, when I'm luck, I'm even able to install packages that requires compilation. This is all magic for me.
I'm now facing a situation where I need to do a little bit of editing to the C file (side note: this seems to be a known workaround for the 'netifaces' package - which everyone seems to be in peace with. By itself this is an amazing phenomena).
So I would like to break the installation into smaller steps:
- Download the egg file (I've figured out this one: pip install --download).
- Unzip or otherwise unpackage the package file, to the point I can edit individual
- Do my custom modification.
- Do the build
- Do the installation.
Other than step #1, I don't know how to proceed.
Install the package with
--no-install
option; with--no-install
option, pip downloads and unpacks all packages, but does not actually install the package.pip install --no-install netifaces
Change to the build directory. If you don't know where is the build directory, issue above command again, then it display the location.
cd /tmp/pip_build_falsetru/netifaces
Do the custom modification.
Install the package using
pip install .
(add --no-clean option if you want keep the build directory) orpython setup.py install
.sudo pip install --no-clean .
Clear the build directory.
UPDATE
pip 1.5 deprecated install --no-install
.
Step 1, Step 2 should be replaced as:
pip install -d . --allow-external netifaces --allow-unverified netifaces netifaces
tar xzf netifaces-0.8.tar.gz # Unpack the downloaded file.
cd netifaces-0.8
Recommend
-
55
Karabiner config generator DSL to easily modify Karabiner configuration The idea is to make a small language with first class support for v...
-
72
README.md pydicom
-
9
Feature CISO playbook: 3 steps to breaking in a new boss As CISOs know all too well, change is inevitable—and that includes organizational regime change....
-
9
Breaking unhealthy media habits in six simple steps Thursday, 11 February 2021 ∙ 5 minute read Shortly after I got my first iPhone, I started using it while walking up the stairs, sitting on the toilet and waiting...
-
6
Side-stepping session silliness – ORA-04068 and MODIFY_PACKAGE_STATE Posted on October 30, 2021...
-
4
Conversation The install paths for Linux have changed since the la...
-
6
Airbus' solar-powered drone crashes hours before breaking flight endurance record It stayed in the air for more than 64 days By
-
10
Elon Musk Promises Smaller, Cheaper Tesla, But We've Been Burned Before ...
-
5
Xiaomi Breaking: All Xiaomi 13 specs leak before the launch...
-
4
Dynamic Island won’t get any smaller before 2025 News ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK