How to use the virtualenv.__version__ function in virtualenv

To help you get started, we’ve selected a few virtualenv examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pypa / virtualenv / tests / test_source_content.py View on Github external
def test_wheel_contains(extracted_wheel):
    content = set(extracted_wheel.iterdir())

    names = {i.name for i in content}
    must_have = {
        # sources
        "virtualenv.py",
        "virtualenv_support",
        "virtualenv-{}.dist-info".format(virtualenv.__version__),
    }
    assert must_have == names

    support = {i.name for i in (extracted_wheel / "virtualenv_support").iterdir()}
    assert "__init__.py" in support
    for package in ("pip", "wheel", "setuptools"):
        assert any(package in i for i in support)

    meta = {i.name for i in (extracted_wheel / "virtualenv-{}.dist-info".format(virtualenv.__version__)).iterdir()}
    assert {"entry_points.txt", "WHEEL", "RECORD", "METADATA", "top_level.txt", "zip-safe", "LICENSE.txt"} == meta
github pypa / virtualenv / tests / test_source_content.py View on Github external
names = {i.name for i in content}
    must_have = {
        # sources
        "virtualenv.py",
        "virtualenv_support",
        "virtualenv-{}.dist-info".format(virtualenv.__version__),
    }
    assert must_have == names

    support = {i.name for i in (extracted_wheel / "virtualenv_support").iterdir()}
    assert "__init__.py" in support
    for package in ("pip", "wheel", "setuptools"):
        assert any(package in i for i in support)

    meta = {i.name for i in (extracted_wheel / "virtualenv-{}.dist-info".format(virtualenv.__version__)).iterdir()}
    assert {"entry_points.txt", "WHEEL", "RECORD", "METADATA", "top_level.txt", "zip-safe", "LICENSE.txt"} == meta
github cloudfoundry / python-buildpack / vendor / virtualenv-1.8.4 / docs / conf.py View on Github external
# The suffix of source filenames.
source_suffix = '.txt'

# The master toctree document.
master_doc = 'index'

# General substitutions.
project = 'virtualenv'
copyright = '2007-2012, Ian Bicking, The Open Planning Project, The virtualenv developers'

# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
try:
    from virtualenv import __version__
    # The short X.Y version.
    version = '.'.join(__version__.split('.')[:2])
    # The full version, including alpha/beta/rc tags.
    release = __version__
except ImportError:
    version = release = 'dev'

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
today_fmt = '%B %d, %Y'

# List of documents that shouldn't be included in the build.
unused_docs = []

# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
github servo / mozjs / mozjs / python / virtualenv / docs / conf.py View on Github external
# The suffix of source filenames.
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General substitutions.
project = 'virtualenv'
copyright = '2007-2014, Ian Bicking, The Open Planning Project, PyPA'

# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
try:
    from virtualenv import __version__
    # The short X.Y version.
    version = '.'.join(__version__.split('.')[:2])
    # The full version, including alpha/beta/rc tags.
    release = __version__
except ImportError:
    version = release = 'dev'

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
today_fmt = '%B %d, %Y'

# List of documents that shouldn't be included in the build.
unused_docs = []

# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
github pypa / virtualenv / docs / conf.py View on Github external
env = os.environ.copy()
    env["PATH"] += os.pathsep.join([os.path.dirname(sys.executable)] + env["PATH"].split(os.pathsep))
    changelog = subprocess.check_output(
        ["towncrier", "--draft", "--version", "DRAFT"], cwd=str(ROOT_SRC_TREE_DIR), env=env
    ).decode("utf-8")
    if "No significant changes" in changelog:
        content = ""
    else:
        note = "*Changes in master, but not released yet are under the draft section*."
        content = "{}\n\n{}".format(note, changelog)
    (ROOT_SRC_TREE_DIR / "docs" / "_draft.rst").write_text(content)


generate_draft_news()

version = ".".join(__version__.split(".")[:2])
release = __version__

today_fmt = "%B %d, %Y"
unused_docs = []
pygments_style = "sphinx"
exclude_patterns = ["changelog/*"]

extlinks = {
    "issue": ("https://github.com/pypa/virtualenv/issues/%s", "#"),
    "pull": ("https://github.com/pypa/virtualenv/pull/%s", "PR #"),
}

html_theme = "sphinx_rtd_theme"
html_theme_options = {
    "canonical_url": "https://virtualenv.pypa.io/en/latest/",
    "logo_only": False,
github cloudfoundry / go-buildpack / vendor / virtualenv-1.11.6 / docs / conf.py View on Github external
# The suffix of source filenames.
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General substitutions.
project = 'virtualenv'
copyright = '2007-2014, Ian Bicking, The Open Planning Project, PyPA'

# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
try:
    from virtualenv import __version__
    # The short X.Y version.
    version = '.'.join(__version__.split('.')[:2])
    # The full version, including alpha/beta/rc tags.
    release = __version__
except ImportError:
    version = release = 'dev'

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
today_fmt = '%B %d, %Y'

# List of documents that shouldn't be included in the build.
unused_docs = []

# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
github airspeed-velocity / asv / asv / plugins / virtualenv.py View on Github external
def matches(self, python):
        if not (re.match(r'^[0-9].*$', python) or re.match(r'^pypy[0-9.]*$', python)):
            # The python name should be a version number, or pypy+number
            return False

        try:
            import virtualenv
        except ImportError:
            return False
        else:
            if LooseVersion(virtualenv.__version__) == LooseVersion('1.11.0'):
                log.warning(
                    "asv is not compatible with virtualenv 1.11 due to a bug in "
                    "setuptools.")
            if LooseVersion(virtualenv.__version__) < LooseVersion('1.10'):
                log.warning(
                    "If using virtualenv, it much be at least version 1.10")

        executable = Virtualenv._find_python(python)
        return executable is not None
github airspeed-velocity / asv / asv / plugins / virtualenv.py View on Github external
def matches(self, python):
        if not (re.match(r'^[0-9].*$', python) or re.match(r'^pypy[0-9.]*$', python)):
            # The python name should be a version number, or pypy+number
            return False

        try:
            import virtualenv
        except ImportError:
            return False
        else:
            if LooseVersion(virtualenv.__version__) == LooseVersion('1.11.0'):
                log.warning(
                    "asv is not compatible with virtualenv 1.11 due to a bug in "
                    "setuptools.")
            if LooseVersion(virtualenv.__version__) < LooseVersion('1.10'):
                log.warning(
                    "If using virtualenv, it much be at least version 1.10")

        executable = Virtualenv._find_python(python)
        return executable is not None