Example #1
0
    def _should_package_be_build(self, package, version):
        spec = "{}=={}".format(package, version)

        if self._blacklist and requirements.matched_by_list(package, version, self._blacklist):
            self._log_skip('Skipping %s %s as it is matched by the blacklist.', package, version)
            return False
        elif wheeler.has_compatible_wheel(self._devpi_client.list(spec)):
            self._log_skip('Skipping %s %s as is already available on the index.', package, version)
            return False
        elif self._pure_index_client and wheeler.has_compatible_wheel(self._pure_index_client.list(spec)):
            self._log_skip('Skipping %s %s as is already available on the pure index.', package, version)
            return False
        return True
Example #2
0
def _package_version_exists(client, index, package, version):
    client.use(index)
    spec = "{}=={}".format(package, version)
    packages = client.list(spec)
    return wheeler.has_compatible_wheel(packages)
Example #3
0
def package_version_exists(client, index, package, version):
    client.use(index)
    spec = "{}=={}".format(package, version)
    packages = client.list(spec)
    return wheeler.has_compatible_wheel(packages)
Example #4
0
 def test_has_no_compatible(self):
     packages = ['http://localhost:1234/sdist-1.0.tar.gz', 'http://localhost:1234/bad-1.0-py99-none-any.whl']
     self.assertFalse(wheeler.has_compatible_wheel(packages))
Example #5
0
 def test_has_compatible(self):
     packages = ['http://localhost:1234/good-1.0-py2.py3-none-any.whl', 'http://localhost:1234/bad-1.0-py99-none-any.whl']
     self.assertTrue(wheeler.has_compatible_wheel(packages))
 def test_has_no_compatible(self):
     packages = [
         'http://localhost:1234/sdist-1.0.tar.gz',
         'http://localhost:1234/bad-1.0-py99-none-any.whl'
     ]
     self.assertFalse(wheeler.has_compatible_wheel(packages))
 def test_has_compatible(self):
     packages = [
         'http://localhost:1234/good-1.0-py2.py3-none-any.whl',
         'http://localhost:1234/bad-1.0-py99-none-any.whl'
     ]
     self.assertTrue(wheeler.has_compatible_wheel(packages))