|
|
|
@@ -65,22 +65,6 @@ def _write_device_target(file): |
|
|
|
|
|
|
|
def build_dependencies(): |
|
|
|
"""generate python file""" |
|
|
|
target = os.path.join(pkg_dir, 'mindspore', 'device_target.py') |
|
|
|
with open(target, 'w') as f: |
|
|
|
_write_device_target(f) |
|
|
|
|
|
|
|
target = os.path.join(pwd, 'mindspore', 'device_target.py') |
|
|
|
with open(target, 'w') as f: |
|
|
|
_write_device_target(f) |
|
|
|
|
|
|
|
package_info = os.path.join(pkg_dir, 'mindspore', 'package_name.py') |
|
|
|
with open(package_info, 'w') as f: |
|
|
|
_write_package_name(f) |
|
|
|
|
|
|
|
package_info = os.path.join(pwd, 'mindspore', 'package_name.py') |
|
|
|
with open(package_info, 'w') as f: |
|
|
|
_write_package_name(f) |
|
|
|
|
|
|
|
version_file = os.path.join(pkg_dir, 'mindspore', 'version.py') |
|
|
|
with open(version_file, 'w') as f: |
|
|
|
_write_version(f) |
|
|
|
@@ -97,6 +81,22 @@ def build_dependencies(): |
|
|
|
with open(config_file, 'w') as f: |
|
|
|
_write_config(f) |
|
|
|
|
|
|
|
target = os.path.join(pkg_dir, 'mindspore', 'default_config.py') |
|
|
|
with open(target, 'a') as f: |
|
|
|
_write_device_target(f) |
|
|
|
|
|
|
|
target = os.path.join(pwd, 'mindspore', 'default_config.py') |
|
|
|
with open(target, 'a') as f: |
|
|
|
_write_device_target(f) |
|
|
|
|
|
|
|
package_info = os.path.join(pkg_dir, 'mindspore', 'default_config.py') |
|
|
|
with open(package_info, 'a') as f: |
|
|
|
_write_package_name(f) |
|
|
|
|
|
|
|
package_info = os.path.join(pwd, 'mindspore', 'default_config.py') |
|
|
|
with open(package_info, 'a') as f: |
|
|
|
_write_package_name(f) |
|
|
|
|
|
|
|
commit_file = os.path.join(pkg_dir, 'mindspore', '.commit_id') |
|
|
|
with open(commit_file, 'w') as f: |
|
|
|
_write_commit_file(f) |
|
|
|
|