[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-dev
Subject:    Re: [Python-Dev] easy_install ?
From:       Daniel Holth <dholth () gmail ! com>
Date:       2015-02-24 23:39:32
Message-ID: CAG8k2+6gLUw3kPewzDu0bWn0-c2wdH_e9mi=sCyvRPeb2BOuiA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


The other option might be to use http://bitbucket.org/dholth/setup-requires

It uses pip to install requirements into an isolated directory before
setup.py runs, with pip, doing exactly what you requested.
On Feb 24, 2015 5:44 PM, "Nick Coghlan" <ncoghlan@gmail.com> wrote:

>
> 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
> >
>

[Attachment #5 (text/html)]

<p dir="ltr">The other option might be to use <a \
href="http://bitbucket.org/dholth/setup-requires">http://bitbucket.org/dholth/setup-requires</a></p>
 <p dir="ltr">It uses pip to install requirements into an isolated directory before \
setup.py runs, with pip, doing exactly what you requested.</p> <div \
class="gmail_quote">On Feb 24, 2015 5:44 PM, &quot;Nick Coghlan&quot; &lt;<a \
href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>&gt; wrote:<br \
type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr"><br> On 25 Feb 2015 \
07:23, &quot;Alexander Belopolsky&quot; &lt;<a \
href="mailto:alexander.belopolsky@gmail.com" \
target="_blank">alexander.belopolsky@gmail.com</a>&gt; wrote:<br> &gt;<br>
&gt;<br>
&gt; On Tue, Feb 24, 2015 at 2:03 PM, Daniel Holth &lt;<a \
href="mailto:dholth@gmail.com" target="_blank">dholth@gmail.com</a>&gt; wrote:<br> \
&gt; &gt;<br> &gt; &gt; &gt; Is there a recommended way to invoke pip from setup.py?  \
When I specify<br> &gt; &gt; &gt; &quot;tests_require=&quot; and run &quot;python \
setup.py test&quot;, the requirements get<br> &gt; &gt; &gt; installed using \
setuptools&#39; easy_install function.<br> &gt; &gt;<br>
&gt; &gt; The solution is to not do that. A substitute is to specify your test<br>
&gt; &gt; requirements in a [test] extra and install them with pip or to run<br>
&gt; &gt; tests with tox. This gives control of the installer back to the user<br>
&gt; &gt; instead of the setup.py author.<br>
&gt;<br>
&gt;<br>
&gt; Isn&#39;t this a chicken and egg problem?   I currently have<br>
&gt;<br>
&gt; tests_require=[&#39;tox&#39;],<br>
&gt;<br>
&gt; and this is exactly what tox recommends:<br>
&gt;<br>
&gt; <a href="https://testrun.org/tox/latest/example/basic.html#integration-with-setuptools-distribute-test-commands" \
target="_blank">https://testrun.org/tox/latest/example/basic.html#integration-with-setuptools-distribute-test-commands</a><br>
 &gt;<br>
&gt;<br>
&gt; 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&#39;t \
absolutely essential, then the Python 2.7 collection from <a \
href="http://softwarecollections.org" target="_blank">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 &amp; \
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" \
target="_blank">softwarecollections.org</a> and EPEL are considered unacceptable \
dependencies, then you&#39;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">&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Python-Dev mailing list<br>
&gt; <a href="mailto:Python-Dev@python.org" \
target="_blank">Python-Dev@python.org</a><br> &gt; <a \
href="https://mail.python.org/mailman/listinfo/python-dev" \
target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br> &gt; \
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com" \
target="_blank">https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com</a><br>
 &gt;<br>
</p>
</blockquote></div>



_______________________________________________
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/python-dev-marcsub-zyf4%40marc.info


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic