Skip to content

Commit c80f30d

Browse files
Vipul-Cariappaaaronj0
authored andcommitted
Revert "Install missing dependencies MacOS cppyy jobs (#125)"
This reverts commit bf43358.
1 parent bf43358 commit c80f30d

File tree

6 files changed

+37
-42
lines changed

6 files changed

+37
-42
lines changed

.github/workflows/MacOS.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -439,15 +439,9 @@ jobs:
439439
brew link --overwrite "$pkg"
440440
done
441441
brew upgrade --force
442-
brew install gnu-sed [email protected] boost-python3 eigen psutils
443-
if [[ "$ARCHITECHURE" == "x86_64" ]]; then
444-
CPLUS_INCLUDE_PATH="${CPLUS_INCLUDE_PATH}:/usr/local/opt/[email protected]/include"
445-
CPLUS_INCLUDE_PATH="${CPLUS_INCLUDE_PATH}:/usr/local/opt/Eigen/include"
446-
else
447-
CPLUS_INCLUDE_PATH="${CPLUS_INCLUDE_PATH}:/opt/homebrew/opt/[email protected]/include"
448-
CPLUS_INCLUDE_PATH="${CPLUS_INCLUDE_PATH}:/opt/homebrew/opt/Eigen/include"
449-
fi
450-
echo "CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH" >> $GITHUB_ENV
442+
brew install eigen
443+
brew install boost
444+
brew install gnu-sed
451445
pip install distro pytest
452446
453447
@@ -469,9 +463,9 @@ jobs:
469463
if [[ "${cling_on}" == "ON" ]]; then
470464
CLING_DIR="${{ github.workspace }}/cling"
471465
CLING_BUILD_DIR="${{ github.workspace }}/cling/build"
472-
CPLUS_INCLUDE_PATH="${CPLUS_INCLUDE_PATH}:${CLING_DIR}/tools/cling/include:${CLING_BUILD_DIR}/include:${LLVM_DIR}/llvm/include:${LLVM_DIR}/clang/include:${LLVM_BUILD_DIR}/include:${LLVM_BUILD_DIR}/tools/clang/include:$PWD/include"
466+
CPLUS_INCLUDE_PATH="${CLING_DIR}/tools/cling/include:${CLING_BUILD_DIR}/include:${LLVM_DIR}/llvm/include:${LLVM_DIR}/clang/include:${LLVM_BUILD_DIR}/include:${LLVM_BUILD_DIR}/tools/clang/include:$PWD/include"
473467
else
474-
CPLUS_INCLUDE_PATH="${CPLUS_INCLUDE_PATH}:${LLVM_DIR}/llvm/include:${LLVM_DIR}/clang/include:${LLVM_BUILD_DIR}/include:${LLVM_BUILD_DIR}/tools/clang/include:$PWD/include"
468+
CPLUS_INCLUDE_PATH="${LLVM_DIR}/llvm/include:${LLVM_DIR}/clang/include:${LLVM_BUILD_DIR}/include:${LLVM_BUILD_DIR}/tools/clang/include:$PWD/include"
475469
fi
476470
477471
export CB_PYTHON_DIR="${{ github.workspace }}/cppyy-backend/python"
@@ -575,7 +569,6 @@ jobs:
575569
python -m pip install pytest
576570
python -m pip install pytest-xdist
577571
python -m pip install numba
578-
python -m pip install psutil
579572
echo ::endgroup::
580573
echo ::group::Run complete test suite
581574
set -o pipefail

test/test_boost.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
import py, os, sys
2-
import cppyy
32
from pytest import mark, raises, skip
43
from .support import setup_make, IS_CLANG_REPL, IS_MAC_X86, IS_MAC_ARM
54

6-
noboost = not cppyy.gbl.Cpp.Evaluate("""
7-
#if __has_include("boost/any.hpp")
8-
true
9-
#else
10-
false
11-
#endif
12-
""")
5+
noboost = False
6+
if not (os.path.exists(os.path.join(os.path.sep, 'usr', 'include', 'boost')) or \
7+
os.path.exists(os.path.join(os.path.sep, 'usr', 'local', 'include', 'boost'))):
8+
noboost = True
139

10+
11+
@mark.skipif(noboost == True, reason="boost not found")
1412
class TestBOOSTANY:
1513
def setup_class(cls):
1614
import cppyy
1715

1816
cppyy.include('boost/any.hpp')
1917

18+
@mark.skipif((IS_MAC_ARM or IS_MAC_X86), reason="Fails to include boost on OS X")
2019
def test01_any_class(self):
2120
"""Availability of boost::any"""
2221

@@ -68,6 +67,8 @@ def test02_any_usage(self):
6867
extract = boost.any_cast[std.vector[int]](val)
6968
assert len(extract) == 200
7069

70+
71+
@mark.skipif(((noboost == True) or IS_MAC_ARM or IS_MAC_X86), reason="boost not found")
7172
class TestBOOSTOPERATORS:
7273
def setup_class(cls):
7374
import cppyy
@@ -91,6 +92,8 @@ class Derived : boost::ordered_field_operators<Derived>, boost::ordered_field_op
9192

9293
assert cppyy.gbl.boost_test.Derived
9394

95+
96+
@mark.skipif(noboost == True, reason="boost not found")
9497
class TestBOOSTVARIANT:
9598
def setup_class(cls):
9699
import cppyy
@@ -132,6 +135,7 @@ class C { }; } """)
132135
assert type(boost.get['BV::C'](v[2])) == cpp.BV.C
133136

134137

138+
@mark.skipif(((noboost == True) or IS_MAC_ARM or IS_MAC_X86), reason="boost not found")
135139
class TestBOOSTERASURE:
136140
def setup_class(cls):
137141
import cppyy

test/test_cpp11features.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import py, os, sys
22
from pytest import raises, mark
3-
from .support import setup_make, ispypy, IS_CLANG_REPL, IS_MAC, IS_LINUX_ARM
3+
from .support import setup_make, ispypy, IS_CLANG_REPL, IS_LINUX_ARM
44

55

66
currpath = py.path.local(__file__).dirpath()

test/test_eigen.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
import py, os, sys
2-
import cppyy
32
from pytest import mark, raises
4-
from .support import setup_make, IS_CLANG_REPL, IS_MAC_X86, IS_MAC_ARM
3+
from .support import setup_make, IS_CLANG_REPL, IS_MAC_X86
54

65
inc_paths = [os.path.join(os.path.sep, 'usr', 'include'),
76
os.path.join(os.path.sep, 'usr', 'local', 'include')]
87

9-
noeigen = not cppyy.gbl.Cpp.Evaluate("""
10-
#if __has_include("eigen3/Eigen/Dense")
11-
true
12-
#else
13-
false
14-
#endif
15-
""")
8+
eigen_path = None
9+
for p in inc_paths:
10+
p = os.path.join(p, 'eigen3')
11+
if os.path.exists(p):
12+
eigen_path = p
1613

17-
@mark.skipif(noeigen == True, reason="Eigen not found")
14+
15+
@mark.skipif(eigen_path is None, reason="Eigen not found")
1816
class TestEIGEN:
1917
def setup_class(cls):
2018
import cppyy, warnings
2119

20+
cppyy.add_include_path(eigen_path)
2221
with warnings.catch_warnings():
23-
cppyy.include('eigen3/Eigen/Dense')
22+
warnings.simplefilter('ignore')
23+
cppyy.include('Eigen/Dense')
2424

2525
@mark.xfail
2626
def test01_simple_matrix_and_vector(self):
@@ -148,16 +148,17 @@ def test04_resizing_through_assignment(self):
148148
assert a.size() == 9
149149

150150

151-
@mark.skipif(noeigen == True, reason="Eigen not found")
152-
class TestEIGEN_REGRESSION:
151+
@mark.skipif(eigen_path is None, reason="Eigen not found")
152+
class TestEIGEN_REGRESSIOn:
153153
def setup_class(cls):
154154
import cppyy, warnings
155155

156+
cppyy.add_include_path(eigen_path)
156157
with warnings.catch_warnings():
157158
warnings.simplefilter('ignore')
158-
cppyy.include('eigen3/Eigen/Dense')
159+
cppyy.include('Eigen/Dense')
159160

160-
@mark.xfail(condition=((IS_MAC_ARM) or (IS_MAC_X86 and not IS_CLANG_REPL)), reason="Fails on OS X arm and osx 86 for cling")
161+
@mark.xfail(condition=IS_MAC_X86 and (not IS_CLANG_REPL), reason="Errors out on OS X Cling")
161162
def test01_use_of_Map(self):
162163
"""Use of Map (used to crash)"""
163164

test/test_leakcheck.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import py, os, sys
22
from pytest import mark, skip
3-
from .support import setup_make, pylong, pyunicode, IS_CLANG_REPL, IS_MAC
3+
from .support import setup_make, pylong, pyunicode, IS_CLANG_REPL
44

55
currpath = py.path.local(__file__).dirpath()
66
test_dct = str(currpath.join("datatypesDict"))
@@ -67,7 +67,6 @@ def check_func(self, scope, func, *args, **kwds):
6767
gc.collect()
6868
assert last == self.process.memory_info().rss
6969

70-
@mark.xfail(condition=IS_MAC, reason="Fails on OS X")
7170
def test01_free_functions(self):
7271
"""Leak test of free functions"""
7372

@@ -93,7 +92,6 @@ def test01_free_functions(self):
9392
self.check_func(ns, 'free_f_ret1')
9493
self.check_func(ns, 'free_f_ret1')
9594

96-
@mark.xfail(condition=IS_MAC, reason="Fails on OS X")
9795
def test02_test_static_methods(self):
9896
"""Leak test of static methods"""
9997

@@ -120,7 +118,6 @@ class MyClass02 {
120118
self.check_func(m, 'static_method_ol', 42., tmpl_args='float')
121119
self.check_func(m, 'static_method_ret')
122120

123-
@mark.xfail(condition=IS_MAC, reason="Fails on OS X")
124121
def test03_test_methods(self):
125122
"""Leak test of methods"""
126123

test/test_lowlevel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import py, os, sys
22
from pytest import raises, skip, mark
3-
from .support import setup_make, pylong, pyunicode, IS_WINDOWS, ispypy, IS_CLANG_REPL, IS_MAC, IS_MAC_X86
3+
from .support import setup_make, pylong, pyunicode, IS_WINDOWS, ispypy, IS_CLANG_REPL, IS_MAC
44

55
currpath = py.path.local(__file__).dirpath()
66
test_dct = str(currpath.join("datatypesDict"))
@@ -484,7 +484,7 @@ def test14_templated_arrays(self):
484484
assert cppyy.gbl.std.vector[cppyy.gbl.std.vector[int]].value_type == 'std::vector<int>'
485485
assert cppyy.gbl.std.vector['int[1]'].value_type == 'int[1]'
486486

487-
@mark.xfail(run=not (IS_MAC_X86 and not IS_CLANG_REPL), reason="Crashes on OSX-X86 Cling")
487+
@mark.xfail
488488
def test15_templated_arrays_gmpxx(self):
489489
"""Use of gmpxx array types in templates"""
490490

0 commit comments

Comments
 (0)