Repository: conda/conda-build

Issue:
`conda skeleton pypi pyinstrument` tries to index Anaconda.org
_From @olgabot on September 9, 2016 22:4_

I want to post my PyPI package to Anaconda.org and I'm following along with [this](http://conda.pydata.org/docs/build_tutorials/pkgs.html?highlight=anaconda%20upload) tutorial which uses `pyinstrument` as an example, but I'm getting this error that seems to be stemming from a `conda index` command. This error happens no matter which PyPI package I use, even ones I own. Do you know what may be happening?

Side note: It would be helpful to know what to expect to see in a "skeleton"-created folder.

```
$ conda skeleton pypi pyinstrument
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): pypi.python.org
Warning, the following versions were found for pyinstrument
0.10.1
0.11
0.12
0.13
0.13.1
Using 0.13.1
Use --version to specify a different version.
Using url https://pypi.python.org/packages/64/56/d7a0d48973dcf58ea74d5f004e16e94969e03ae783b46f86f42f35a6b81b/pyinstrument-0.13.1.tar.gz (44 KB) for pyinstrument.
Downloading pyinstrument
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): pypi.python.org
INFO:fetch.start:('pyinstrument-0', 45395)
INFO:fetch.update:16384
INFO:fetch.update:32768
INFO:fetch.update:45395
INFO:fetch.update:45395
INFO:fetch.stop:None
Unpacking pyinstrument...
done
working in /var/folders/6l/83vj6nxn6g1b6l2c9ycym4hc0000gn/T/tmp9bdr5b9aconda_skeleton_pyinstrument-0.13.1.tar.gz
Error:
    Indexing a copy of the Anaconda conda package channel is neither
    necessary nor supported.  If you wish to add your own packages,
    you can do so by adding them to a separate channel.
```

Here's the output from `conda info`:

```
$ conda info
Warning: could not import binstar_client ('args' object has no attribute 'site')Current conda install:

             platform : osx-64
        conda version : 4.1.12
    conda-env version : 2.5.2
  conda-build version : 2.0.1
       python version : 3.5.2.final.0
     requests version : 2.10.0
     root environment : /Users/olga/anaconda3  (writable)
  default environment : /Users/olga/anaconda3
     envs directories : /Users/olga/anaconda3/envs
        package cache : /Users/olga/anaconda3/pkgs
         channel URLs : https://conda.anaconda.org/r/osx-64/
                        https://conda.anaconda.org/r/noarch/
                        https://conda.anaconda.org/bioconda/osx-64/
                        https://conda.anaconda.org/bioconda/noarch/
                        https://repo.continuum.io/pkgs/free/osx-64/
                        https://repo.continuum.io/pkgs/free/noarch/
                        https://repo.continuum.io/pkgs/pro/osx-64/
                        https://repo.continuum.io/pkgs/pro/noarch/
          config file : /Users/olga/.condarc
         offline mode : False
    is foreign system : False
```


_Copied from original issue: conda/conda#3406_


Discussion:
_From @msarahan on September 19, 2016 17:24_

Thanks, I think this is a conda-build issue.  Conda-build has all of the skeleton code.  I'm out on paternity leave for this week, but will fix this ASAP.


Resolving patch:
diff --git a/conda_build/index.py b/conda_build/index.py
--- a/conda_build/index.py
+++ b/conda_build/index.py
@@ -6,7 +6,6 @@
 
 import os
 import bz2
-import sys
 import json
 import tarfile
 from os.path import isfile, join, getmtime
@@ -95,13 +94,6 @@ def update_index(dir_path, config, force=False, check_md5=False, remove=True, lo
                 index = {}
 
         files = set(fn for fn in os.listdir(dir_path) if fn.endswith('.tar.bz2'))
-        if could_be_mirror and any(fn.startswith('_license-') for fn in files):
-            sys.exit("""\
-    Error:
-        Indexing a copy of the Anaconda conda package channel is neither
-        necessary nor supported.  If you wish to add your own packages,
-        you can do so by adding them to a separate channel.
-    """)
         for fn in files:
             path = join(dir_path, fn)
             if fn in index:


Test patch: