(original) (raw)
On 25 Feb 2015 07:23, "Alexander Belopolsky" <alexander.belopolsky@gmail.com> wrote:
\>
\>
\> On Tue, Feb 24, 2015 at 2:03 PM, Daniel Holth <dholth@gmail.com> wrote:
\> >
\> > > Is there a recommended way to invoke pip from setup.py? When I specify
\> > > "tests\_require=" and run "python setup.py test", the requirements get
\> > > installed using setuptools' easy\_install function.
\> >
\> > The solution is to not do that. A substitute is to specify your test
\> > requirements in a \[test\] extra and install them with pip or to run
\> > tests with tox. This gives control of the installer back to the user
\> > instead of the setup.py author.
\>
\>
\> Isn't this a chicken and egg problem? I currently have
\>
\> tests\_require=\['tox'\],
\>
\> and this is exactly what tox recommends:
\>
\> https://testrun.org/tox/latest/example/basic.html#integration-with-setuptools-distribute-test-commands
\>
\>
\> 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?
If running in the system Python isn't absolutely essential, then the Python 2.7 collection from softwarecollections.org 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.
Failing that, pip & virtualenv are also available from the EPEL 6 repos.
Both of those approaches rely on the system package manager to do the bootstrapping of the Python specific tooling.
If both softwarecollections.org 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)
Regards,
Nick.
>
\>
\> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
\> Python-Dev mailing list
\> Python-Dev@python.org
\> https://mail.python.org/mailman/listinfo/python-dev
\> Unsubscribe: https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com
\>