Skip to content

Commit 80cf190

Browse files
steve-seregon
authored andcommitted
Pin build dependencies versions in test_standalone
1 parent e5af38a commit 80cf190

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# constraints for the pkgs installed in test_standalone.txt
2+
setuptools==80.9.0
3+
setuptools-scm==8.3.1
4+
wheel==0.45.1

graalpython/com.oracle.graal.python.test/src/tests/standalone/test_standalone.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,21 @@
4444
from tests.standalone import util
4545

4646
is_enabled = 'ENABLE_STANDALONE_UNITTESTS' in os.environ and os.environ['ENABLE_STANDALONE_UNITTESTS'] == "true"
47+
constraints_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'constraints.txt')
48+
49+
def create_test_env():
50+
env = os.environ.copy()
51+
env["MVN_GRAALPY_VERSION"] = util.get_graalvm_version()
52+
env["PIP_CONSTRAINT"] = constraints_file
53+
return env
4754

4855
@unittest.skipUnless(is_enabled, "ENABLE_STANDALONE_UNITTESTS is not true")
4956
def test_native_executable_one_file():
5057
graalpy = util.get_gp()
5158
if graalpy is None:
5259
return
53-
env = os.environ.copy()
54-
env["MVN_GRAALPY_VERSION"] = util.get_graalvm_version()
5560

61+
env = create_test_env()
5662
with tempfile.TemporaryDirectory() as tmpdir:
5763

5864
source_file = os.path.join(tmpdir, "hello.py")
@@ -80,9 +86,8 @@ def test_native_executable_venv_and_one_file():
8086
graalpy = util.get_gp()
8187
if graalpy is None:
8288
return
83-
env = os.environ.copy()
84-
env["MVN_GRAALPY_VERSION"] = util.get_graalvm_version()
8589

90+
env = create_test_env()
8691
with tempfile.TemporaryDirectory() as target_dir:
8792
source_file = os.path.join(target_dir, "hello.py")
8893
with open(source_file, 'w') as f:
@@ -123,9 +128,8 @@ def test_native_executable_module():
123128
graalpy = util.get_gp()
124129
if graalpy is None:
125130
return
126-
env = os.environ.copy()
127-
env["MVN_GRAALPY_VERSION"] = util.get_graalvm_version()
128131

132+
env = create_test_env()
129133
with tempfile.TemporaryDirectory() as tmp_dir:
130134

131135
module_dir = os.path.join(tmp_dir, "hello_app")

0 commit comments

Comments
 (0)