WO2015117419A1 - 一种跨平台移植python程序的方法及装置 - Google Patents

一种跨平台移植python程序的方法及装置 Download PDF

Info

Publication number
WO2015117419A1
WO2015117419A1 PCT/CN2014/089512 CN2014089512W WO2015117419A1 WO 2015117419 A1 WO2015117419 A1 WO 2015117419A1 CN 2014089512 W CN2014089512 W CN 2014089512W WO 2015117419 A1 WO2015117419 A1 WO 2015117419A1
Authority
WO
WIPO (PCT)
Prior art keywords
program
python
target
machine
folder
Prior art date
Application number
PCT/CN2014/089512
Other languages
English (en)
French (fr)
Inventor
严勇文
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015117419A1 publication Critical patent/WO2015117419A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/47Retargetable compilers

Definitions

  • the present invention relates to the field of cross-compilation, and more particularly to cross-platform program porting.
  • Python has the advantages of dynamic analysis, cross-platform, common library, and easy development. It has become the standard configuration language of the mainstream PC side. Therefore, it is necessary to study a method of porting Python to an embedded system.
  • the embodiment of the invention provides a method and a device for transplanting a Python program across platforms, which can realize cross-platform transplantation of a python program, and contributes to the efficiency of developing software products on different platforms.
  • an embodiment of the present invention provides a method for transplanting a Python program across platforms, including:
  • the steps of compiling the python program of the target machine on the local machine by using the modified python compiler tool include:
  • the modified local machine version of the pgen program so that in the python program of the compiled target machine, the local machine can execute the pgen program of the local machine version whose time stamp has been modified, and obtain the compiled file of the python program of the target machine.
  • the step of importing the compiled file into the target machine further includes:
  • the compiled file is trimmed, and only the bin folder and the lib folder are reserved; wherein the bin folder is used to save the binary file of the python program of the target machine, and the lib folder is used to save the target machine.
  • the step of cutting the compiled file further includes:
  • the step of importing the compiled file into the target machine further includes:
  • the compiled file is compressed using an upx file compressor.
  • the cross-compilation tool is capable of compiling a python program having the capability of reading a compressed package
  • the method further includes:
  • an embodiment of the present invention further provides an apparatus for transplanting a Python program across platforms, including:
  • the local compilation module is set to compile the local machine python program by using python's local compilation tool to obtain the local machine version of the pgen program; wherein the local machine version of the pgen program is generated by the local compilation tool during the compilation of the python program and is required Executed procedure;
  • the cross-compilation module is set to compile the python program of the target machine on the local machine by using the Python cross-compilation tool, and in the process, the local machine version of the pgen program is used instead of the target machine version of the pgen program to execute on the local machine, thereby obtaining the target machine.
  • a compiled file of the python program wherein the target version of the pgen program is generated by the cross-compiler tool during the compilation of the python program, and cannot be executed on the local machine;
  • Importing a module or a remote service module wherein the import module is configured to import a compiled file of the python program of the target machine into a target machine; the remote service module is configured to provide the compiled file to a target machine through a remote service .
  • the cross-compilation module includes:
  • Modifying the submodule setting the timestamp of the pgen program of the local machine version, and saving it in the target folder of the local machine;
  • a cross-compilation sub-module configured to compile a target python program in the target folder using the cross-compilation tool; wherein the target device version of the pgen program generated by the cross-compilation tool in the target folder cannot be overwritten
  • the pgen program of the local machine version whose time stamp has been modified so that in the python program of the compile target machine, the local machine can execute the pgen program of the local machine version whose time stamp has been modified, and obtain the compiled file of the python program of the target machine.
  • the device further comprises:
  • a first cropping module configured to: before the step of importing the compiled file into the target machine by the importing module, trimming the compiled file, and retain only the bin folder and the lib folder; wherein the bin The folder is used to save the binary file of the python program of the target machine, and the lib folder is used to save the library file of the python program of the target machine.
  • the first cutting module includes:
  • Delete the submodule set to delete the .py type and / or .pyo type and / or debug information type files in the bin folder and lib folder.
  • the device further comprises:
  • the first compression module is configured to compress the compiled file using an upx file compressor before the import module imports the compiled file into the target machine.
  • the cross-compilation tool is capable of compiling a python program having the ability to read a zip archive
  • the device also includes:
  • a second compression module configured to compress the python library folder in the lib folder by using the zip compression software after the first compression module compresses the compiled file by using an upx file compressor, to obtain a python library folder.
  • the second cropping module is configured to, after the second compression module obtains the compressed package of the python library folder, trim the source python library folder, and only retain the os.pyc file therein.
  • an embodiment of the present invention further provides a computer program and a carrier thereof, the computer program comprising program instructions, when the program instruction is executed by a cross-platform porting python program device, enabling the device to implement the above A method of porting Python programs across platforms.
  • the solution of the embodiment of the invention implements cross-platform transplantation of python programs, which helps the efficiency of software products developed by different platforms.
  • FIG. 1 is a schematic diagram of steps of a method for transplanting a Python program across platforms according to an embodiment of the present invention
  • FIG. 2 is a flowchart of execution of a compressed compiled file according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of an apparatus for transplanting a Python program across platforms according to an embodiment of the present invention.
  • an embodiment of the present invention provides a method for transplanting a Python program across platforms, including:
  • Step 11 using Python's local compilation tool to compile the local machine's python program to obtain the local machine version of the pgen program; wherein, the local machine version of the pgen program is the program generated by the local compilation tool during the compilation of the python program and must be executed. ;
  • Step 12 Compile the python program of the target machine on the local machine by using the Python cross-compilation tool, and execute the local machine version of the pgen program instead of the target machine version of the pgen program on the local machine in the process, thereby obtaining the python program of the target machine. a compiled file; wherein the target version of the pgen program is generated by the cross-compiler tool during the compilation of the python program and cannot be executed on the local machine;
  • step 13 the compiled file of the python program of the target machine is imported into the target machine or the compiled file is provided to the target machine through the remote service.
  • the method of the above embodiment implements cross-platform transplantation of python programs, which can effectively improve the software development efficiency of different platforms.
  • the cross-compiler tool generates a target machine version of the pgen program because it is equipped with a target machine compiler.
  • the entire cross-compilation process needs to be executed in the local machine.
  • the local machine uses the cross-compilation tool to execute the pgen program to the target version
  • the cross-compilation work will be interrupted, so it is necessary to
  • the cross-compiler tool is configured to specify the pgen program running the local machine version. Obviously, this additional configuration work is not convenient enough.
  • the embodiment of the present invention provides a simpler and faster method, so that the cross-compilation tool can directly run the local machine version of the pgen program, that is, step 13 includes:
  • Step 131 modifying the timestamp of the local machine version of the pgen program, and saving it in the target folder of the local machine;
  • Step 132 Compile the python program of the target machine in the target folder by using the cross-compilation tool; wherein the target device version of the pgen program generated by the cross-compilation tool in the target folder cannot overwrite the timestamp has been modified.
  • the local machine version of the pgen program thus in the python program compiling the target machine, the local machine is able to execute the local machine version of the pgen with the timestamp modified
  • the program gets the compiled file of the python program of the target machine.
  • the bin folder is used to save the binary file of the python program of the target machine
  • the lib folder is used to save the library file of the python program of the target machine. Therefore, as an alternative, the method of the embodiment of the present invention further includes:
  • step 15 the compiled file is cropped, and only the bin folder and the lib folder are retained.
  • the compiled file may be further cropped, that is, in step 15, the .py type and/or the .pyo type file in the lib folder is deleted; and/or the target machine is deleted. Debugging features of the python program.
  • .py is the source file
  • pyc is the file formed by .py compilation (that is, the source file is compiled, the .pyc file will be generated)
  • .pyo is the optimized file.
  • the target machine actually applied to the compiled .pyc and .pyo files, so you can directly delete the .py file.
  • the optimization effect of the .pyo file is not obvious at runtime, and can be deleted to further save the occupied space of the compiled file.
  • the python program of the target machine has debugging function for program optimization, but the mature and stable python program does not require the user to optimize, so the debugging function of the python program is relatively redundant and can also be deleted. It should be noted that deleting the debugging function of the python program does not delete a file in the compiled file, but a compression process with a loss of function.
  • the method of the embodiment of the present invention may further include:
  • step 16 the compiled file is compressed using an upx file compressor to further save the space occupied by the compiled file.
  • step 17 using zip compression software to the python library file in the lib folder.
  • the folder is compressed again to get the zip archive of the python library folder;
  • step 18 the source lib folder is cropped, and only the os.pyc file is retained.
  • the compressed files are not generated after the upx compressed files, so they can be used together with the current common zip archive technology.
  • a zip archive will be generated on the basis of the source python library folder.
  • the source python library folder can be directly deleted, but in actual verification, it is found that The os.pyc file in the folder must be kept in order for the python program to properly load the python library folder's tarball during execution. Therefore, the above step 18 retains the os.pyc file.
  • Python is a dynamic parsing language used on the PC side, so in this application scenario, the PC is used as a local machine. Most of the embedded devices are based on the ARM processor platform and cannot implement Python programs. Therefore, this application scenario is used to implement Python programs on ARM processors.
  • Python's local compilation tool which is well-known in the art, applied to the Python source package on the PC side.
  • the basic compilation tool works according to the existing python program compilation process to get the PC version of the pgen program.
  • the above command means to change the time stamp of the PC version of the pgen program to 23:59 on December 31 of this year. As long as it is not executed at the last minute of the year, it is a valid operation. This operation ensures that the make operation in the arm_build directory does not replace the pgen program that was just copied and can be run on the PC side.
  • /opt/arm_python is taken.
  • the --build command is used to set the system information on the PC side.
  • the --host command is used to set the cross compiler of the ARM processor. The user can make detailed settings according to the actual situation.
  • the --enable-shared command is optional, which means that the cross-compiled python adopts the shared library mode (this option is not added in this application scenario).
  • the generated python program has the ability to read the zip archive.
  • the -i parameter is necessary, meaning that the installation will continue even if it is an error. This is because the ARM processor version of the python program in the compilation process, there are timing problems, a module installed first depends on a module installed later, add this parameter, you can solve this problem, otherwise, can not be installed properly.
  • Step S1 after analysis of the python file structure, it is found that only the bin and lib folders in the compiled file are required at runtime, and therefore, other folders are deleted.
  • step S2 in the Bin folder, only python2.7 is the actual execution file.
  • Step S3 Lib folder, only libpython2.7.so.1.0 (set the dynamic library mode with the file) and python2.7 folder for the actual run required.
  • Step S4 crop the python2.7 library folder, and actually only keep the .pyc file.
  • Step S5 after entering the python installation path, execute the following command to delete the debugging function:
  • step S5 After cutting the above steps, the most important files of the python program of the embedded device are retained. In addition, the space occupation of the compiled file can be further reduced, that is, the following steps are performed after step S5:
  • step S6 the upx technology is applied to compress the cropped compiled file.
  • the PC does not have upx installed, run the apt-get install upx command to install it.
  • the new write permission can be compressed, and the permission modification command is as follows:
  • Step S7 after entering the python2.7 library folder, execute the zip–r../python27.zip command to compress the library folder of lib/python2.7 using zip compression software, and obtain a compression named python27.zip. package.
  • step S8 all files except os.pyc in the python2.7 library file are deleted.
  • the compiled file of the python program on the ARM processor side includes the following basic files:
  • the entire compiled file takes up less than 6M and can be widely used in embedded systems with tight storage space.
  • the embodiment of the present invention further provides a solution:
  • the Python library only keeps the most basic library files needed for python programs to run.
  • Python can be applied to embedded products with tight space.
  • the embodiment of the present invention also provides a method based on the NFS technology. The details are as follows.
  • the PC starts the nfs service function, and the NFS shares the /opt/arm_python folder.
  • the embedded side remotely loads the arm_python folder, including the application, library files, and files to be edited.
  • the specific operations are as follows:
  • Ip is set to the remote device address.
  • the embedded device can implement the python program under the space of 0 space.
  • the method for occupying the space occupied by the compressed compiled file is not necessarily all used, and may be strategically selected according to the storage space of the actual embedded device.
  • the compiled file can be compressed as shown in the process of FIG. 2.
  • the embodiment of the present invention transplants the dynamic parsing language Python commonly used on the PC side to the platform system based on the ARM processor, and also applies the cropping compression technology to continuously reduce the occupied space of the python program of the ARM processor, and is particularly suitable for use. For embedded devices with low cost and small storage space.
  • another embodiment of the present invention further provides an apparatus for transplanting a Python program across platforms, including:
  • the local compilation module is set to use the original python compiler tool to compile the local machine's python program to obtain the local machine version of the pgen program; wherein, the pgen program is a program generated by the python compiler tool during the compilation of the python program and must be executed;
  • the configuration module is configured to modify the configuration information of the original python compiler tool to replace the compiler of the target machine different from the local machine; wherein the modified python compiler generates the pgen program belonging to the target version. Unable to execute on the local machine;
  • the cross-compilation module is set to compile the target python program on the local machine by using the modified python compiler tool, and in the process, the local machine version of the pgen program is used instead of the target machine's pgen program to execute on the local machine, thereby obtaining the target machine.
  • a compiled file of a python program
  • Importing a module or a remote service module wherein the import module is configured to import a compiled file of the python program of the target machine into a target machine; the remote service module is configured to provide the compiled file to a target machine through a remote service .
  • the device of the above embodiment implements the cross-platform transplantation of the python program, which can effectively improve the software development efficiency of different platforms.
  • the cross-compilation module includes:
  • Modifying the submodule setting the timestamp of the pgen program of the local machine version, and saving it in the target folder of the local machine;
  • a cross-compilation sub-module configured to compile a target python program in the target folder using a modified python compiler tool; wherein the modified python compiler tool generates a target version of the pgen in the target folder
  • the program cannot overwrite the pgen program of the local machine version whose time stamp has been modified, so that in the python program of the compile target machine, the local machine can execute the pgen program of the local machine version whose time stamp has been modified, and the python program of the target machine is compiled. file.
  • the apparatus further includes:
  • a first cropping module configured to: before the step of importing the compiled file into the target machine by the importing module, trimming the compiled file, and retain only the bin folder and the lib folder; wherein the bin The folder is used to save the binary file of the python program of the target machine, and the lib folder is used to save the library file of the python program of the target machine.
  • the first cutting module includes:
  • Delete the submodule set to delete the .py type and / or .pyo type in the lib folder, and / or delete the debug function of the target python program.
  • the apparatus further includes:
  • the first compression module is configured to compress the compiled file using an upx file compressor before the import module imports the compiled file into the target machine.
  • the modified python compiler can compile python with the ability to read compressed packages. program
  • the device also includes:
  • a second compression module configured to compress the lib library folder by using a zip compression software after the first compression module compresses the compiled file by using an upx file compressor, to obtain a zip compressed package of the lib folder;
  • the second cropping module is configured to, after the second compression module obtains the compressed package of the lib folder, trim the source lib folder, and only retain the os.pyc file therein.
  • the device of the embodiment of the present invention corresponds to the method for transplanting a python program across platforms according to the embodiment of the present invention, and the technical effect that the method can achieve can also be achieved by the device of the embodiment.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve. Thus, the invention is not limited to any specific combination of hardware and software.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • each device/function module/functional unit in the above embodiment When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the embodiment of the invention transplants the dynamic parsing language Python commonly used on the PC side into the platform system based on the embedded processor, and also applies the cropping compression technology to continuously reduce the occupied space of the python program of the embedded processor, and is particularly suitable for low cost.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

本发明实施例提供一种跨平台移植python程序的方法及装置。方法包括:利用原始的python编译工具编译本地机的python程序,得到本地机版本的pgen程序;对原始的python编译工具的配置信息进行修改,使其更换与本地机不同平台的目标机的编译器;其中,修改后的python编译工具所生成的pgen程序属于目标机版本,无法在本地机上执行;在本地机上利用修改后的python编译工具编译目标机的python程序,并在该过程中使用本地机版本的pgen程序代替目标机的pgen程序在本地机上执行,从而得到目标机的python程序的编译文件;将所述目标机的python程序的编译文件导入目标机中或通过远程服务向目标机提供所述编译文件。本发明实施例的方案实现了python程序的跨平台移植,有助于不同平台开发软件产品的效率。

Description

一种跨平台移植python程序的方法及装置 技术领域
本发明涉及交叉编译领域,尤其涉及跨平台程序移植。
背景技术
目前,软件开发业界存在多种成熟的开发语言,新的语言吸收了传统语言的特点,可让软件开发更为敏捷。然而,在嵌入式设备中,由于成本限制与处理速度的瓶颈,大多数产品开发语言始终局限在C语言。C语言开发效率低,导致开发周期长,无法适应现今嵌入式产品快速更新换代的需求,因此,应用一种可以让开发周期缩短的语言十分必要。
Python作为近年应用趋势越来越高的语言,具有动态解析,跨平台,公用库多,开发简易等优点,已经成为主流PC侧的标准配置语言。因此,研究一种将Python移植到嵌入式系统的方法是很有必要的。
此外,工业领域的嵌入式设备的产品更新相比民用产品要慢很多,其存储空间不一定能够装得下Python程序。因此,在实现Python程序移植同时,还需要解决Python程序占用空间大的问题。
发明内容
本发明实施例提供一种跨平台移植python程序的方法及装置,能够实现了python程序的跨平台移植,有助于不同平台开发软件产品的效率。
根据本发明的一个方面,本发明实施例提供一种跨平台移植python程序的方法,包括:
利用python的本地编译工具编译本地机的python程序,得到本地机版本的pgen程序;其中,本地机版本的pgen程序是所述本地编译工具在编译python程序过程中产生且必需执行的程序;
在本地机上利用python的交叉编译工具编译目标机的python程序,并在该过程中使用本地机版本的pgen程序代替目标机版本的pgen程序在本地机 上执行,从而得到目标机的python程序的编译文件;其中,所述目标机版本的pgen程序由所述交叉编译工具在编译python程序过程中产生,且无法在本地机上执行;
将所述目标机的python程序的编译文件导入目标机中或通过远程服务向目标机提供所述编译文件。
其中,在本地机上利用修改后的python编译工具编译目标机的python程序的步骤包括:
修改所述本地机版本的pgen程序的时间戳,并将其保存在本地机的目标文件夹中;
在所述目标文件夹中使用修改后的python编译工具编译目标机的python程序;其中,修改后的python编译工具在所述目标文件夹中生成的目标机版本的pgen程序无法覆盖掉时间戳已修改的本地机版本的pgen程序,从而在编译目标机的python程序中,本地机能够执行时间戳已修改的本地机版本的pgen程序,得到目标机的python程序的编译文件。
其中,将所述编译文件导入目标机中的步骤前还包括:
对所述编译文件进行裁剪,只保留其中的bin文件夹和lib文件夹;其中,所述bin文件夹用于保存目标机的python程序的二进制文件,所述lib文件夹用于保存目标机的python程序的库文件。
其中,对所述编译文件进行裁剪的步骤还包括:
删除lib文件夹中的.py类型和/或.pyo类型文件;
和/或删除目标机的python程序的调试功能。
其中,将所述编译文件导入目标机中的步骤前还包括:
使用upx文件压缩器对所述编译文件进行压缩。
其中,所述交叉编译工具能够编译具有读取压缩包能力的python程序;
在使用upx文件压缩器对所述编译文件进行压缩的步骤后还包括:
利用zip压缩软件对lib文件夹中的python库文件夹进行压缩,得到python库文件夹的zip压缩包;
然后对源python库文件夹进行裁剪,只保留其中的os.pyc文件。
根据本发明的另一个方面,本发明实施例还提供一种跨平台移植python程序的装置,包括:
本地编译模块,设置为利用python的本地编译工具编译本地机的python程序,得到本地机版本的pgen程序;其中,本地机版本的pgen程序是所述本地编译工具在编译python程序过程中产生且必需执行的程序;
交叉编译模块,设置为在本地机上利用python的交叉编译工具编译目标机的python程序,并在该过程中使用本地机版本的pgen程序代替目标机版本的pgen程序在本地机上执行,从而得到目标机的python程序的编译文件;其中,所述目标机版本的pgen程序由所述交叉编译工具在编译python程序过程中产生,且无法在本地机上执行;
导入模块或远程服务模块;其中,所述导入模块设置为将所述目标机的python程序的编译文件导入目标机中;所述远程服务模块,设置为通过远程服务向目标机提供所述编译文件。
其中,所述交叉编译模块包括:
修改子模块,设置为修改所述本地机版本的pgen程序的时间戳,并将其保存在本地机的目标文件夹中;
交叉编译子模块,设置为在所述目标文件夹中使用所述交叉编译工具编译目标机的python程序;其中,交叉编译工具在所述目标文件夹中生成的目标机版本的pgen程序无法覆盖掉时间戳已修改的本地机版本的pgen程序,从而在编译目标机的python程序中,本地机能够执行时间戳已修改的本地机版本的pgen程序,得到目标机的python程序的编译文件。
其中,所述装置还包括:
第一裁剪模块,设置为在所述导入模块将所述编译文件导入目标机中的步骤前,对所述编译文件进行裁剪,只保留其中的bin文件夹和lib文件夹;其中,所述bin文件夹用于保存目标机的python程序的二进制文件,所述lib文件夹用于保存目标机的python程序的库文件。
其中,所述第一裁剪模块包括:
删除子模块,设置为删除bin文件夹和lib文件夹中的.py类型和/或.pyo类型和/或调试信息类型的文件。
其中,所述装置还包括:
第一压缩模块,设置为在所述导入模块将所述编译文件导入目标机前,使用upx文件压缩器对所述编译文件进行压缩。
其中,所述交叉编译工具能够编译具有读取zip压缩包能力的python程序;
所述装置还包括:
第二压缩模块,设置为在所述第一压缩模块使用upx文件压缩器对所述编译文件进行压缩后,利用zip压缩软件对lib文件夹中的python库文件夹进行压缩,得到python库文件夹的zip压缩包
第二裁剪模块,设置为在第二压缩模块得到python库文件夹的压缩包后,对源python库文件夹进行裁剪,只保留其中的os.pyc文件。
根据本发明的又一个方面,本发明实施例还提供一种计算机程序及其载体,所述计算机程序包括程序指令,当该程序指令被跨平台移植python程序设备执行时,使得该设备可实施上述跨平台移植python程序的方法。
本发明实施例的上述技术方案的有益效果如下:
本发明实施例的方案实现了python程序的跨平台移植,有助于不同平台开发软件产品的效率。
附图概述
图1为本发明实施例的跨平台移植python程序的方法步骤示意图;
图2为本发明实施例的压缩编译文件的执行流程图;
图3为本发明实施例的跨平台移植python程序的装置结构示意图。
本发明的较佳实施方式
下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在 不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
如图1所示,本发明实施例提供一种跨平台移植python程序的方法,包括:
步骤11,利用python的本地编译工具编译本地机的python程序,得到本地机版本的pgen程序;其中,本地机版本的pgen程序是所述本地编译工具在编译python程序过程中产生且必需执行的程序;
步骤12,在本地机上利用python的交叉编译工具编译目标机的python程序,并在该过程中使用本地机版本的pgen程序代替目标机版本的pgen程序在本地机上执行,从而得到目标机的python程序的编译文件;其中,所述目标机版本的pgen程序由所述交叉编译工具在编译python程序过程中产生,且无法在本地机上执行;
步骤13,将所述目标机的python程序的编译文件导入目标机中或通过远程服务向目标机提供所述编译文件。
上述实施例的方法实现了python程序的跨平台移植,可有效提高不同平台的软件开发效率。
其中,交叉编译工具由于配备有目标机的编译器,因此会生成目标机版本的pgen程序。而整个交叉编译的过程需要在本地机执行,当本地机利用交叉编译工具执行到目标机版本的pgen程序时,由于本地机无法执行目标机版本的pgen程序,会中断交叉编译工作,因此需要对交叉编译工具进行配置,使其指定运行本地机版本的pgen程序。显然,这种额外配置工作不够便捷,为此本发明实施例提供了一种更简单快捷地方法,使交叉编译工具能够直接运行本地机版本的pgen程序,即步骤13包括:
步骤131,修改所述本地机版本的pgen程序的时间戳,并将其保存在本地机的目标文件夹中;
步骤132,在所述目标文件夹中使用所述交叉编译工具编译目标机的python程序;其中,交叉编译工具在所述目标文件夹中生成的目标机版本的pgen程序无法覆盖掉时间戳已修改的本地机版本的pgen程序,从而在编译目标机的python程序中,本地机能够执行时间戳已修改的本地机版本的pgen 程序,得到目标机的python程序的编译文件。
在上述描述中,只需要修改本地机版本的pgen程序的时间戳,之后将其放入目标文件中再运行交叉编译工具即可使之后生成的目标机版本的pgen程序无法替换掉本地机版本的pgen程序。在交叉编译的过程中,交叉编译工具在目标文件内能够自动执行本地机版本的pgen程序,这种替换方式十分简单,不需要过再过多修改交叉编译工具的配置信息。
此外,经研究发现,在目标机执行python程序时,只应用到了编译文件的bin文件夹和lib文件夹。其中,bin文件夹用于保存目标机的python程序的二进制文件,lib文件夹用于保存目标机的python程序的库文件。因此,作为可选方案,本发明实施例的方法还包括:
步骤15,对所述编译文件进行裁剪,只保留其中的bin文件夹和lib文件夹。
此外,在上述实施例的基础之上,还可进一步对所述编译文件进行裁剪,即步骤15中,删除lib文件夹中的.py类型和/或.pyo类型文件;和/或删除目标机的python程序的调试功能。
在编译文件中,.py是源程序文件,pyc是.py编译后形成的文件(即对源文件进行编译,就会生成.pyc文件),而.pyo为优化编译后的文件。其中,目标机实际应用到的是经编译的.pyc以及.pyo文件,因此可直接删除.py文件。而.pyo文件的优化效果在运行时并不明显,为进一步节约编译文件的占用空间也可进行删除。此外,目标机的python程序具有调试功能,用于进行程序优化,但成熟稳定的python程序不需要用户去进行优化,因此python程序的调试功能相对多余,也可以被删除掉。需要说明的是,删除python程序的调试功能并不是删除掉所述编译文件中的某个文件,而是一种带有功能损失的压缩过程。
可选地,在对编译文件进行裁剪后,本发明实施例的方法还可以包括:
步骤16,使用upx文件压缩器对所述编译文件进行压缩,以进一步节约编译文件占用空间。
之后还可执行步骤17,利用zip压缩软件对lib文件夹中的python库文件 夹再次进行压缩,得到python库文件夹的zip压缩包;以及
步骤18,对源lib文件夹进行裁剪,只保留其中的os.pyc文件。
在上述描述中,upx压缩的文件后不会产生压缩包,因此可结合目前常见的zip压缩包技术一起使用。在对python库文件夹进行第二次压缩后,会在源python库文件夹的基础上生成一个zip压缩包,理论上讲,源python库文件夹可以直接删除,但在实际验证中发现,该文件夹中的os.pyc文件必须保留,才能使python程序在执行时正常加载python库文件夹的压缩包。因此上述步骤18保留了os.pyc文件。
下面结合一个实际的应用场景对本发明实施例的方法进行详细介绍。
Python是PC端所使用的动态解析语言,因此在本应用场景中,将PC作为本地机。而目前大多数嵌入式设备都基于ARM处理器平台,不能实现Python程序,因此本应用场景用于在ARM处理器上实现Python程序。
首先获取python的本地编译工具,即本领域熟知的应用于PC侧的python源码包,之后基本地编译工具按照现有的python程序编译过程工作,得到PC版本的pgen程序。
由于python的交叉编译不仅仅涉及嵌入式侧的编译,还涉及PC侧部分必需程序的生成,因此,通过目标文件夹的方式进行两方的隔离。这里,进入源码包,新建一个名称为arm_build的目标文件夹,用于存储交叉编译的python程序(即嵌入式设备的python程序)。
之后将PC版本的pgen程序放入arm_build文件夹中,并在arm_build目录下,执行如下命令:
touch–t 12312359Parser/pgen
上述命令的意思是将PC版本的pgen程序的时间戳改为今年的12月31日的23时59分,只要不在一年的最后一分钟执行,均为有效操作。该操作可以保证arm_build目录下的make操作不会替换刚才复制进来的可以在PC侧运行的pgen程序。
下面的步骤重点陈述如何在一个源码包中,区分两种运行环境的编译生成操作。
首先,对本地编译工具的配置信息进行修改,即在arm_build文件夹内操作如下:
echo ac_cv_file__dev_ptmx=yes>config.site
echo ac_cv_file__dev_ptc=yes>>config.site
export CONFIG_SITE=config.site
并执行
../configure
--host=arm-none-linux-gnueabi     --build=i686-linux-gnu--target=arm-none-linux-gnueabi    --disable-ipv6     --prefix=$arm_install--enable-shared--silent
目前python程序的嵌入式应用尚不完全支持ipV6的通信,因此,需要通过--disable-ipv6命令进行屏蔽。--prefix=$arm_install命令用于设置交叉编译后的待安装目录,这里取/opt/arm_python。--build命令用于设置PC侧的系统信息。--host命令用于设置ARM处理器的交叉编译器,用户可以根据实际情况进行详细设置。--enable-shared命令可选,代表交叉编译后的python采用共享库模式(本应用场景中,不添加该选项)。通过上述配置修改完成后,本地编译工具更换为ARM处理器的编译器,成为本文所述的交叉编译工具,能够编译出ARM处理器的python程序。
在configure操作完成后,会在arm_build里生成makefile文件夹,在其中Modules的Setup中找到如下这句命令:
zlib zlibmodule.c-I$(prefix)/include-L$(exec_prefix)/lib–lz
取消该命令的注释,即可使生成的python程序具备读取zip压缩包的能力。
之后,在arm_build目录下,执行make&&make install–i
注意-i参数是必要的,意思为即使错误,仍然继续安装。这是由于ARM处理器版本的python程序在编译过程中,存在时序问题,先安装的某模块依赖于后安装的某模块,加入该参数,可以解决这个问题,否则,无法正常安装。
至此,/opt/arm_python中已经具有可以运行于ARM处理器的python程序与库文件。
由于PC侧交叉编译后的python程序占用空间大,大多数ARM处理器的嵌入式设备的存储空间较为紧张,不能直接复制到嵌入式设备中,因此需要进行裁剪,下面对裁剪过程进行具体介绍。
为方便陈述,假设这里python选择2.7版本。
步骤S1,经过python文件结构的分析,发现得到的编译文件中只有bin和lib文件夹是运行时必须,因此,删除其他文件夹。
步骤S2,Bin文件夹中,只有python2.7为实际执行文件。
步骤S3,Lib文件夹中,只有libpython2.7.so.1.0(设置了动态库模式具有该文件)和python2.7文件夹为实际运行所需。
步骤S4,裁剪python2.7库文件夹,实际仅保留.pyc文件即可。
步骤S5,进入python安装路径后执行下述命令删除调试功能:
arm-none-linux-gnueabi-strip bin/python2.7
arm-none-linux-gnueabi-strip lib/libpython2.7.so.1.0(设置了动态库模式则执行该命令)
arm-none-linux-gnueabi-strip lib/python2.7/lib-dynload/*
经上述步骤裁剪后保留了嵌入式设备的python程序的最重要的文件。此外,还可进一步降低编译文件的空间占用,即在步骤S5后执行以下步骤:
步骤S6,应用upx技术对裁剪后的编译文件进行压缩。在本步骤中,如果PC侧未安装有upx,则执行apt-get install upx命令进行安装。此外,由于动态库默认为只读权限,这里,新增写权限,方可压缩,其权限修改命令如下所示:
chmod+w lib/libpython2.7.so.1.0
upx lib/libpython2.7.so.1.0
chmod+w lib/python2.7/lib-dynload/*
upx lib/python2.7/lib-dynload/*
upx bin/python2.7
步骤S7,进入python2.7库文件夹后,执行zip–r../python27.zip命令,即使用zip压缩软件对lib/python2.7的库文件夹进行压缩,得到名为python27.zip的压缩包。
步骤S8,删除python2.7库文件中除os.pyc外的所有文件。
此时,ARM处理器侧的python程序的编译文件包括如下基本文件:
bin/python2.7、lib/python2.7/os.pyc、lib/python27.zip、lib/libpython2.7.so.1.0(静态库模式没有该文件)。整个编译文件占用空间小于6M,可广泛应用于存储空间紧张的嵌入式系统中。
对于存储空间更为紧张的嵌入式系统,本发明实施例还提供方案:
Python库只保留python程序运行所需要的最基本的库文件。
这里的关键是如何找出python的最基本库文件清单,方法如下:
执行python–v 2>verbose.txt命令;该命令用于将AMR处理器侧的Python程序启动过程中所引用的库文件记录在verbose文件中,根据verbose文件中的信息对python27.zip的库文件进行删选,只保留最基本的库文件。删选后的python27.zip仅占用100多K空间。
应用以上技术,可将python应用在空间紧张的嵌入式产品中。
对于存储空间极其紧张甚至接近于0的嵌入式设备,如果其具有IP网络功能,本发明实施例还提供基于NFS技术的方法进行实现。其详细说明如下。
PC开启nfs服务功能,NFS分享/opt/arm_python文件夹。
嵌入式侧远程加载arm_python文件夹,包括应用程序、库文件与待编辑文件。具体操作如下:
远端设备:
确保安装了nfs-kernel-server服务。
在/etc/exports中添加如下:
/opt/arm_python*(rw,no_root_squash)
执行exportfs–arv使其生效。
在/etc/default/nfs-kernel-server文件中,添加RPCMOUNTDOPTS="--manage-gids--port 1002"命令,其中1002示例性表示端口的IP(端口可根据实际情况选取)。
执行service nfs-kernel-server restart使其生效。
在防火墙中添加1002端口即可。
嵌入式设备侧:
在/mnt文件夹内新建python文件夹,执行
Mount–o nolock ip:/opt/arm_python/mnt/python
Ip设置为远程设备地址。
在/etc/profile中,加入
Export PATH=$PATH:/mnt/python/bin
Export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/python/lib。
通过以上步骤,嵌入式设备可0空间占用下实现python程序。
当然,上述压缩编译文件的占用空间的方法并不以一定要全部使用,可根据实际的嵌入式设备的存储空间有策略性地选择执行。示例性地,可如图2所示的流程压缩编译文件。
综上所述,本发明实施例将PC端常用的动态解析语言Python移植到基于ARM处理器的平台系统中,还应用裁剪压缩技术,不断地减少ARM处理器的python程序的占用空间,特别适用于成本低、存储空间小的嵌入式设备。
此外,如图3所示,本发明的另一实施例还提供一种跨平台移植python程序的装置,包括:
本地编译模块,设置为利用原始的python编译工具编译本地机的python程序,得到本地机版本的pgen程序;其中,pgen程序是python编译工具在编译python程序过程中产生且必需执行的程序;
配置模块,设置为对原始的python编译工具的配置信息进行修改,使其更换与本地机不同平台的目标机的编译器;其中,修改后的python编译工具所生成的pgen程序属于目标机版本,无法在本地机上执行;
交叉编译模块,设置为在本地机上利用修改后的python编译工具编译目标机的python程序,并在该过程中使用本地机版本的pgen程序代替目标机的pgen程序在本地机上执行,从而得到目标机的python程序的编译文件;
导入模块或远程服务模块;其中,所述导入模块设置为将所述目标机的python程序的编译文件导入目标机中;所述远程服务模块,设置为通过远程服务向目标机提供所述编译文件。
上述实施例的装置实现了python程序的跨平台移植,可有效提高不同平台的软件开发效率。
其中,所述交叉编译模块包括:
修改子模块,设置为修改所述本地机版本的pgen程序的时间戳,并将其保存在本地机的目标文件夹中;
交叉编译子模块,设置为在所述目标文件夹中使用修改后的python编译工具编译目标机的python程序;其中,修改后的python编译工具在所述目标文件夹中生成的目标机版本的pgen程序无法覆盖掉时间戳已修改的本地机版本的pgen程序,从而在编译目标机的python程序中,本地机能够执行时间戳已修改的本地机版本的pgen程序,得到目标机的python程序的编译文件。
此外,在上述实施例的基础之上,所述装置还包括:
第一裁剪模块,设置为在所述导入模块将所述编译文件导入目标机中的步骤前,对所述编译文件进行裁剪,只保留其中的bin文件夹和lib文件夹;其中,所述bin文件夹用于保存目标机的python程序的二进制文件,所述lib文件夹用于保存目标机的python程序的库文件。
具体地,所述第一裁剪模块包括:
删除子模块,设置为删除lib文件夹中的.py类型和/或.pyo类型,和/或删除目标机的python程序的调试功能。
此外,在上述实施例的基础之上,所述装置还包括:
第一压缩模块,设置为在所述导入模块将所述编译文件导入目标机前,使用upx文件压缩器对所述编译文件进行压缩。
其中,修改后的python编译工具能够编译具有读取压缩包能力的python 程序;
所述装置还包括:
第二压缩模块,设置为在所述第一压缩模块使用upx文件压缩器对所述编译文件进行压缩后,利用zip压缩软件对lib库文件夹进行压缩,得到lib文件夹的zip压缩包;
第二裁剪模块,设置为在第二压缩模块得到lib文件夹的压缩包后,对源lib文件夹进行裁剪,只保留其中的os.pyc文件。
显然,本发明实施例的装置与本发明实施例的跨平台移植python程序的方法相对应,该方法所能达到的技术效果,本实施例的装置同样也能够达到。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
上述实施例中的各装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。
上述实施例中的各装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求所述的保护范围为准。
工业实用性
本发明实施例将PC端常用的动态解析语言Python移植到基于嵌入式处理器的平台系统中,还应用裁剪压缩技术,不断地减少嵌入式处理器的python程序的占用空间,特别适用于成本低、存储空间小的嵌入式设备。

Claims (14)

  1. 一种跨平台移植python程序的方法,包括:
    利用python的本地编译工具编译本地机的python程序,得到本地机版本的pgen程序;其中,本地机版本的pgen程序是所述本地编译工具在编译python程序过程中产生且必需执行的程序;
    在本地机上利用python的交叉编译工具编译目标机的python程序,并在该过程中使用本地机版本的pgen程序代替目标机版本的pgen程序在本地机上执行,从而得到目标机的python程序的编译文件;其中,所述目标机版本的pgen程序由所述交叉编译工具在编译python程序过程中产生,且无法在本地机上执行;
    将所述目标机的python程序的编译文件导入目标机中或通过远程服务向目标机提供所述编译文件。
  2. 根据权利要求1所述的方法,其中,所述在本地机上利用修改后的python编译工具编译目标机的python程序的步骤包括:
    修改所述本地机版本的pgen程序的时间戳,并将其保存在本地机的目标文件夹中;
    在所述目标文件夹中使用所述交叉编译工具编译目标机的python程序;其中,交叉编译工具在所述目标文件夹中生成的目标机版本的pgen程序无法覆盖掉时间戳已修改的本地机版本的pgen程序,从而在编译目标机的python程序中,本地机能够执行时间戳已修改的本地机版本的pgen程序,得到目标机的python程序的编译文件。
  3. 根据权利要求1所述的方法,在将所述编译文件导入目标机中的步骤前还包括:
    对所述编译文件进行裁剪,只保留其中的bin文件夹和lib文件夹;其中,所述bin文件夹用于保存目标机的python程序的二进制文件,所述lib文件夹用于保存目标机的python程序的库文件。
  4. 根据权利要求3所述的方法,其中,对所述编译文件进行裁剪的步骤 还包括:
    删除lib文件夹中的.py类型和/或.pyo类型文件;
    和/或删除目标机的python程序的调试功能。
  5. 根据权利要求1所述的方法,在将所述编译文件导入目标机中的步骤前还包括:
    使用upx文件压缩器对所述编译文件进行压缩。
  6. 根据权利要求5所述的方法,其中,所述交叉编译工具能够编译具有读取zip压缩包能力的python程序;
    在使用upx文件压缩器对所述编译文件进行压缩的步骤后还包括:
    利用zip压缩软件对lib文件夹中的python库文件夹进行压缩,得到python库文件夹的zip压缩包;
    然后对源python库文件夹进行裁剪,只保留其中的os.pyc文件。
  7. 一种跨平台移植python程序的装置,包括:
    本地编译模块,设置为利用python的本地编译工具编译本地机的python程序,得到本地机版本的pgen程序;其中,本地机版本的pgen程序是所述本地编译工具在编译python程序过程中产生且必需执行的程序;
    交叉编译模块,设置为在本地机上利用python的交叉编译工具编译目标机的python程序,并在该过程中使用本地机版本的pgen程序代替目标机版本的pgen程序在本地机上执行,从而得到目标机的python程序的编译文件;其中,所述目标机版本的pgen程序由所述交叉编译工具在编译python程序过程中产生,且无法在本地机上执行;
    导入模块或远程服务模块;其中,所述导入模块设置为将所述目标机的python程序的编译文件导入目标机中;所述远程服务模块,设置为通过远程服务向目标机提供所述编译文件。
  8. 根据权利要求7所述的装置,其中,所述交叉编译模块包括:
    修改子模块,设置为修改所述本地机版本的pgen程序的时间戳,并将其保存在本地机的目标文件夹中;
    交叉编译子模块,设置为在所述目标文件夹中使用所述交叉编译工具编译目标机的python程序;其中,交叉编译工具在所述目标文件夹中生成的目标机版本的pgen程序无法覆盖掉时间戳已修改的本地机版本的pgen程序,从而在编译目标机的python程序中,本地机能够执行时间戳已修改的本地机版本的pgen程序,得到目标机的python程序的编译文件。
  9. 根据权利要求7所述的装置,还包括:
    第一裁剪模块,设置为在所述导入模块将所述编译文件导入目标机中的步骤前,对所述编译文件进行裁剪,只保留其中的bin文件夹和lib文件夹;其中,所述bin文件夹用于保存目标机的python程序的二进制文件,所述lib文件夹用于保存目标机的python程序的库文件。
  10. 根据权利要求9所述的装置,其中,所述第一裁剪模块包括:
    删除子模块,设置为删除lib文件夹中的.py类型和/或.pyo类型,和/或删除目标机的python程序的调试功能。
  11. 根据权利要求7所述的装置,还包括:
    第一压缩模块,设置为在所述导入模块将所述编译文件导入目标机前,使用upx文件压缩器对所述编译文件进行压缩。
  12. 根据权利要求11所述的装置,其中,所述交叉编译工具能够编译具有读取zip压缩包能力的python程序;
    所述装置还包括:
    第二压缩模块,设置为在所述第一压缩模块使用upx文件压缩器对所述编译文件进行压缩后,利用zip压缩软件对lib文件夹中的python库文件夹进行压缩,得到python库文件夹的zip压缩包;
    第二裁剪模块,设置为在第二压缩模块得到python库文件夹的压缩包后,对源python库文件夹进行裁剪,只保留其中的os.pyc文件。
  13. 一种计算机程序,包括程序指令,当该程序指令被跨平台移植python程序设备执行时,使得该设备可实施权利要求1-6任一项的方法。
  14. 一种载有权利要求13所述计算机程序的载体。
PCT/CN2014/089512 2014-07-16 2014-10-24 一种跨平台移植python程序的方法及装置 WO2015117419A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410339009.5 2014-07-16
CN201410339009.5A CN105260169A (zh) 2014-07-16 2014-07-16 一种跨平台移植python程序的方法及装置

Publications (1)

Publication Number Publication Date
WO2015117419A1 true WO2015117419A1 (zh) 2015-08-13

Family

ID=53777236

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/089512 WO2015117419A1 (zh) 2014-07-16 2014-10-24 一种跨平台移植python程序的方法及装置

Country Status (2)

Country Link
CN (1) CN105260169A (zh)
WO (1) WO2015117419A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111722875A (zh) * 2020-05-19 2020-09-29 上海中科网威信息技术有限公司 一种申威平台快速移植编译开源程序的方法
CN112130859A (zh) * 2019-06-25 2020-12-25 深信服科技股份有限公司 一种应用运行方法、装置、设备及存储介质
CN112241268A (zh) * 2020-09-22 2021-01-19 合肥寰芯微电子科技有限公司 一种keil工程的编译方法、系统及设备

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106909434B (zh) * 2017-02-28 2020-04-03 杭州迪普科技股份有限公司 可执行程序中未定义函数的检测方法及装置
CN108549559A (zh) * 2018-05-02 2018-09-18 山东浪潮通软信息科技有限公司 一种调用Python算法的方法和装置
CN110503644B (zh) * 2019-08-27 2023-07-25 广东工业大学 基于移动平台的缺陷检测实现方法、缺陷检测方法及相关设备
CN115981646A (zh) * 2022-12-29 2023-04-18 深圳市铨顺宏科技有限公司 一种交互界面快速开发方法、装置、设备及存储介质

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1885264A (zh) * 2005-06-21 2006-12-27 国际商业机器公司 用于嵌入式系统的软件包构建方法和系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8266582B2 (en) * 2008-03-31 2012-09-11 Oracle America, Inc. Method for creating unified binary files
CN103488485A (zh) * 2013-09-25 2014-01-01 浪潮电子信息产业股份有限公司 一种优化应用软件在服务器上运行性能的并行移植方法

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1885264A (zh) * 2005-06-21 2006-12-27 国际商业机器公司 用于嵌入式系统的软件包构建方法和系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SONG, LIZHI: "Research on Prototype Developing Environment for CNC System Based on IEC61131-3", SCIENCE -ENGINEERING (A), CHINA MASTER'S THESES FULL-TEXT DATABASE, 15 June 2014 (2014-06-15) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112130859A (zh) * 2019-06-25 2020-12-25 深信服科技股份有限公司 一种应用运行方法、装置、设备及存储介质
CN111722875A (zh) * 2020-05-19 2020-09-29 上海中科网威信息技术有限公司 一种申威平台快速移植编译开源程序的方法
CN112241268A (zh) * 2020-09-22 2021-01-19 合肥寰芯微电子科技有限公司 一种keil工程的编译方法、系统及设备

Also Published As

Publication number Publication date
CN105260169A (zh) 2016-01-20

Similar Documents

Publication Publication Date Title
WO2015117419A1 (zh) 一种跨平台移植python程序的方法及装置
US11556367B2 (en) Dynamic image composition for container deployment
TWI629640B (zh) 虛擬化軟體組建系統
US20180293287A1 (en) Automating extract, transform, and load job testing
US9852137B2 (en) Container storage migration
US9092500B2 (en) Utilizing snapshots for access to databases and other applications
US8719767B2 (en) Utilizing snapshots to provide builds to developer computing devices
US9473550B2 (en) Multifusion of a stream operator in a streaming application
US10366112B2 (en) Compiling extract, transform, and load job test data cases
US8010578B2 (en) Method of refactoring a running database system
WO2015062181A1 (zh) 用于实现多源异构数据资源自动同步的方法
US10346150B2 (en) Computerized system and method for patching an application by separating executables and working data using different images
KR20110063324A (ko) 자동화된 구성요소를 가진 모델-기반 데이터 보관 시스템
WO2014056371A1 (en) Method and apparatus for determining range of files to be migrated
CA2959647C (en) Data migration tool with intermediate incremental copies
Thain et al. Techniques for preserving scientific software executions: Preserve the mess or encourage cleanliness?
US11403002B2 (en) Multimodal access to block devices in a distributed storage system
US20150350315A1 (en) Zero copy volume reconstruction
US20180107764A1 (en) Graph comparison for conflict resolution
US20190354602A1 (en) Dynamically changing the architecture of a dataset while allowing concurrent user access to data in the dataset
Rao et al. Hotrod: Managing grid storage with on-demand replication
US20240086181A1 (en) Deploying patches via rpms
Lawrie et al. Evaluation of the Suitability of Alluxio for Hadoop Processing Frameworks
CN104850401A (zh) 一种用PVFS替代Hadoop存储模块的方法
CN112486939A (zh) 基于公有云的Moosefs分布式文件存储方法、系统、介质及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14882001

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14882001

Country of ref document: EP

Kind code of ref document: A1