1. Marcus Smith
  2. tox

Commits

holger krekel  committed ff58994

fix grouping of index-server specified deps

  • Participants
  • Parent commits 96afa7a
  • Branches default

Comments (0)

Files changed (6)

File CHANGELOG

View file
  • Ignore whitespace
+1.4.3.dev
+-----------------
+
+- fix grouping of index servers, it is now done by name instead of 
+  indexserver url, allowing to use it to separate dependencies
+  into groups even if using the same default indexserver.
+
 1.4.2
 -----------------
 

File setup.py

View file
  • Ignore whitespace
         description='virtualenv-based automation of test activities',
         long_description=long_description,
         url='http://codespeak.net/tox',
-        version='1.4.2',
+        version='1.4.3.dev0',
         license='GPLv2 or later',
         platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
         author='holger krekel',

File tests/test_venv.py

View file
  • Ignore whitespace
         [tox]
         indexserver =
             abc = ABC
+            abc2 = ABC
         [testenv:py123]
         deps=
             dep1
             :abc:dep2
+            :abc2:dep3
     """)
     venv = mocksession.getenv('py123')
     venv.create()
 
     venv.install_deps()
     # two different index servers, two calls
-    assert len(l) == 2
+    assert len(l) == 3
     args = " ".join(l[0].args)
     assert "-i" not in args
     assert "dep1" in args
     args = " ".join(l[1].args)
     assert "-i ABC" in args
     assert "dep2" in args
+    args = " ".join(l[2].args)
+    assert "-i ABC" in args
+    assert "dep3" in args
 
 def test_install_sdist_indexserver(newmocksession, tmpdir):
     mocksession = newmocksession([], """

File tox/__init__.py

View file
  • Ignore whitespace
 #
-__version__ = '1.4.2'
+__version__ = '1.4.3.dev0'
 
 class exception:
     class Error(Exception):

File tox/_venv.py

View file
  • Ignore whitespace
                 ixserver = self.envconfig.config.indexserver['default']
             else:
                 ixserver = dep.indexserver
-            url = ixserver.url
-            d.setdefault(url, []).append(dep.name)
-            if url not in l:
-                l.append(url)
-            assert url is None or isinstance(url, str)
+            d.setdefault(ixserver, []).append(dep.name)
+            if ixserver not in l:
+                l.append(ixserver)
+            assert ixserver.url is None or isinstance(ixserver.url, str)
 
         extraopts = extraopts or []
-        for repo in l:
-            args = d[repo] + extraopts
-            self.pip_install(args, repo, action)
+        for ixserver in l:
+            args = d[ixserver] + extraopts
+            self.pip_install(args, ixserver.url, action)
 
     def _getenv(self):
         env = self.envconfig.setenv

File toxbootstrap.py

View file
  • Ignore whitespace
 
 """
 
-__version__ = '1.4.2'
+__version__ = '1.4.3.dev0'
 
 import sys
 import os