Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[bug] virtualenv generator strip '\' on windows when upgrading to conan 1.21.0 #6301

@Thiel

Description

@Thiel

Hi,

After updating to 1.21.0, our CI and developer have been experiencing issues on script and tool that relied on conan generated activate.sh/activate_run.sh on windows. It looks like that it may be caused by some recent change on those generator.

Environment Details (include every applicable attribute)

  • Operating System+version: Windows 10
  • Compiler+version:
  • Conan version: 1.21.0
  • Python version: 2.7.12

Steps to reproduce (Include if Applicable)

Here's the small reproduce step I could come up with

conan install cmake_installer/3.15.4@conan/stable -g virtualenv -if build
source build/activate.sh
echo $CMAKE_ROOT

Logs (Executed commands with output) (Include/Attach if Applicable)

With conan 1.21.0

$ echo $CMAKE_ROOT
C:Usersjbounthong.conandatacmake_installer3.15.4conanstablepackage60b04a80ac4dd5c23f1acffacc679e9902e636e5

With conan 1.20.5

$ echo $CMAKE_ROOT
C:\Users\jbounthong\.conan\data\cmake_installer\3.15.4\conan\stable\package\60b04a80ac4dd5c23f1acffacc679e9902e636e5

Cause & Impact

The regression seems to be cause by recent change on virtualenv, virtualrunenv generator, and the introduction of environment.sh.env. When it's being sourced by the activate.sh the windows \ directory separators are being stripped down.

We are being impacted by it since we rely on activate_run.sh to set the PATH variable so that built .exe execution can lookup dependent .dll provided by conan.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions