<p dir="ltr"><br>
On 25 Feb 2015 07:23, "Alexander Belopolsky" <<a href="mailto:alexander.belopolsky@gmail.com">alexander.belopolsky@gmail.com</a>> wrote:<br>
><br>
><br>
> On Tue, Feb 24, 2015 at 2:03 PM, Daniel Holth <<a href="mailto:dholth@gmail.com">dholth@gmail.com</a>> wrote:<br>
> ><br>
> > > Is there a recommended way to invoke pip from setup.py? When I specify<br>
> > > "tests_require=" and run "python setup.py test", the requirements get<br>
> > > installed using setuptools' easy_install function.<br>
> ><br>
> > The solution is to not do that. A substitute is to specify your test<br>
> > requirements in a [test] extra and install them with pip or to run<br>
> > tests with tox. This gives control of the installer back to the user<br>
> > instead of the setup.py author.<br>
><br>
><br>
> Isn't this a chicken and egg problem? I currently have<br>
><br>
> tests_require=['tox'],<br>
><br>
> and this is exactly what tox recommends:<br>
><br>
> <a href="https://testrun.org/tox/latest/example/basic.html#integration-with-setuptools-distribute-test-commands">https://testrun.org/tox/latest/example/basic.html#integration-with-setuptools-distribute-test-commands</a><br>
><br>
><br>
> Note that my CI box is a CentOS 6.5 with Python 2.6.6, setuptools 0.6. This is still a very common server configuration. What is the recommended way to bootstrap tox in such environment?</p>
<p dir="ltr">If running in the system Python isn't absolutely essential, then the Python 2.7 collection from <a href="http://softwarecollections.org">softwarecollections.org</a> is the preferred way to get a newer Python 2 (including pip et al) on CentOS. You can also get access to Python 3 that way.</p>
<p dir="ltr">Failing that, pip & virtualenv are also available from the EPEL 6 repos. </p>
<p dir="ltr">Both of those approaches rely on the system package manager to do the bootstrapping of the Python specific tooling. </p>
<p dir="ltr">If both <a href="http://softwarecollections.org">softwarecollections.org</a> and EPEL are considered unacceptable dependencies, then you're going to have to do your own bootstrapping for PyPI access on CentOS (which may include relying on easy_install to bootstrap pip and/or virtualenv) </p>
<p dir="ltr">Regards,<br>
Nick.</p>
<p dir="ltr">><br>
><br>
> _______________________________________________<br>
> Python-Dev mailing list<br>
> <a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/python-dev">https://mail.python.org/mailman/listinfo/python-dev</a><br>
> Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com">https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com</a><br>
><br>
</p>