PySMT 0.9.7.dev485__py2.py3-none-any.whl → 0.9.7.dev489__py2.py3-none-any.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.
pysmt/__init__.py CHANGED
@@ -19,7 +19,7 @@
19
19
  from typing import Tuple, Union
20
20
 
21
21
 
22
- VERSION: Union[Tuple[int, int, int], Tuple[int, int, int, str, int]] = (0, 9, 7, "dev", 485)
22
+ VERSION: Union[Tuple[int, int, int], Tuple[int, int, int, str, int]] = (0, 9, 7, "dev", 489)
23
23
 
24
24
  # Try to provide human-readable version of latest commit for dev versions
25
25
  # E.g. v0.5.1-4-g49a49f2-wip
pysmt/cmd/install.py CHANGED
@@ -41,8 +41,8 @@ INSTALLERS = [
41
41
  Installer(BtorInstaller, "3.2.3", {}),
42
42
  Installer(PicoSATInstaller, "965",
43
43
  {"pypicosat_minor_version" : "1708010052"}),
44
- Installer(CuddInstaller, "2.0.3",
45
- {"git_version" : "0dabef26859b15710fd92e68e4eb6cf922a09de9"}),
44
+ Installer(CuddInstaller, "3.0.1",
45
+ {"git_version" : "b87421c596a1bc2cafeb10ec40fcceacc952eda2"}),
46
46
  Installer(OptiMSatInstaller, "1.7.5", {})
47
47
  ]
48
48
 
@@ -197,8 +197,9 @@ class SolverInstaller(object):
197
197
  if sys.executable:
198
198
  interpreter = sys.executable
199
199
 
200
- cmd = '{interpreter} {script}'.format(interpreter=interpreter,
201
- script=script)
200
+ if isinstance(script, str):
201
+ script = script.split()
202
+ cmd = [interpreter] + script
202
203
  return SolverInstaller.run(cmd, directory=directory,
203
204
  env_variables=env_variables,
204
205
  get_output=get_output)
@@ -296,7 +297,7 @@ class SolverInstaller(object):
296
297
  env[k] = bindings_dir
297
298
 
298
299
  try:
299
- output = self.run_python("%s %s" % (check_version_script, package),
300
+ output = self.run_python([check_version_script, package],
300
301
  env_variables=env,
301
302
  get_output=True)
302
303
  output = output.strip()
@@ -11,8 +11,6 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- import os
15
-
16
14
  from pysmt.cmd.installers.base import SolverInstaller
17
15
 
18
16
 
@@ -34,22 +32,11 @@ class CuddInstaller(SolverInstaller):
34
32
 
35
33
 
36
34
  def compile(self):
37
- # Select the correct Makefile to be used
38
- makefile = "Makefile"
39
- if self.architecture == "x86_64":
40
- makefile = "Makefile_64bit"
41
-
42
- import sysconfig
43
- PYTHON_INCLUDE_DIR = sysconfig.get_path("include")
44
- SolverInstaller.run("make -C %s -f %s PYTHON_INCL=-I%s" %
45
- (self.extract_path, makefile, PYTHON_INCLUDE_DIR))
46
-
47
-
48
- def move(self):
49
- SolverInstaller.mv(os.path.join(self.extract_path, "repycudd.py"),
50
- self.bindings_dir)
51
- SolverInstaller.mv(os.path.join(self.extract_path, "_repycudd.so"),
52
- self.bindings_dir)
35
+ # repycudd's own build fetches SWIG from PyPI and compiles CUDD into
36
+ # the extension, so this is the same on every OS.
37
+ SolverInstaller.run_python(["-m", "pip", "install", "--no-deps",
38
+ "--upgrade", "--target", self.bindings_dir,
39
+ self.extract_path])
53
40
 
54
41
 
55
42
  def get_installed_version(self):
@@ -79,7 +79,7 @@ class BtorInstaller(SolverInstaller):
79
79
  f.write(CYTHON_PATCH.encode())
80
80
  f.flush()
81
81
  f.seek(0)
82
- SolverInstaller.run("patch src/api/python/pyboolector.pyx -i %s" % f.name,
82
+ SolverInstaller.run(["patch", "src/api/python/pyboolector.pyx", "-i", f.name],
83
83
  directory=self.extract_path)
84
84
 
85
85
  # Build lingeling
@@ -35,7 +35,7 @@ class CVC5Installer(SolverInstaller):
35
35
  pass
36
36
 
37
37
  def compile(self):
38
- SolverInstaller.run_python("-m pip install --upgrade --target=%s cvc5==%s" % (self.bindings_dir, self.solver_version))
38
+ SolverInstaller.run_python(["-m", "pip", "install", "--upgrade", "--target", self.bindings_dir, "cvc5==%s" % self.solver_version])
39
39
 
40
40
  def get_installed_version(self):
41
41
  return self.get_installed_version_script(self.bindings_dir, "cvc5")
@@ -114,8 +114,7 @@ class MSatInstaller(SolverInstaller):
114
114
  soname = glob.glob(self.bindings_dir + "/_mathsat*.so")[0]
115
115
  old_path = "/Users/alb/src/release/build/libmathsat.dylib"
116
116
  new_path = "%s/libmathsat.dylib" % self.bindings_dir
117
- SolverInstaller.run("install_name_tool -change %s %s %s" %
118
- (old_path, new_path, soname))
117
+ SolverInstaller.run(["install_name_tool", "-change", old_path, new_path, soname])
119
118
 
120
119
 
121
120
  def get_installed_version(self):
@@ -44,15 +44,15 @@ class YicesInstaller(SolverInstaller):
44
44
 
45
45
  SolverInstaller.run("autoconf", directory=self.extract_path)
46
46
 
47
- SolverInstaller.run("bash configure --prefix %s" % self.yices_path,
47
+ SolverInstaller.run(["bash", "configure", "--prefix", self.yices_path],
48
48
  directory=self.extract_path)
49
49
  SolverInstaller.run("make", directory=self.extract_path)
50
50
  SolverInstaller.run("make install", directory=self.extract_path)
51
51
 
52
52
  if self.yices_api_version is None:
53
- SolverInstaller.run_python("-m pip install --upgrade --target=%s yices" % self.bindings_dir)
53
+ SolverInstaller.run_python(["-m", "pip", "install", "--upgrade", "--target", self.bindings_dir, "yices"])
54
54
  else:
55
- SolverInstaller.run_python("-m pip install --upgrade --target=%s yices==%s" % (self.bindings_dir, self.yices_api_version))
55
+ SolverInstaller.run_python(["-m", "pip", "install", "--upgrade", "--target", self.bindings_dir, "yices==%s" % self.yices_api_version])
56
56
 
57
57
  libdir = os.path.join(self.yices_path, "lib")
58
58
  yices_api_file = os.path.join(self.bindings_dir, "yices_api.py")
@@ -32,7 +32,7 @@ class Z3Installer(SolverInstaller):
32
32
  mirror_link=mirror_link)
33
33
 
34
34
  def compile(self):
35
- SolverInstaller.run_python("-m pip install --upgrade --target=%s z3-solver==%s" % (self.bindings_dir, self.solver_version))
35
+ SolverInstaller.run_python(["-m", "pip", "install", "--upgrade", "--target", self.bindings_dir, "z3-solver==%s" % self.solver_version])
36
36
 
37
37
  def get_installed_version(self):
38
38
  return self.get_installed_version_script(self.bindings_dir, "z3")
@@ -0,0 +1,22 @@
1
+ import os
2
+ import tempfile
3
+
4
+ from pysmt.cmd.installers.base import SolverInstaller
5
+ from pysmt.test import TestCase, main
6
+
7
+
8
+ class TestInstallers(TestCase):
9
+
10
+ def test_run_python_path_with_space(self):
11
+ with tempfile.TemporaryDirectory() as tmp:
12
+ script = os.path.join(tmp, "with space", "echo.py")
13
+ os.makedirs(os.path.dirname(script))
14
+ with open(script, "w") as f:
15
+ f.write("import sys; print(sys.argv[1])")
16
+ arg = os.path.join(tmp, "another dir")
17
+ out = SolverInstaller.run_python([script, arg], get_output=True)
18
+ self.assertEqual(out.strip(), arg)
19
+
20
+
21
+ if __name__ == "__main__":
22
+ main()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PySMT
3
- Version: 0.9.7.dev485
3
+ Version: 0.9.7.dev489
4
4
  Summary: A solver-agnostic library for SMT Formulae manipulation and solving
5
5
  Home-page: http://www.pysmt.org
6
6
  Author: PySMT Team
@@ -8,12 +8,14 @@ Author-email: info@pysmt.org
8
8
  License: APACHE
9
9
  License-File: LICENSE
10
10
  License-File: NOTICE
11
+ Requires-Dist: setuptools
11
12
  Dynamic: author
12
13
  Dynamic: author-email
13
14
  Dynamic: description
14
15
  Dynamic: home-page
15
16
  Dynamic: license
16
17
  Dynamic: license-file
18
+ Dynamic: requires-dist
17
19
  Dynamic: summary
18
20
 
19
21
  ============================================================
@@ -1,4 +1,4 @@
1
- pysmt/__init__.py,sha256=-1nhsqf1cDJwZGajwhlm8vA59g3l6eLyADmCUslgp7k,1701
1
+ pysmt/__init__.py,sha256=5bkWQvoNDZsOlGJZABNYsf-aLMybC2XXRHF8FQ3MxlM,1701
2
2
  pysmt/__main__.py,sha256=rR-MV1QtLYqtVoJyY3m5B5Iz-lua0-5o6YSB0W4lKy8,1085
3
3
  pysmt/configuration.py,sha256=Iq_46QZ9z_jpBMk76euJWTqGEwHad2qyiEDPix5sXsA,4538
4
4
  pysmt/constants.py,sha256=pulb6NvROY_X8BePeyyX8T9MJLB79HZ_1FUYSlZ7Jfg,5769
@@ -22,19 +22,19 @@ pysmt/typing.py,sha256=aI8ZKEin4J2XLAHsY5fW1Pt4hZvlBlArxM4nrrmBas4,19550
22
22
  pysmt/utils.py,sha256=_dSgl45k-u9cMXSyR672GBJcKMKdtl6xSTjqXKTSfcs,2906
23
23
  pysmt/cmd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
24
  pysmt/cmd/check_version.py,sha256=DCS6pHVuQm9J_vfSSDDGxtvrV6P1mEhQK-IUjacDh3s,2895
25
- pysmt/cmd/install.py,sha256=-PT8N0nbl9fkd0LLQ1LMdHy1szzsGVimGdmuogH3xcc,10467
25
+ pysmt/cmd/install.py,sha256=kV6Dsn4mZfmo17iPr-cmXNTCDzseG8dXWfaawkAj6lg,10467
26
26
  pysmt/cmd/shell.py,sha256=1H5NJ9St879-U3EDizq_5l34vKPUJr-wi3MyBy164Sc,6594
27
27
  pysmt/cmd/installers/__init__.py,sha256=fEAD4FUh0Hjv7u-o9dc5nYMjzPUAzR8bWo8DSgUQjq4,1438
28
- pysmt/cmd/installers/base.py,sha256=agHbXV4ILfW2my8bjFLoRPmK9Jq8fPz9aESPGbPLu-g,13201
29
- pysmt/cmd/installers/bdd.py,sha256=IfTSdsFYhgefb0fapbwOeyNbjkrWzgBVH6M5NvOz4qM,2190
30
- pysmt/cmd/installers/btor.py,sha256=gUl_urKcWtbSYS_Vde_O7RJM0H-kRqh6hceTju-Sbcs,4995
31
- pysmt/cmd/installers/cvcfive.py,sha256=vWqAm5xF7IMY0JWEeyx3_ochCqyHx0dlcZBo9QcQ-uk,1460
28
+ pysmt/cmd/installers/base.py,sha256=CKs_qq64_TE0a244L4TjWGTau9MQqfuzn2IMO1XXAe8,13168
29
+ pysmt/cmd/installers/bdd.py,sha256=99NWkS4_Kb2JNiT-Cu-4kz2JTonRkVeCB-fSAaYEp00,1867
30
+ pysmt/cmd/installers/btor.py,sha256=wHTyJzUVEmvSCjmZqjftRtQGeOxKc4S2AuJqdWEwfX4,4999
31
+ pysmt/cmd/installers/cvcfive.py,sha256=k2zJGIlFDrx_9yeqKfdHph6HTmTr3OxYjUpqTy_44yA,1472
32
32
  pysmt/cmd/installers/cvcfour.py,sha256=uBZkKIX4gZEMfjrhrparUSDydMcvGIGZM2Y8JYD0GzE,3916
33
- pysmt/cmd/installers/msat.py,sha256=PnHNSbMLB99SPCkv2cuK8LyWweJVa7cOOcGvsFTgzsU,5547
33
+ pysmt/cmd/installers/msat.py,sha256=cL2xMn0UOrV7rAlI2Tsx-MqEiurpM1LJjZYL8utQT4I,5508
34
34
  pysmt/cmd/installers/optimsat.py,sha256=E9W0mKtMdV_LsaywEM-baVzj_T70sNclqiFucqzWYCU,4359
35
35
  pysmt/cmd/installers/pico.py,sha256=U4sXr1oj4BJJpO5H7vB8WqJ6OEPazpYkmmXP1XWhvys,3027
36
- pysmt/cmd/installers/yices.py,sha256=M99P641jqGtAWOgQpAQzt4T1KwmSClw1VDEETzsSZe0,3010
37
- pysmt/cmd/installers/z3.py,sha256=5wP6O-a602-y1cuEyr22bkdWnOWHx8bIaPQ24xDtxX8,1386
36
+ pysmt/cmd/installers/yices.py,sha256=smnsD6LVeuAV2EkvUFoKCQK_JSHnes4g4r1bxTRurOw,3039
37
+ pysmt/cmd/installers/z3.py,sha256=28PtWI27tvoQsfwe97wDb9-0RmdQA2bvJ-wAcy7P51E,1398
38
38
  pysmt/optimization/__init__.py,sha256=JXBHtcb4Lv-Sb8whc9JuGbRH2EBLWwtLUh3PL9HhNE8,650
39
39
  pysmt/optimization/goal.py,sha256=b6--z8gi-vyDjYSVNYIy9fiYhLXz51EPv5jxP64H_oI,10128
40
40
  pysmt/optimization/msat.py,sha256=yj5-vqxQFJnK3zjVlYpxemZ2BWG-6IrCTDKvjl94xNY,937
@@ -89,6 +89,7 @@ pysmt/test/test_euf.py,sha256=B0VRx1NwfKZZIG5Fc6gYPj7G6gNWMzYJvgbh-2q2E28,3455
89
89
  pysmt/test/test_formula.py,sha256=nd550r7dBRHvoNKedCCdKfmV0WD4oMfjZekfAtk7GSg,40493
90
90
  pysmt/test/test_hr_parsing.py,sha256=bi-iTu7y1C7diMcWsQ7EI40MipDbzTKbMGPnLWX85A8,3118
91
91
  pysmt/test/test_imports.py,sha256=f41EUBrlDItgQ_6SPhWW8-tuwMrdMFXHJzaxrHHB43Q,1583
92
+ pysmt/test/test_installers.py,sha256=0eaaHk-DhdR47jCL-qT0Jb80iKrar8TWzTWhfOfByuU,679
92
93
  pysmt/test/test_int.py,sha256=dk72Q6viqRUs9XiPB40n6RrwiqsV6GbbKuSlYaQMU9k,1980
93
94
  pysmt/test/test_interpolation.py,sha256=WTodZtnxH5slIvUWbHbjjnI2o0naXgZwZawTGhh3E0o,3941
94
95
  pysmt/test/test_lira.py,sha256=o8z7Bcb9zH2ptC7oYTueAJB05a-SINh2a__UNUUP610,5006
@@ -144,10 +145,10 @@ pysmt/walkers/dag.py,sha256=hw9qUfadQTpihX685YQobfxKv9XA84ffiA8XRMUQEfU,5694
144
145
  pysmt/walkers/generic.py,sha256=2oMr_MDr7FswSlyx2ulbJ9ke5FsTCKABURnCsMeg4fc,5093
145
146
  pysmt/walkers/identitydag.py,sha256=EAxSneEW91Z8GphlkbMPsPdlac7_FDcVj-_6_aunU2s,10902
146
147
  pysmt/walkers/tree.py,sha256=1vquhaChRMSG_pvbz16wqKOFnsQAkzLvjh_xbB3dg5c,2730
147
- pysmt-0.9.7.dev485.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
148
- pysmt-0.9.7.dev485.dist-info/licenses/NOTICE,sha256=Ns-Jsa6nbqZUiTEEAM6HqioSZIxQ2RCJzxoBlWQaUfc,601
149
- pysmt-0.9.7.dev485.dist-info/METADATA,sha256=oY0W4dADbjmGgO9xwljRC_pXSAXQq1KmOeH4xAjXQk4,1774
150
- pysmt-0.9.7.dev485.dist-info/WHEEL,sha256=4YBfCYNH4wlLpv3pzq1hbEuIlXA4WJabKLFurZ7eTL0,109
151
- pysmt-0.9.7.dev485.dist-info/entry_points.txt,sha256=gDc1XM0xTJJMDGC_nXd0kfbX-Omjke9Dn9F3awMLYIU,57
152
- pysmt-0.9.7.dev485.dist-info/top_level.txt,sha256=NwHQbpTaZMEvjIUdC0bvvj-WUyULe-nt-opK3YQNRMk,6
153
- pysmt-0.9.7.dev485.dist-info/RECORD,,
148
+ pysmt-0.9.7.dev489.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
149
+ pysmt-0.9.7.dev489.dist-info/licenses/NOTICE,sha256=Ns-Jsa6nbqZUiTEEAM6HqioSZIxQ2RCJzxoBlWQaUfc,601
150
+ pysmt-0.9.7.dev489.dist-info/METADATA,sha256=bf2QML6n9GZtd1mZvinmKFJTSZTj1fH9wmxG7dOa6Cw,1823
151
+ pysmt-0.9.7.dev489.dist-info/WHEEL,sha256=4YBfCYNH4wlLpv3pzq1hbEuIlXA4WJabKLFurZ7eTL0,109
152
+ pysmt-0.9.7.dev489.dist-info/entry_points.txt,sha256=gDc1XM0xTJJMDGC_nXd0kfbX-Omjke9Dn9F3awMLYIU,57
153
+ pysmt-0.9.7.dev489.dist-info/top_level.txt,sha256=NwHQbpTaZMEvjIUdC0bvvj-WUyULe-nt-opK3YQNRMk,6
154
+ pysmt-0.9.7.dev489.dist-info/RECORD,,