Repository: spack/spack

Issue:
Installation issue: faidx
`faidx` has multiple runtime errors.  PR incoming.

### Steps to reproduce the issue

```console
$ spack install py-pyfaidx
$ spack load -r py-pyfaidx
$ faidx home/gjv11003/genomes/hg38_dm6_cat/hg38_dm6_cat.fa -i chromsizes > chr_sizes_hg38_dm6.txt
Traceback (most recent call last):
  File "/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.4.0/py-pyfaidx-0.5.5.2-t7rhiwg7gulcfuhv3ejj7kz427dpatmt/bin/faidx", line 6, in <module>
    from pkg_resources import load_entry_point
ModuleNotFoundError: No module named 'pkg_resources'
```

If I correct for that error by adding the `'run'` dependency of `py-setuptools` I see that the package is missing the `six` dependency required by upstream's setup.py:

https://github.com/mdshw5/pyfaidx/blob/master/setup.py#L5

```python-traceback
Traceback (most recent call last):                                                                                                                                                             
  File "/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.4.0/py-pyfaidx-0.5.5.2-bsu2a67cknr7imh6xkj3yhqgw3lfkudg/bin/faidx", line 6, in <module>                                            
    from pkg_resources import load_entry_point                                                                                                                                                 
  File "/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.4.0/py-setuptools-41.0.1-6ll4vdwgfhpd5l7fhvu7wsct2mxvi5tz/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3241, in <mo
dule>                                                                                                                                                                                          
    @_call_aside                                                                                                                                                                               
  File "/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.4.0/py-setuptools-41.0.1-6ll4vdwgfhpd5l7fhvu7wsct2mxvi5tz/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3225, in _ca
ll_aside                                                                                                                                                                                       
    f(*args, **kwargs)                                                                                                                                                                         
  File "/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.4.0/py-setuptools-41.0.1-6ll4vdwgfhpd5l7fhvu7wsct2mxvi5tz/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3254, in _in
itialize_master_working_set                                                                                                                                                                    
    working_set = WorkingSet._build_master()                                                                                                                                                   
  File "/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.4.0/py-setuptools-41.0.1-6ll4vdwgfhpd5l7fhvu7wsct2mxvi5tz/lib/python2.7/site-packages/pkg_resources/__init__.py", line 583, in _bui
ld_master                                                                                                                                                                                      
    ws.require(__requires__)                                                                                                                                                                   
  File "/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.4.0/py-setuptools-41.0.1-6ll4vdwgfhpd5l7fhvu7wsct2mxvi5tz/lib/python2.7/site-packages/pkg_resources/__init__.py", line 900, in requ
ire                                                                                                                                                                                            
    needed = self.resolve(parse_requirements(requirements))                                                                                                                                    
  File "/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.4.0/py-setuptools-41.0.1-6ll4vdwgfhpd5l7fhvu7wsct2mxvi5tz/lib/python2.7/site-packages/pkg_resources/__init__.py", line 786, in reso
lve                                                                                                                                                                                            
    raise DistributionNotFound(req, requirers)                                                                                                                                                 
pkg_resources.DistributionNotFound: The 'six' distribution was not found and is required by pyfaidx
```

### Platform and user environment

Please report your OS here:
```commandline
$ uname -a 
Linux corelab2 4.15.0-55-generic #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -d
Description:    Ubuntu 18.04.3 LTS
``` 

Installation issue: faidx
`faidx` has multiple runtime errors.  PR incoming.

### Steps to reproduce the issue

```console
$ spack install py-pyfaidx
$ spack load -r py-pyfaidx
$ faidx home/gjv11003/genomes/hg38_dm6_cat/hg38_dm6_cat.fa -i chromsizes > chr_sizes_hg38_dm6.txt
Traceback (most recent call last):
  File "/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.4.0/py-pyfaidx-0.5.5.2-t7rhiwg7gulcfuhv3ejj7kz427dpatmt/bin/faidx", line 6, in <module>
    from pkg_resources import load_entry_point
ModuleNotFoundError: No module named 'pkg_resources'
```

If I correct for that error by adding the `'run'` dependency of `py-setuptools` I see that the package is missing the `six` dependency required by upstream's setup.py:

https://github.com/mdshw5/pyfaidx/blob/master/setup.py#L5

```python-traceback
Traceback (most recent call last):                                                                                                                                                             
  File "/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.4.0/py-pyfaidx-0.5.5.2-bsu2a67cknr7imh6xkj3yhqgw3lfkudg/bin/faidx", line 6, in <module>                                            
    from pkg_resources import load_entry_point                                                                                                                                                 
  File "/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.4.0/py-setuptools-41.0.1-6ll4vdwgfhpd5l7fhvu7wsct2mxvi5tz/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3241, in <mo
dule>                                                                                                                                                                                          
    @_call_aside                                                                                                                                                                               
  File "/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.4.0/py-setuptools-41.0.1-6ll4vdwgfhpd5l7fhvu7wsct2mxvi5tz/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3225, in _ca
ll_aside                                                                                                                                                                                       
    f(*args, **kwargs)                                                                                                                                                                         
  File "/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.4.0/py-setuptools-41.0.1-6ll4vdwgfhpd5l7fhvu7wsct2mxvi5tz/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3254, in _in
itialize_master_working_set                                                                                                                                                                    
    working_set = WorkingSet._build_master()                                                                                                                                                   
  File "/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.4.0/py-setuptools-41.0.1-6ll4vdwgfhpd5l7fhvu7wsct2mxvi5tz/lib/python2.7/site-packages/pkg_resources/__init__.py", line 583, in _bui
ld_master                                                                                                                                                                                      
    ws.require(__requires__)                                                                                                                                                                   
  File "/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.4.0/py-setuptools-41.0.1-6ll4vdwgfhpd5l7fhvu7wsct2mxvi5tz/lib/python2.7/site-packages/pkg_resources/__init__.py", line 900, in requ
ire                                                                                                                                                                                            
    needed = self.resolve(parse_requirements(requirements))                                                                                                                                    
  File "/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.4.0/py-setuptools-41.0.1-6ll4vdwgfhpd5l7fhvu7wsct2mxvi5tz/lib/python2.7/site-packages/pkg_resources/__init__.py", line 786, in reso
lve                                                                                                                                                                                            
    raise DistributionNotFound(req, requirers)                                                                                                                                                 
pkg_resources.DistributionNotFound: The 'six' distribution was not found and is required by pyfaidx
```

### Platform and user environment

Please report your OS here:
```commandline
$ uname -a 
Linux corelab2 4.15.0-55-generic #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -d
Description:    Ubuntu 18.04.3 LTS
``` 



Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/py-pyfaidx/package.py b/var/spack/repos/builtin/packages/py-pyfaidx/package.py
--- a/var/spack/repos/builtin/packages/py-pyfaidx/package.py
+++ b/var/spack/repos/builtin/packages/py-pyfaidx/package.py
@@ -14,4 +14,7 @@ class PyPyfaidx(PythonPackage):
 
     version('0.5.5.2', sha256='9ac22bdc7b9c5d995d32eb9dc278af9ba970481636ec75c0d687d38c26446caa')
 
-    depends_on('py-setuptools', type='build')
+    depends_on('py-setuptools@0.7:', type=('build', 'run'))
+    depends_on('py-six', type=('build', 'run'))
+    depends_on('py-ordereddict', type=('build', 'run'), when='^python@:2.6')
+    depends_on('py-argparse', type=('build', 'run'), when='^python@:2.6')


Test patch: