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

CMAKE_INSTALL_PREFIX not honored for Python files installation on Windows #6485

Merged
merged 1 commit into from
Jul 1, 2023

Conversation

ricrogz
Copy link
Contributor

@ricrogz ricrogz commented Jun 22, 2023

This is a second fix after #6339. Even after #6371, CMAKE_INSTALL_PREFIX is not honored when building under windows. I just built 2023.03.2, and noticed that the Python wrappers were not installed under the path I had specified.

The cause of the issue is that the "nt" scheme in sysconfig.get_path() uses the base key for the "platlib" path instead of platbase, as does the "posix_prefix" schema:

In [9]: sysconfig._INSTALL_SCHEMES
Out[9]:
{'posix_prefix': {'stdlib': '{installed_base}/lib/python{py_version_short}',
  'platstdlib': '{platbase}/lib/python{py_version_short}',
  'purelib': '{base}/lib/python{py_version_short}/site-packages',
  'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
  'include': '{installed_base}/include/python{py_version_short}{abiflags}',
  'platinclude': '{installed_platbase}/include/python{py_version_short}{abiflags}',
  'scripts': '{base}/bin',
  'data': '{base}'},
[...]
 'nt': {'stdlib': '{installed_base}/Lib',
  'platstdlib': '{base}/Lib',
  'purelib': '{base}/Lib/site-packages',
  'platlib': '{base}/Lib/site-packages',
  'include': '{installed_base}/Include',
  'platinclude': '{installed_base}/Include',
  'scripts': '{base}/Scripts',
  'data': '{base}'},
[...]
}

Nice inconsisteny, Python...

@kuelumbus
Copy link
Contributor

This breaks the builds for the windows python wheels. Will cherry-pick this fix.

@greglandrum greglandrum added bug infrastructure build infrastructure and the like labels Jul 1, 2023
@greglandrum greglandrum added this to the 2023_03_3 milestone Jul 1, 2023
Copy link
Member

@greglandrum greglandrum left a comment

Choose a reason for hiding this comment

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

LGTM

@greglandrum greglandrum merged commit 8f4d4a6 into rdkit:master Jul 1, 2023
10 checks passed
@ricrogz ricrogz deleted the fix_win_py_install branch July 1, 2023 12:36
greglandrum pushed a commit that referenced this pull request Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug infrastructure build infrastructure and the like
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants