nixpkgs/pkgs/by-name/li/libpam-wrapper/python.patch
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

39 lines
1.4 KiB
Diff

diff --git a/cmake/Modules/FindPythonSiteLibs.cmake b/cmake/Modules/FindPythonSiteLibs.cmake
index ab2931e..08e2c98 100644
--- a/cmake/Modules/FindPythonSiteLibs.cmake
+++ b/cmake/Modules/FindPythonSiteLibs.cmake
@@ -27,30 +27,9 @@
if (PYTHON_EXECUTABLE)
### PYTHON_SITELIB
- execute_process(
- COMMAND
- ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(plat_specific=True, prefix=''))"
- OUTPUT_VARIABLE
- PYTHON_SITELIB_OUTPUT_VARIABLE
- RESULT_VARIABLE
- PYTHON_SITELIB_RESULT_VARIABLE
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- if (NOT PYTHON_SITELIB_RESULT_VARIABLE)
- file(TO_CMAKE_PATH "${PYTHON_SITELIB_OUTPUT_VARIABLE}" PYTHON_SITELIB)
- endif ()
+ file(TO_CMAKE_PATH "@siteDir@" PYTHON_SITELIB)
+
### PYTHON_SITEINC
- execute_process(
- COMMAND
- ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_inc; print(get_python_inc(plat_specific=True, prefix=''))"
- OUTPUT_VARIABLE
- PYTHON_SITEINC_OUTPUT_VARIABLE
- RESULT_VARIABLE
- PYTHON_SITEINC_RESULT_VARIABLE
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- if (NOT PYTHON_SITEINC_RESULT_VARIABLE)
- file(TO_CMAKE_PATH "${PYTHON_SITEINC_OUTPUT_VARIABLE}" PYTHON_SITEINC)
- endif ()
+ file(TO_CMAKE_PATH "@includeDir@" PYTHON_SITEINC)
endif (PYTHON_EXECUTABLE)