Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PREFIX detection on Windows failing #3909

Closed
ryanvolz opened this issue Mar 18, 2020 · 11 comments · Fixed by #4126
Closed

PREFIX detection on Windows failing #3909

ryanvolz opened this issue Mar 18, 2020 · 11 comments · Fixed by #4126
Labels
locked [bot] locked due to inactivity type::bug describes erroneous operation, use severity::* to classify the type

Comments

@ryanvolz
Copy link

ryanvolz commented Mar 18, 2020

Actual Behavior

Text files with the host prefix are not detected and marked in info/has_prefix.

Expected Behavior

Text files with the host prefix should be detected, marked in info/has_prefix, and the prefix should be replaced upon install.

Steps to Reproduce

Build on Windows with conda-build=3.19.1, see e.g. conda-forge/gobject-introspection-feedstock#19.

Output of conda info
     active environment : None
       user config file : C:\Users\VssAdministrator\.condarc
 populated config files : C:\Users\VssAdministrator\.condarc
          conda version : 4.8.3
    conda-build version : 3.19.1
         python version : 3.6.10.final.0
       virtual packages : 
       base environment : C:\Miniconda  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Miniconda\pkgs
                          C:\Users\VssAdministrator\.conda\pkgs
                          C:\Users\VssAdministrator\AppData\Local\conda\conda\pkgs
       envs directories : C:\Miniconda\envs
                          C:\Users\VssAdministrator\.conda\envs
                          C:\Users\VssAdministrator\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.8.3 requests/2.23.0 CPython/3.6.10 Windows/10 Windows/10.0.14393
          administrator : True
             netrc file : None
           offline mode : False

Likely related to #3899. It would appear that the fix in #3903 was not sufficient.

(edited for clarity, "build prefix" -> "host prefix")

@ryanvolz
Copy link
Author

I've added a build test at conda-forge/gobject-introspection-feedstock#20 for the failure case that I'm tracking.

In building that gobject-introspection recipe locally, I get proper prefix replacement for conda-build 3.18.11 and 3.19.1 but failure for 3.19.0 (as #3899 would indicate). However, the prefix is still not detected for the conda-forge Azure cloud build even with conda-build=3.19.1, so there is some important difference between the cloud and local build that results in a failure of prefix detection.

@mingwandroid
Copy link
Contributor

We do not replace build prefix on any os.

@mingwandroid
Copy link
Contributor

Please don't refer to the host prefix as the build prefix. They are completely different.

@mingwandroid
Copy link
Contributor

Looking at this now, sorry for the trouble.

@ryanvolz
Copy link
Author

Sorry for my sloppy nomenclature, and thanks for taking a look!

@ryanvolz
Copy link
Author

ryanvolz commented Apr 4, 2020

conda-forge/yaml-cpp-feedstock#6 (comment) looks to have some more details about how this plays out. I'm not sure if this would still be classed as a conda-build bug, except perhaps that the fallback to regex_files_py fails.

@seanyen
Copy link
Contributor

seanyen commented May 11, 2020

I think I might discover a regression of the prefix detection logic:

Taking pyqt as an example, when it was built with conda-build 3.18.11, it detected the following files with prefix:

Detected hard-coded path in text file Lib/site-packages/PyQt5-5.12.3.dist-info/RECORD
Detected hard-coded path in text file Lib/site-packages/PyQtWebEngine-5.12.1.dist-info/RECORD
Detected hard-coded path in text file Lib/site-packages/sipconfig.py

And 6 month later, the maintainer added PyChart support and it was built with conda-build 3.19.2. This time, the files detected with the prefix are:

Files containing CONDA_PREFIX
-----------------------------
D:/bld/pyqt_1588403964597/_h_env :: text :: Lib/site-packages/PyQt5-5.12.3.dist-info/RECORD
Lib/site-packages/PyQt5-5.12.3.dist-info/RECORD (text): Patching
D:/bld/pyqt_1588403964597/_h_env :: text :: Lib/site-packages/PyQtChart-5.12.dist-info/RECORD
Lib/site-packages/PyQtChart-5.12.dist-info/RECORD (text): Patching
D:/bld/pyqt_1588403964597/_h_env :: text :: Lib/site-packages/PyQtWebEngine-5.12.1.dist-info/RECORD
Lib/site-packages/PyQtWebEngine-5.12.1.dist-info/RECORD (text): Patching

And you can notice sipconfig.py no longer in the list, but it does contain many hard-coded prefix. Here is an example of the content:

    'default_bin_dir':    'D:\\bld\\pyqt_1588676793556\\_h_env',
    'default_mod_dir':    'D:\\bld\\pyqt_1588676793556\\_h_env\\Lib\\site-packages',
    'default_sip_dir':    'D:\\bld\\pyqt_1588676793556\\_h_env\\sip',

@mingwandroid, do you just happen to have any idea where it might go wrong? Does conda-build check the case of \\ for a path?

@seanyen
Copy link
Contributor

seanyen commented May 21, 2020

@mingwandroid Friendly ping.

@mingwandroid
Copy link
Contributor

When we make the 3. 19.4 release, hopefully soon, this should be fixed.

@ocefpaf
Copy link
Contributor

ocefpaf commented Jul 14, 2020

When we make the 3. 19.4 release, hopefully soon, this should be fixed.

What is the roadmap for 2.19.4? Is there something we can do to help? This is blocking a lot of conda-forge's updates. See conda-forge/qgis-feedstock#124

@jjhelmus jjhelmus added the type::bug describes erroneous operation, use severity::* to classify the type label Jul 23, 2020
@github-actions
Copy link

github-actions bot commented Mar 6, 2022

Hi there, thank you for your contribution!

This issue has been automatically locked because it has not had recent activity after being closed.

Please open a new issue if needed.

Thanks!

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Mar 6, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity type::bug describes erroneous operation, use severity::* to classify the type
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants