зеркало из https://github.com/microsoft/vcpkg.git
[nanopb] Remove python path (#33348)
* [nanopb] Remove python path * version * fix tool * version
This commit is contained in:
Родитель
2c356da170
Коммит
42bd1e8994
|
@ -1,41 +1,22 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 0ce05ea..1e8c4ed 100644
|
||||
index 4a3d31e..82611ef 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -34,18 +34,11 @@ if(NOT DEFINED CMAKE_INSTALL_CMAKEDIR)
|
||||
set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/nanopb")
|
||||
endif()
|
||||
|
||||
-execute_process(
|
||||
- COMMAND ${Python_EXECUTABLE} -c
|
||||
- "import os.path, sys, sysconfig; print(os.path.relpath(sysconfig.get_path('purelib'), start=sys.prefix))"
|
||||
- OUTPUT_VARIABLE PYTHON_INSTDIR
|
||||
- OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
-)
|
||||
-
|
||||
if(nanopb_BUILD_GENERATOR)
|
||||
set(generator_protos nanopb)
|
||||
- if(NOT DEFINED nanopb_PROTOC_PATH)
|
||||
- message(FATAL_ERROR "nanopb_PROTOC_PATH not defined")
|
||||
- endif()
|
||||
+ if(NOT DEFINED nanopb_PROTOC_PATH)
|
||||
+ message(FATAL_ERROR "nanopb_PROTOC_PATH not defined")
|
||||
+ endif()
|
||||
foreach(generator_proto IN LISTS generator_protos)
|
||||
string(REGEX REPLACE "([^;]+)" "${PROJECT_SOURCE_DIR}/generator/proto/\\1.proto" generator_proto_file "${generator_proto}")
|
||||
string(REGEX REPLACE "([^;]+)" "\\1_pb2.py" generator_proto_py_file "${generator_proto}")
|
||||
@@ -58,12 +51,12 @@ if(nanopb_BUILD_GENERATOR)
|
||||
@@ -58,12 +58,15 @@ if(nanopb_BUILD_GENERATOR)
|
||||
install(
|
||||
FILES ${PROJECT_BINARY_DIR}/${generator_proto_py_file}
|
||||
${generator_proto_file}
|
||||
- DESTINATION ${PYTHON_INSTDIR}/proto/
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/proto/
|
||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR}/proto/
|
||||
)
|
||||
endforeach()
|
||||
|
||||
install( FILES generator/proto/_utils.py
|
||||
- DESTINATION ${PYTHON_INSTDIR}/proto/ )
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/proto/ )
|
||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR}/proto/ )
|
||||
+
|
||||
+ install( FILES generator/proto/__init__.py
|
||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR}/proto/ )
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
|
|
|
@ -45,7 +45,7 @@ if(nanopb_BUILD_GENERATOR)
|
|||
file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/nanopb_generator.py" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
||||
if(WIN32)
|
||||
file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/protoc-gen-nanopb.bat" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
||||
file(INSTALL "${CURRENT_PACKAGES_DIR}/Lib/site-packages/" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/site-packages")
|
||||
file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/proto/" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/proto")
|
||||
else()
|
||||
file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/protoc-gen-nanopb" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
||||
endif()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "nanopb",
|
||||
"version-semver": "0.4.7",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "A small code-size Protocol Buffers implementation in ANSI C.",
|
||||
"homepage": "https://jpa.kapsi.fi/nanopb/",
|
||||
"license": "Zlib",
|
||||
|
|
|
@ -5634,7 +5634,7 @@
|
|||
},
|
||||
"nanopb": {
|
||||
"baseline": "0.4.7",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"nanoprintf": {
|
||||
"baseline": "0.3.4",
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "b27e85ab51605be4fee299a1dcb14f4fe0ac2429",
|
||||
"version-semver": "0.4.7",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "4d78bf2dbff06f0540e971677c39641b9057dc57",
|
||||
"version-semver": "0.4.7",
|
||||
|
|
Загрузка…
Ссылка в новой задаче