what is the difference in process between python setup.py install and pip install

Hello I have always assumed that pip install . and python setup.py install . from a same root directory of a package should produce the same results. Pip is build tool, isn't it? Expected behaviour in my head is: - pip make a nice package (even from the actual dir) - extract it in a build dir according to env settings - cd to build, setenv - and then do a python setup.py install Thus I expected naively that pip install . and python setup.py install should have the same results. Where is my mistake ? I have a reproducible case when the dependency handling differs if you use pip install -r requirements.txt or when you use python setup.py install https://github.com/zeromq/pyzmq/issues/414#issuecomment-24679800 I am trying to sort if the problem is environmental (OS related with bad env), me being stupid (happens a lot), or software related. I can reproduce it, however I cannot pinpoint what is the matter. Is it something obvious I ignore? Is there a way to trouble shoot that easily? Is there documentation that can help me understand easily the differences between both? I also have a very annoying bug that occurs when you install dependencies: from time to time calling pip install in a virtualenv does not : package that are installed failed to be seen by the module or by a requirement needing previously installed pacakage. My work around is to have a script that install every requirements one by one sleep a second, sleep 1 second and then install the module. This happens both on linux and windows. (looks like https://github.com/pypa/pip/issues/1183) It looks like a cache needing to be flushed and like a race condition. Cheers, Jul

Thus I expected naively that pip install . and python setup.py install should have the same results.
they process install_requires with different code, so things could turn out differently.
I have a reproducible case when the dependency handling differs if you use pip install -r requirements.txt or when you use python setup.py install https://github.com/zeromq/pyzmq/issues/414#issuecomment-24679800
I looked at this case, but atleast for me, the results were the same in all 3 cases (note that this project splits requirements.txt to generate 'install_requires') 1) python setup.py install 2) pip install . 3) pip install -r requirements.txt from "pip list" after the installs: anyjson (0.3.3) configparser (3.3.0r2) coverage (3.6) docutils (0.11) Jinja2 (2.7.1) MarkupSafe (0.18) picomongo (0.6) Pygments (1.6) pymongo (2.6.2) pyzmq (13.1.0) satlive (0.8.0) Sphinx (1.2b2) btw, pip<1.4 has a bug where a stale build directory can lead to unexpected results. check for the offending project in <venv>/build (if using a virtualenv), or if using a global python /tmp/pip-build-<username>
participants (2)
-
julien tayon
-
Marcus Smith