Skip to content

Commit

Permalink
Merge pull request #3581 from Autodesk/gamaj/LOOKDEVX-2254/modernize_…
Browse files Browse the repository at this point in the history
…ufe_ae_template

LOOKDEVX-2254 - Enable "Implicit Namespace Packages" feature
  • Loading branch information
seando-adsk authored Feb 1, 2024
2 parents a87b98f + b92b97d commit 9e5642f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/mayaUsd/resources/ae/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@
# install
# ---------------------------------------------------------------------------------------------

# We need an empty __init__.py file in each subfolder so it is considered a python module.
# In Python 2 we need an __init__.py file in the ufe_ae folder to declare it as a module.
# In Python 3 we must not use an __init__.py file in that folder to enable the "Implicit Namespace
# Packages" feature as defined in Python PEP 420, which allows other plugins to also be able to
# declare an ufe_ae module that would be merged with this one. See https://peps.python.org/pep-0420/
# for details.
if (NOT BUILD_WITH_PYTHON_3)
install(FILES __init__.py DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/python/ufe_ae)
endif()
# We need an empty __init__.py file in each subfolder so it is considered a python module.
install(FILES __init__.py DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/python/ufe_ae/usd)
install(FILES ae_utils.py DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/python/ufe_ae/usd)
install(FILES __init__.py DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/python/ufe_ae/usd/nodes)
Expand Down

0 comments on commit 9e5642f

Please sign in to comment.