summary refs log tree commit diff
path: root/pkgs/development/python-modules/ifcopenshell
diff options
context:
space:
mode:
authorJulien Moutinho <julm+nixpkgs@sourcephile.fr>2021-04-11 12:10:46 +0200
committerJulien Moutinho <julm+nixpkgs@sourcephile.fr>2021-04-11 12:10:46 +0200
commit687e55bfc0a29dd64cbe24c868350f6013e2f648 (patch)
treeac6f89171090da36478d5ed21429411d7bdb816c /pkgs/development/python-modules/ifcopenshell
parent85e62de17bc6070705c3ee4c31f344510f9c78ec (diff)
downloadnixpkgs-687e55bfc0a29dd64cbe24c868350f6013e2f648.tar
nixpkgs-687e55bfc0a29dd64cbe24c868350f6013e2f648.tar.gz
nixpkgs-687e55bfc0a29dd64cbe24c868350f6013e2f648.tar.bz2
nixpkgs-687e55bfc0a29dd64cbe24c868350f6013e2f648.tar.lz
nixpkgs-687e55bfc0a29dd64cbe24c868350f6013e2f648.tar.xz
nixpkgs-687e55bfc0a29dd64cbe24c868350f6013e2f648.tar.zst
nixpkgs-687e55bfc0a29dd64cbe24c868350f6013e2f648.zip
ifcopenshell: 0.6.0b0 -> 210410
Diffstat (limited to 'pkgs/development/python-modules/ifcopenshell')
-rw-r--r--pkgs/development/python-modules/ifcopenshell/default.nix21
-rw-r--r--pkgs/development/python-modules/ifcopenshell/site-packages.patch32
2 files changed, 7 insertions, 46 deletions
diff --git a/pkgs/development/python-modules/ifcopenshell/default.nix b/pkgs/development/python-modules/ifcopenshell/default.nix
index 75d1c4d7740..2eedaaece69 100644
--- a/pkgs/development/python-modules/ifcopenshell/default.nix
+++ b/pkgs/development/python-modules/ifcopenshell/default.nix
@@ -1,11 +1,10 @@
 { lib, stdenv
 , buildPythonPackage
 , fetchFromGitHub
-, substituteAll
 , python
 , gcc10
 , cmake
-, boost172
+, boost17x
 , icu
 , swig
 , pcre
@@ -16,29 +15,21 @@
 
 buildPythonPackage rec {
   pname = "ifcopenshell";
-  version = "0.6.0b0";
+  version = "210410";
   format = "other";
 
   src = fetchFromGitHub {
     owner  = "IfcOpenShell";
     repo   = "IfcOpenShell";
-    rev    = "v${version}";
+    rev    = "blenderbim-${version}";
     fetchSubmodules = true;
-    sha256 = "1ad1s9az41z2f46rbi1jnr46mgc0q4h5kz1jm9xdlwifqv9y04g1";
+    sha256 = "1g52asxrqcfj01iqvf03k3bb6rg3v04hh1wc3nmn329a2lwjbxpw";
   };
 
-  patches = [
-    (substituteAll {
-      name = "site-packages.patch";
-      src = ./site-packages.patch;
-      site_packages = "lib/${python.libPrefix}/site-packages";
-    })
-  ];
-
   nativeBuildInputs = [ gcc10 cmake ];
 
   buildInputs = [
-    boost172
+    boost17x
     icu
     pcre
     libxml2
@@ -48,7 +39,9 @@ buildPythonPackage rec {
     cd cmake
   '';
 
+  PYTHONUSERBASE=".";
   cmakeFlags = [
+    "-DUSERSPACE_PYTHON_PREFIX=ON"
     "-DOCC_INCLUDE_DIR=${opencascade-occt}/include/opencascade"
     "-DOCC_LIBRARY_DIR=${opencascade-occt}/lib"
     "-DOPENCOLLADA_INCLUDE_DIR=${opencollada}/include/opencollada"
diff --git a/pkgs/development/python-modules/ifcopenshell/site-packages.patch b/pkgs/development/python-modules/ifcopenshell/site-packages.patch
deleted file mode 100644
index e61fe2056f7..00000000000
--- a/pkgs/development/python-modules/ifcopenshell/site-packages.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/src/ifcwrap/CMakeLists.txt
-+++ b/src/ifcwrap/CMakeLists.txt
-@@ -68,26 +68,17 @@ endif()
- # directory in which the wrapper can be installed.
- FIND_PACKAGE(PythonInterp)
- IF(PYTHONINTERP_FOUND AND NOT "${PYTHON_EXECUTABLE}" STREQUAL "")
--    EXECUTE_PROCESS(
--        COMMAND ${PYTHON_EXECUTABLE} -c "import sys; from distutils.sysconfig import get_python_lib; sys.stdout.write(get_python_lib(1))"
--        OUTPUT_VARIABLE python_package_dir
--    )
--
--    IF("${python_package_dir}" STREQUAL "")
--        MESSAGE(WARNING "Unable to locate Python site-package directory, unable to install the Python wrapper")
--    ELSE()
-         FILE(GLOB_RECURSE sourcefiles "${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/*.py")
-         FOREACH(file ${sourcefiles})
-             FILE(RELATIVE_PATH relative "${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/" "${file}")
-             GET_FILENAME_COMPONENT(dir "${relative}" DIRECTORY)
- 			INSTALL(FILES "${file}"
--                    DESTINATION "${python_package_dir}/ifcopenshell/${dir}")
-+                    DESTINATION "@site_packages@/ifcopenshell/${dir}")
-         ENDFOREACH()
-         INSTALL(FILES "${CMAKE_BINARY_DIR}/ifcwrap/ifcopenshell_wrapper.py"
--                DESTINATION "${python_package_dir}/ifcopenshell")
-+                DESTINATION "@site_packages@/ifcopenshell")
-         INSTALL(TARGETS _ifcopenshell_wrapper
--                DESTINATION "${python_package_dir}/ifcopenshell")
--    ENDIF()
-+                DESTINATION "@site_packages@/ifcopenshell")
- ELSE()
-     MESSAGE(WARNING "No Python interpreter found, unable to install the Python wrapper")
- ENDIF()