pypicloud.util module

Utilities

class pypicloud.util.BetterScrapingLocator(*args, **kw)[source]

Bases: distlib.locators.SimpleScrapingLocator

Layer on top of SimpleScrapingLocator that allows preferring wheels

locate(requirement, prereleases=False, wheel=True)[source]
prefer_wheel = True[source]
score_url(url)[source]
class pypicloud.util.NormalizeNameHackString[source]

Bases: unicode

Super hacked wrapper around a string that runs normalize_name before doing equality comparisons

lower()[source]
pypicloud.util.create_matcher(queries, query_type)[source]

Create a matcher for a list of queries

Parameters:

queries : list

List of queries

query_type: str

Type of query to run: [“or”|”and”]

Returns:

Matcher function

pypicloud.util.getdefaults(settings, *args)[source]

Attempt multiple gets from a dict, returning a default value if none of the keys are found.

pypicloud.util.is_compatible(wheel, tags=None)[source]

Hacked function to monkey patch into distlib

pypicloud.util.normalize_name(name)[source]

Normalize a python package name

pypicloud.util.parse_filename(filename, name=None)[source]

Parse a name and version out of a filename