Skip to content

Always using .bat files in Conan subprocess, not .ps1#19649

Draft
memsharded wants to merge 9 commits into
conan-io:develop2from
memsharded:poc/powershell_always
Draft

Always using .bat files in Conan subprocess, not .ps1#19649
memsharded wants to merge 9 commits into
conan-io:develop2from
memsharded:poc/powershell_always

Conversation

@memsharded

@memsharded memsharded commented Feb 20, 2026

Copy link
Copy Markdown
Member

Changelog: Fix: Remove support for tools.env.virtualenv:powershell=True/False, deprecated more than 1 year ago
Changelog: Fix: Use always .bat files for Conan subprocesses (self.run()), instead of .ps1, that are only necessary for users running natively in powershell for local development.
Docs: https://github.com/conan-io/docs/pull/XXXX

Close #11353

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

@memsharded memsharded changed the title poc of always generating powershell Always using .bat files in Conan subprocess, not .ps1 Apr 6, 2026
@memsharded memsharded requested a review from czoido April 6, 2026 18:07

@AbrilRBS AbrilRBS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving dropping the boolean value support

self.run('cd "hello world"')
self.run("set MYVC_CUSTOMVAR1")
self.run("set MYVC_CUSTOMVAR2")
self.run("set MYVC_CUSTOMVAR2", env=["conanbuild.ps1"])

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is something that could be considered breaking, because if the recipe hardcodes somewhere that is adding some .ps1, then it becomes necessary to explicitly tell the recipe to use that .ps1, because by default now we made to use the conanbuild.bat always.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] Have a way to generate both conanbuild.bat and conanbuild.ps1 files.

3 participants