python - setup.py & pip: override one of the dependency's sub-dependency from requirements.txt -
i'm working on package , in requirements.txt, have dependency: wikipedia
now,
wikipedia 1.3 uses requests-2.2.1 while package uses 2.3.0
also, 1 expect, wikipedia-1.3's installation depends on presence of it's dependency.
but, if start new virtualenv , directly include wikipedia in requirements.txt, gives importerror on requests since @ time setup.py runs, requests-2.3.0's setup.py doesn't execute unless others execute: (ref: in figure attached below, there's no 'running setup.py' requests after gets unpacked)
(for weird reason, wikipedia's setup.py contains 'import wikipedia', in turn imports it's dependencies before they're installed; passes ci test because it's installing requirements separately through pip , running setup.py)
to on come situation, i've made setup script consisting of:
pip install -r requirements.txt pip install wikipedia pip install -e .
- this installs requests-2.3.0 , beautifulsoup4;
- then installs wikipedia (which can run setup.py , installs wikipedia , requests-2.2.1)
- then 'pip install -e .' option installs package alongwith requests-2.3.0 again.
hence requests-2.3.0 first getting installed, getting replaced older version 2.2.1 , replaced again 2.3.0.
i tried going through various specifications on how overcome confusing. how overcome mess?
Comments
Post a Comment