GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Allow tox environments to run in windows (i.e. don't rely on bash) · Issue #1123 · googleapis/google-cloud-python

Allow tox environments to run in windows (i.e. don't rely on bash) #1123

New issue
Copy link
New issue
Copy link
Closed
Closed
Allow tox environments to run in windows (i.e. don't rely on bash)#1123
Copy link
Assignees
dhermes
Labels
testing

Description

@dhermes
dhermes
opened on Sep 2, 2015
Issue body actions

Currently we heavily rely on bash in our tox.ini:

  • cover.sh (Removing cover.sh and folding into tox config. #1237)
  • custom_pip_install.sh (Removing use of wheelhouse and relying on Travis caching. #1350)
  • merge.sh (Removing merge.sh. #1364 Only run from .travis.yml, no longer needed after Removing use of wheelhouse and relying on Travis caching. #1350 is in since merge.sh only delegates to update_docs.sh after the fact)
  • pep8_on_repo.sh (Updating lint tox rule #1348)
  • run_system_tests.sh (Move system test runner from bash to Python #1349)
  • update_docs.sh (Only run from merge.sh)
  • update_wheels_project.sh (Removing use of wheelhouse and relying on Travis caching. #1350)
  • Makefile

We could do this by re-thinking those commands and just using shell-agnostic commands in tox.ini or we could get someone who knows Windows well to write a PowerShell equivalent for us.


A nice tox tricks and patterns post suggests using a foo.cmd file and then

#!/bin/bash -eE

:<<"::batch"
@echo off
powershell -ExecutionPolicy ByPass -File foo.ps1 %*
goto :end
::batch

foo.sh $*
exit $?

:<<"::done"
:end
::done

where foo.ps1 is PowerShell and foo.sh is bash.

This way the ::batch heredoc gets run on Windows and skips over the foo.sh part via goto :end, while on *nix systems the ::done heredoc is skipped due to the exit $?

UPDATE: I wasn't sure what the : did before the heredocs but I see that it acts as a way to comment them out in bash. This helps explain the Windows side of things; the lines starting with : and :: are ignored, but those with : can be jumped to while the others can't.

Activity

  1. dhermes
    added
    testing
    on Sep 2, 2015
  2. dhermes
    added 4 commits that reference this issue on Nov 20, 2015

    Removing cover.sh and folding into tox config.

    77cbba0

    Removing cover.sh and folding into tox config.

    40d93bc

    Making custom_pip_install.sh Windows friendly.

    7daefc3

    Making custom_pip_install.sh Windows friendly.

    21080c4
  3. dhermes
    added a commit that references this issue on Jan 4, 2016

    Making custom_pip_install.sh Windows friendly.

    bbed9d1
  4. dhermes commented on Feb 21, 2016

    @dhermes
    dhermes
    on Feb 21, 2016
    ContributorAuthor
    More actions

    Closing this out since our remaining bash is not used by tox.

  5. dhermes
    closed this as completedon Feb 21, 2016
  6. JustinBeckwith
    assigned
    dhermes
    on Feb 1, 2021
  7. parthea
    added 5 commits that reference this issue on Sep 22, 2023

    Auto-update dependencies. [(#1123)](GoogleCloudPlatform/python-docs-s…

    fc346e6

    docs: add samples from video/cloud-client/labels (#49)

    ebf4273

    Auto-update dependencies. [(#1123)](GoogleCloudPlatform/python-docs-s…

    640a0c5

    docs: add samples from video/cloud-client/shotchange (#72)

    0ed386e

    feat!: use microgenerator (#76)

    32ef47f
  8. parthea
    added 4 commits that reference this issue on Nov 22, 2025

    chore: Update gapic-generator-python to 1.25.0 (#1123)

    4a58d73

    fix: refactor mtls logic to standalone method (#1123)

    21c80f2

    chore: adds Python 3.7/3.8 EOL pending deprecation warning (#1123)

    de4b024

    fix: fix socket leak in impersonated_credentials (#1123)

    5ad86d4
  9. parthea
    added 4 commits that reference this issue on Mar 2, 2026

    chore: Update gapic-generator-python to 1.25.0 (#1123)

    c5d93e3

    docs(samples): Update Topic with Kinesis Ingestion Settings (#1123)

    60915cf

    doc: share design document for query retry logic (#1123)

    40891f9

    chore(main): release 3.45.0 (#1123)

    9cfb7c7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dhermes
    dhermes

Labels

testing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.