Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
robotpkg-wip
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gepetto
robotpkg-wip
Commits
d7c23905
Commit
d7c23905
authored
6 years ago
by
Olivier Stasse
Browse files
Options
Downloads
Patches
Plain Diff
[wip/py-sot-core-v3] Add patch to fix install of __init__.py file
Bump to PKGREVISION 1.
parent
fa984d5a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
sot-core-v3/Makefile
+1
-0
1 addition, 0 deletions
sot-core-v3/Makefile
sot-core-v3/distinfo
+1
-0
1 addition, 0 deletions
sot-core-v3/distinfo
sot-core-v3/patches/patch-aa
+81
-0
81 additions, 0 deletions
sot-core-v3/patches/patch-aa
with
83 additions
and
0 deletions
sot-core-v3/Makefile
+
1
−
0
View file @
d7c23905
...
...
@@ -5,6 +5,7 @@
ORG
=
stack-of-tasks
NAME
=
sot-core
VERSION
=
3.2.0
PKGREVISION
=
1
DISTNAME
=
${
NAME
}
-
${
VERSION
}
PKGNAME
=
${
NAME
}
-v3-
${
VERSION
}
...
...
This diff is collapsed.
Click to expand it.
sot-core-v3/distinfo
+
1
−
0
View file @
d7c23905
SHA1 (sot-core-3.2.0.tar.gz) = fdba4a6febb240904872a519de9a613f44645d84
RMD160 (sot-core-3.2.0.tar.gz) = ce5f4378feff289536b06e269750243ae2a1d3b7
Size (sot-core-3.2.0.tar.gz) = 1070131 bytes
SHA1 (patch-aa) = 963ff7b9884339a9a92f774cb626ae5c2ffb7bdd
This diff is collapsed.
Click to expand it.
sot-core-v3/patches/patch-aa
0 → 100644
+
81
−
0
View file @
d7c23905
--- src/CMakeLists.txt
+++ src/CMakeLists.txt
@@ -232,7 +232,9 @@
FOREACH(plugin ${plugins})
ENDFOREACH(plugin)
IF(BUILD_PYTHON_INTERFACE)
- DYNAMIC_GRAPH_PYTHON_MODULE("sot/core" ${SOTCORE_LIB_NAME} wrap)
+ SET(NO_INSTALL_OF_INIT_PY 0)
+ DYNAMIC_GRAPH_PYTHON_MODULE("sot/core" ${SOTCORE_LIB_NAME} wrap
+ ${NO_INSTALL_OF_INIT_PY})
# Install empty __init__.py files in intermediate directories.
INSTALL(FILES
diff --git a/python.cmake b/python.cmake
index 4683449..e759c13 100644
--- cmake/python.cmake
+++ cmake/python.cmake
@@ -94,7 +94,7 @@
ENDMACRO(FINDPYTHON)
#.rst:
-# .. command:: DYNAMIC_GRAPH_PYTHON_MODULE ( SUBMODULENAME LIBRARYNAME TARGETNAME )
+# .. command:: DYNAMIC_GRAPH_PYTHON_MODULE ( SUBMODULENAME LIBRARYNAME TARGETNAME INSTALL_INIT_PY=1)
#
# Add a python submodule to dynamic_graph
#
@@ -105,6 +105,9 @@
ENDMACRO(FINDPYTHON)
# :param TARGETNAME: name of the target: should be different for several
# calls to the macro.
#
+# :param INSTALL_INIT_PY: if set to 1 install and generated a __init__.py file.
+# Set to 1 by default.
+#
# .. note::
# Before calling this macro, set variable NEW_ENTITY_CLASS as
# the list of new Entity types that you want to be bound.
@@ -113,7 +116,15 @@
ENDMACRO(FINDPYTHON)
#
MACRO(DYNAMIC_GRAPH_PYTHON_MODULE SUBMODULENAME LIBRARYNAME TARGETNAME)
+ # By default the __init__.py file is installed.
+ SET(INSTALL_INIT_PY 1)
+ set(extra_macro_args ${ARGN})
+ list(LENGTH extra_macro_args num_extra_args)
+ if( ${num_extra_args} GREATER 0)
+ list(GET extra_macro_args 0 INSTALL_INIT_PY)
+ endif(${num_extra_args} GREATER 0)
+
IF(NOT DEFINED PYTHONLIBS_FOUND)
FINDPYTHON()
ELSEIF(NOT ${PYTHONLIBS_FOUND} STREQUAL "TRUE")
@@ -158,15 +169,20 @@
MACRO(DYNAMIC_GRAPH_PYTHON_MODULE SUBMODULENAME LIBRARYNAME TARGETNAME)
SET(ENTITY_CLASS_LIST "${ENTITY_CLASS_LIST}${ENTITY}('')\n")
ENDFOREACH(ENTITY ${NEW_ENTITY_CLASS})
- CONFIGURE_FILE(
- ${PROJECT_SOURCE_DIR}/cmake/dynamic_graph/submodule/__init__.py.cmake
- ${PROJECT_BINARY_DIR}/src/dynamic_graph/${SUBMODULENAME}/__init__.py
- )
+ # Install if INSTALL_INIT_PY is set to 1
+ IF (${INSTALL_INIT_PY} EQUAL 1)
- INSTALL(
- FILES ${PROJECT_BINARY_DIR}/src/dynamic_graph/${SUBMODULENAME}/__init__.py
- DESTINATION ${PYTHON_INSTALL_DIR}
- )
+ CONFIGURE_FILE(
+ ${PROJECT_SOURCE_DIR}/cmake/dynamic_graph/submodule/__init__.py.cmake
+ ${PROJECT_BINARY_DIR}/src/dynamic_graph/${SUBMODULENAME}/__init__.py
+ )
+
+ INSTALL(
+ FILES ${PROJECT_BINARY_DIR}/src/dynamic_graph/${SUBMODULENAME}/__init__.py
+ DESTINATION ${PYTHON_INSTALL_DIR}
+ )
+
+ ENDIF(${INSTALL_INIT_PY} EQUAL 1)
ENDMACRO(DYNAMIC_GRAPH_PYTHON_MODULE SUBMODULENAME)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment