certora-cli-alpha-master 20250911.18.57.988170__py3-none-macosx_10_9_universal2.whl → 20250914.16.54.139374__py3-none-macosx_10_9_universal2.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,6 +15,7 @@
15
15
 
16
16
  from __future__ import annotations
17
17
 
18
+ import subprocess
18
19
  import sys
19
20
  from pathlib import Path
20
21
 
@@ -37,13 +38,13 @@ log = logging.getLogger(__name__)
37
38
 
38
39
  def build_sui_project(context: CertoraContext, timings: Dict) -> None:
39
40
  """
40
- Compile the Rust artefact and record elapsed time in *timings*.
41
+ Compile the Sui artefact and record elapsed time in *timings*.
41
42
 
42
43
  Args:
43
44
  context: The CertoraContext object containing the configuration.
44
45
  timings: A dictionary to store timing information.
45
46
  """
46
- log.debug("Build Rust target")
47
+ log.debug("Build Sui target")
47
48
  start = time.perf_counter()
48
49
  set_sui_build_directory(context)
49
50
  timings["buildTime"] = round(time.perf_counter() - start, 4)
@@ -52,17 +53,60 @@ def build_sui_project(context: CertoraContext, timings: Dict) -> None:
52
53
 
53
54
 
54
55
  def set_sui_build_directory(context: CertoraContext) -> None:
55
- assert context.move_path, "build_sui_project: expecting move_path to link to a build directory"
56
+ sources: Set[Path] = set()
56
57
 
57
- shutil.copytree(context.move_path, Util.get_build_dir() / Path(context.move_path).name)
58
+ # If no move_path was specified, try to build the package
59
+ if not context.move_path:
60
+ move_toml_file = Util.find_file_in_parents("Move.toml")
61
+ if not move_toml_file:
62
+ raise Util.CertoraUserInputError("Could not find Move.toml, and no move_path was specified.")
63
+ sources.add(move_toml_file.absolute())
64
+ run_sui_build(context, move_toml_file.parent)
58
65
 
59
- sources: Set[Path] = set()
66
+ assert context.move_path, "expecting move_path to be set after build"
67
+ move_dir = Path(context.move_path)
68
+ assert move_dir.exists(), f"Output path '{move_dir}' does not exist"
69
+ assert move_dir.is_dir(), f"Output path '{move_dir}' is not a directory"
70
+
71
+ # Add all source files. We get these from the Sui build output, because it includes dependencies as well, and is
72
+ # available even if we didn't run the build ourselves.
73
+ sources.update(move_dir.rglob("*.move"))
74
+
75
+ # Add conf file if it exists
60
76
  if getattr(context, 'conf_file', None) and Path(context.conf_file).exists():
61
77
  sources.add(Path(context.conf_file).absolute())
62
78
 
79
+ # Copy the binary modules and source maps
80
+ shutil.copytree(move_dir,
81
+ Util.get_build_dir() / move_dir.name,
82
+ ignore=shutil.ignore_patterns('*.move'))
83
+
63
84
  try:
64
85
  # Create generators
65
86
  build_source_tree(sources, context)
66
87
 
67
88
  except Exception as e:
68
89
  raise Util.CertoraUserInputError(f"Collecting build files failed with the exception: {e}")
90
+
91
+ def run_sui_build(context: CertoraContext, package_dir: Path) -> None:
92
+ assert not context.move_path, "run_sui_build: expecting move_path to be empty"
93
+
94
+ build_cmd = ["sui", "move", "build", "--test", "--path", str(package_dir)]
95
+
96
+ try:
97
+ build_cmd_text = ' '.join(build_cmd)
98
+ log.info(f"Building by calling `{build_cmd_text}`")
99
+ result = subprocess.run(build_cmd, capture_output=False)
100
+
101
+ # Check if the script executed successfully
102
+ if result.returncode != 0:
103
+ raise Util.CertoraUserInputError(f"Error running `{build_cmd_text}`")
104
+
105
+ context.move_path = str(package_dir / "build")
106
+
107
+ except Util.TestResultsReady as e:
108
+ raise e
109
+ except Util.CertoraUserInputError as e:
110
+ raise e
111
+ except Exception as e:
112
+ raise Util.CertoraUserInputError(f"An unexpected error occurred: {e}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: certora-cli-alpha-master
3
- Version: 20250911.18.57.988170
3
+ Version: 20250914.16.54.139374
4
4
  Summary: Runner for the Certora Prover
5
5
  Home-page: https://pypi.org/project/certora-cli-alpha-master
6
6
  Author: Certora
@@ -39,4 +39,4 @@ Dynamic: requires-dist
39
39
  Dynamic: requires-python
40
40
  Dynamic: summary
41
41
 
42
- Commit dde4991. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
42
+ Commit b6ca649. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
@@ -17,7 +17,7 @@ certora_cli/CertoraProver/certoraBuild.py,sha256=Yn-J7QKxQvtp1uvs03mOfj2w7N_9Xix
17
17
  certora_cli/CertoraProver/certoraBuildCacheManager.py,sha256=YnZmBZ_gCIbLwExgK5oxFlVDQGe4_YuGIpDLMy589E0,13318
18
18
  certora_cli/CertoraProver/certoraBuildDataClasses.py,sha256=hO0w3YK9V9gZsTbh4gxxlnEAaOiubUwfzNEw6uL1HaE,14841
19
19
  certora_cli/CertoraProver/certoraBuildRust.py,sha256=ZPbNp4ttRmzcKhFsgHSiHDRExNPaLOzgxTRqu23o1D0,6061
20
- certora_cli/CertoraProver/certoraBuildSui.py,sha256=oOY6l3JnxYtFl3i3ibEcOp69x0mKsFg4Z86UnVC6CwY,2383
20
+ certora_cli/CertoraProver/certoraBuildSui.py,sha256=zMXD2XnC4oqRDzPcBvSZmVquL3UG5paBZkfUT3JPbYY,4180
21
21
  certora_cli/CertoraProver/certoraCloudIO.py,sha256=99IRWSA4wAF1q_yu7m1IpDlybMVqtupW_C5qa3Xrhs0,54351
22
22
  certora_cli/CertoraProver/certoraCollectConfigurationLayout.py,sha256=Rln6LsqMp-u0H2fAFulTLAn7GW-j3ox2XZSz0ghdjk0,14116
23
23
  certora_cli/CertoraProver/certoraCollectRunMetadata.py,sha256=i31dkYt8kwlX44SHZtV_b8QI1Egi6cbB5-uuh5beYN0,12630
@@ -68,13 +68,13 @@ certora_cli/Shared/certoraLogging.py,sha256=cV2UQMhQ5j8crGXgeq9CEamI-Lk4HgdiA3HC
68
68
  certora_cli/Shared/certoraUtils.py,sha256=buUE95PnbpDEbYEZss_jcP7pWCRJhXnfV-eOA6-zvYM,58407
69
69
  certora_cli/Shared/certoraValidateFuncs.py,sha256=BPLuVsS3yAcYIuCvkXtDuFQKf2qaT74TIddB0lM84yM,42508
70
70
  certora_cli/Shared/proverCommon.py,sha256=uZkl9PDLPj81kKRnBnlPUmvhMZovNP25_74No_7jaQ4,11215
71
- certora_jars/ASTExtraction.jar,sha256=ZP72Jr6BT-JQ9g2M_bPp2O9iMY-a7Jek7uciQXkq808,17623191
72
- certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=R2YjfGuz8R0DhrWs2NzmBUYwFIhJ1AseiXXHATJFRcA,170
73
- certora_jars/Typechecker.jar,sha256=TJGJGaeVPcMKr6zqhNqPGrrWaJ0lI9j4eHj19_SCeeA,17585348
71
+ certora_jars/ASTExtraction.jar,sha256=2uAu_Ro_5nR-lV8aTpAuI4OJxMYwzmr1iE6vlvTmM3o,17623191
72
+ certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=pBH1aVsSx61BhhCRxVk642ByMacGWg0wGZxbddp_m_Y,170
73
+ certora_jars/Typechecker.jar,sha256=ql7Irf3frh0Tl2zGYtPD8vcvCYpuXbipCljUG13nrbE,17585348
74
74
  certora_jars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
75
- certora_cli_alpha_master-20250911.18.57.988170.dist-info/LICENSE,sha256=UGKSKIJSetF8m906JLKqNLkUS2CL60XfQdNvxBvpQXo,620
76
- certora_cli_alpha_master-20250911.18.57.988170.dist-info/METADATA,sha256=c92ZSTydVoYYLeIxfr0iYJbYF8W_KhOUzMHhvdMBI2g,1304
77
- certora_cli_alpha_master-20250911.18.57.988170.dist-info/WHEEL,sha256=9Ig2YBzm5cpS_YWKLeuYxVAxcKv_uDQsCzy9XJbRZ_g,110
78
- certora_cli_alpha_master-20250911.18.57.988170.dist-info/entry_points.txt,sha256=ClZiFkCYDdK25_ufxZvnE2Rx_kNk1_4vj7KpgYUKxGM,509
79
- certora_cli_alpha_master-20250911.18.57.988170.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
80
- certora_cli_alpha_master-20250911.18.57.988170.dist-info/RECORD,,
75
+ certora_cli_alpha_master-20250914.16.54.139374.dist-info/LICENSE,sha256=UGKSKIJSetF8m906JLKqNLkUS2CL60XfQdNvxBvpQXo,620
76
+ certora_cli_alpha_master-20250914.16.54.139374.dist-info/METADATA,sha256=jT5lPyqBaYqzLoRkS2mOmRJMJVMxJJmTOaPfFwYGhe8,1304
77
+ certora_cli_alpha_master-20250914.16.54.139374.dist-info/WHEEL,sha256=9Ig2YBzm5cpS_YWKLeuYxVAxcKv_uDQsCzy9XJbRZ_g,110
78
+ certora_cli_alpha_master-20250914.16.54.139374.dist-info/entry_points.txt,sha256=ClZiFkCYDdK25_ufxZvnE2Rx_kNk1_4vj7KpgYUKxGM,509
79
+ certora_cli_alpha_master-20250914.16.54.139374.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
80
+ certora_cli_alpha_master-20250914.16.54.139374.dist-info/RECORD,,
Binary file
@@ -1 +1 @@
1
- {"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "dde4991", "timestamp": "20250911.18.57.988170", "version": "20250911.18.57.988170+dde4991"}
1
+ {"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "b6ca649", "timestamp": "20250914.16.54.139374", "version": "20250914.16.54.139374+b6ca649"}
Binary file