Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Mar 2021 07:55:52 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r568068 - in head/graphics/appleseed: . files
Message-ID:  <202103110755.12B7tqAJ049338@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Thu Mar 11 07:55:52 2021
New Revision: 568068
URL: https://svnweb.freebsd.org/changeset/ports/568068

Log:
  - Build Python3 code the same way as Python2, this is currently no-op
    but would be required for upcoming appleseed.studio-enabled builds
  - Move Python bits from custom prefix to standard PYTHON_SITELIBDIR,
    where appleseed.studio would be able to find them without passing
    the PYTHONHOME environment variable to executable

Modified:
  head/graphics/appleseed/files/patch-src_appleseed.python_CMakeLists.txt
  head/graphics/appleseed/pkg-plist

Modified: head/graphics/appleseed/files/patch-src_appleseed.python_CMakeLists.txt
==============================================================================
--- head/graphics/appleseed/files/patch-src_appleseed.python_CMakeLists.txt	Thu Mar 11 06:54:34 2021	(r568067)
+++ head/graphics/appleseed/files/patch-src_appleseed.python_CMakeLists.txt	Thu Mar 11 07:55:52 2021	(r568068)
@@ -1,6 +1,24 @@
 --- src/appleseed.python/CMakeLists.txt.orig	2019-08-31 15:49:01 UTC
 +++ src/appleseed.python/CMakeLists.txt
-@@ -182,7 +182,7 @@ if (WITH_PYTHON3_BINDINGS)
+@@ -163,11 +163,16 @@ if (WITH_PYTHON2_BINDINGS)
+ endif ()
+ 
+ if (WITH_PYTHON3_BINDINGS)
+-    add_library (appleseed.python3 MODULE
++    add_library (appleseed.py3.obj OBJECT
+         ${appleseed.python_sources}
+         ${blender_python_sources}
+     )
+ 
++    add_library (appleseed.python3 MODULE
++        $<TARGET_OBJECTS:appleseed.py3.obj>
++    )
++
++    set_target_properties (appleseed.py3.obj PROPERTIES FOLDER "Python Bindings")
+     set_target_properties (appleseed.python3 PROPERTIES FOLDER "Python Bindings")
+ 
+     set_target_properties (appleseed.python3 PROPERTIES
+@@ -182,7 +187,7 @@ if (WITH_PYTHON3_BINDINGS)
      endif ()
  
      target_link_libraries (appleseed.python3
@@ -9,12 +27,21 @@
      )
  endif ()
  
-@@ -288,7 +288,7 @@ endif ()
+@@ -201,7 +206,7 @@ if (WITH_PYTHON2_BINDINGS)
+ endif ()
+ 
+ if (WITH_PYTHON3_BINDINGS)
+-    target_include_directories (appleseed.python3 PRIVATE ${PYTHON3_INCLUDE_DIRS})
++    target_include_directories (appleseed.py3.obj PRIVATE ${PYTHON3_INCLUDE_DIRS})
+ endif ()
+ 
+ 
+@@ -288,7 +293,7 @@ endif ()
  # Installation.
  #--------------------------------------------------------------------------------------------------
  
 -set (py_module_dst "lib/python${PYTHON_MAJOR_VERSION}.${PYTHON_MINOR_VERSION}/appleseed")
-+set (py_module_dst "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/appleseed")
++set (py_module_dst "../lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/appleseed")
  
  install (FILES __init__.py DESTINATION ${py_module_dst})
  install (FILES logtarget.py DESTINATION ${py_module_dst})

Modified: head/graphics/appleseed/pkg-plist
==============================================================================
--- head/graphics/appleseed/pkg-plist	Thu Mar 11 06:54:34 2021	(r568067)
+++ head/graphics/appleseed/pkg-plist	Thu Mar 11 07:55:52 2021	(r568068)
@@ -6,6 +6,14 @@ share/cmake/Modules/FindPartio.cmake
 share/cmake/Modules/FindSeExpr.cmake
 share/cmake/Modules/FindSeExprEditor.cmake
 share/cmake/Modules/FindXerces.cmake
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/appleseed/__init__.py
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/appleseed/_appleseedpython3.so
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/appleseed/logtarget.py
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/appleseed/test/runtests.py
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/appleseed/test/testbasis.py
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/appleseed/test/testdict2dict.py
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/appleseed/test/testentitymap.py
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/appleseed/test/testentityvector.py
 @cwd %%APPHOME%%
 bin/animatecamera
 bin/appleseed.cli
@@ -106,14 +114,6 @@ icons/rendertab_toggle_pixel_inspector.png
 icons/rendertab_toggle_pixel_inspector_hover.png
 lib/libappleseed.shared.so
 lib/libappleseed.so
-%%PYTHON%%lib/python%%PYTHON_VER%%/appleseed/__init__.py
-%%PYTHON%%lib/python%%PYTHON_VER%%/appleseed/_appleseedpython3.so
-%%PYTHON%%lib/python%%PYTHON_VER%%/appleseed/logtarget.py
-%%PYTHON%%lib/python%%PYTHON_VER%%/appleseed/test/runtests.py
-%%PYTHON%%lib/python%%PYTHON_VER%%/appleseed/test/testbasis.py
-%%PYTHON%%lib/python%%PYTHON_VER%%/appleseed/test/testdict2dict.py
-%%PYTHON%%lib/python%%PYTHON_VER%%/appleseed/test/testentitymap.py
-%%PYTHON%%lib/python%%PYTHON_VER%%/appleseed/test/testentityvector.py
 schemas/project.xsd
 schemas/settings.xsd
 settings/appleseed.cli.xml



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103110755.12B7tqAJ049338>