<commit_before>{% extends "site_base.html" %}

{% block head_title %}Setting Up pip{% endblock %}

{% block body %}
    <h2>Per Command</h2>
    <div>
        <p>To use Crate.io on a per command basis you can use pip's -i option to tell it to use <a href="http://simple.crate.io/">http://simple.crate.io/</a> as it's index.</p>
        <p>For Example if you wanted to install lxml from Crate.io you would simple type <code>pip install -i http://simple.crate.io/ lxml</code></p>
    </div>

    <h2>Per Requirements File</h2>
    <div>
        <p>Pip also allows you to setup a custom index per requirements file, doing this is just as simple as per command, but it saves you from having to type it out each time.</p>
        <p>To enable Crate.io for a particular requirements file, just edit the file and add <code>-i http://simple.crate.io/</code> as the first line of the file. Save it and then run <code>pip install -r requirements.txt</code></p>
    </div>

    <h2>Globally</h2>
    <div>
        <p>You've tried it out per command, set up some of your requirements files to use it, now you're ready to go all out and Globally switch to Crate.io</p>
        <p>Luckily Pip makes this easy for us again and you can set up your global index url in pip.conf.</p>
        <p>If you are on Unix or OSX your pip.conf is located at <code>$HOME/.pip/pip.conf</code> while on windows it's located at <code>%HOME%\pip\pip.ini</code></p>
        <p>Once you have your pip.conf file open and ready to edit, just add (or edit!) your file so it includes a section like
<pre class="offset3 span6">
    [global]
    index-url = http://simple.crate.io/
</pre></p>
    </div>
{% endblock %}<commit_msg>add a super tip to the setting up pip page about the new shortcut<commit_after>{% extends "site_base.html" %}

{% block head_title %}Setting Up pip{% endblock %}

{% block body %}
    <div class="row">
        <div class="span8">
            <h2>Per Command</h2>
            <div>
                <p>To use Crate.io on a per command basis you can use pip's -i option to tell it to use <a href="http://simple.crate.io/">http://simple.crate.io/</a> as it's index.</p>
                <p>For Example if you wanted to install lxml from Crate.io you would simple type <code>pip install -i http://simple.crate.io/ lxml</code></p>
            </div>

            <h2>Per Requirements File</h2>
            <div>
                <p>Pip also allows you to setup a custom index per requirements file, doing this is just as simple as per command, but it saves you from having to type it out each time.</p>
                <p>To enable Crate.io for a particular requirements file, just edit the file and add <code>-i http://simple.crate.io/</code> as the first line of the file. Save it and then run <code>pip install -r requirements.txt</code></p>
            </div>

            <h2>Globally</h2>
            <div>
                <p>You've tried it out per command, set up some of your requirements files to use it, now you're ready to go all out and Globally switch to Crate.io</p>
                <p>Luckily Pip makes this easy for us again and you can set up your global index url in pip.conf.</p>
                <p>If you are on Unix or OSX your pip.conf is located at <code>$HOME/.pip/pip.conf</code> while on windows it's located at <code>%HOME%\pip\pip.ini</code></p>
                <p>Once you have your pip.conf file open and ready to edit, just add (or edit!) your file so it includes a section like
<pre class="span6">
    [global]
    index-url = http://simple.crate.io/
</pre></p>
            </div>
        </div>
        <div class="span4">
            <div class="well">
                <h2>Super Tip</h2>
                <p>
                    Typing <code>http://simple.crate.io/</code> on the command line can be kind of a drag, it is a little long after all.
                    That's why we've created a simple shortcut for you to use, instead of using <code>http://simple.crate.io/</code> you
                    can use <code>http://crate.io/s/</code>.
                </p>
                <p>An example would be:
                    <div><code>pip install -i http://crate.io/s/ lxml</code></div>
                </p>
                <p style="margin-top: 1em;">
                    Behind the scenes this just uses a simple redirect to send you to the <code>http://simple.crate.io/</code> page so
                    everything will work with this new shortcut! (owever I don't recommend using it in a requirements file or the global option,
                    for those you should still use the full fledged <code>http://simple.crate.io/</code> option.
                </p>
            </div>
        </div>
        {% endblock %}
{'fraction_non_alphanumeric': 0.11832946635730858, 'fraction_numerical': 0.004218519299725796, 'mean_word_length': 2.2214673913043477, 'pattern_counts': {'":': 0, '<': 116, '<?xml version=': 0, '>': 116, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 5}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '974429', 'n_tokens_mistral': 1461, 'n_tokens_neox': 1392, 'n_words': 586}