LibraryBuilder: Difference between revisions

From SweepMe! Wiki
Jump to navigation Jump to search
(Created page with "The LibraryBuilder is a tool which helps you to collect all missing python packages that are missing in the main program. Thus, you can import them in your Device Class. An e...")
 
No edit summary
Line 7: Line 7:


# Open build_library.py and set the path where to find your SweepMe! installation. The script can now check, which packages already exist.
# Open build_library.py and set the path where to find your SweepMe! installation. The script can now check, which packages already exist.
# Open required_modules.py and type in "import <your-module>". Nothing else is needed. Import all packages you need for your application  
# Open required_modules.py and type in "import <your-module>". Nothing else is needed. Import all packages you need for your application  
# Run build_library.py  - Please make sure that you use the same python version than used for SweepMe!
# Run build_library.py  - Please make sure that you use the same python version than used for SweepMe!
# The output will be found in a newly created folder called 'libs'. Please make sure that you have all licenses in order to use or to distribute these files. We recommend to add a folder including all licenses files.
# The output will be found in a newly created folder called 'libs'. Please make sure that you have all licenses in order to use or to distribute these files. We recommend to add a folder including all licenses files.
# Copy the folder 'libs' into your Device Class folder
# Copy the folder 'libs' into your Device Class folder
# Check the Device Class 'ImportModules' to see how to import packages from the folder 'libs'
# Check the Device Class 'ImportModules' to see how to import packages from the folder 'libs'

Revision as of 10:32, 28 July 2018

The LibraryBuilder is a tool which helps you to collect all missing python packages that are missing in the main program. Thus, you can import them in your Device Class.

An example is given in the Device Class called ImportModules. Install it from the webpage, use the DeviceClassManager or check your DeviceClasses folder if it is already there.

Steps to get it working:

  1. Open build_library.py and set the path where to find your SweepMe! installation. The script can now check, which packages already exist.
  2. Open required_modules.py and type in "import <your-module>". Nothing else is needed. Import all packages you need for your application
  3. Run build_library.py - Please make sure that you use the same python version than used for SweepMe!
  4. The output will be found in a newly created folder called 'libs'. Please make sure that you have all licenses in order to use or to distribute these files. We recommend to add a folder including all licenses files.
  5. Copy the folder 'libs' into your Device Class folder
  6. Check the Device Class 'ImportModules' to see how to import packages from the folder 'libs'