MCPcopy Create free account
hub / github.com/Topdu/OpenOCR / main

Function main

build_package.py:134–166  ·  view source on GitHub ↗

Main function

()

Source from the content-addressed store, hash-verified

132
133
134def main():
135 """Main function"""
136
137 print('='*60)
138 print('OpenOCR Package Build Script')
139 print('='*60 + '\n')
140
141 try:
142 # Step 1: Create package structure
143 print('Step 1: Creating package structure...')
144 create_package_structure()
145
146 # Step 2: Build wheel
147 print('\nStep 2: Building wheel package...')
148 success = build_wheel()
149
150 if success:
151 print('\n' + '='*60)
152 print('All steps completed successfully!')
153 print('='*60)
154 print('\nTo install the package, run:')
155 print(f' pip install build/dist/openocr_python-*.whl')
156 print('\nAfter installation, you can use:')
157 print(' openocr --help')
158 else:
159 print('\nBuild failed. Please check the error messages above.')
160 sys.exit(1)
161
162 except Exception as e:
163 print(f'\nError: {e}')
164 import traceback
165 traceback.print_exc()
166 sys.exit(1)
167
168
169if __name__ == '__main__':

Callers 1

build_package.pyFile · 0.70

Calls 2

create_package_structureFunction · 0.85
build_wheelFunction · 0.85

Tested by

no test coverage detected