File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8989
9090pymupdf_dir = os .path .abspath ( f'{ __file__ } /../..' )
9191
92- sys .path .insert (0 , pymupdf_dir )
92+ sys .path .insert (0 , f' { pymupdf_dir } /src' )
9393import pipcl
9494del sys .path [0 ]
9595
Original file line number Diff line number Diff line change 8989
9090pymupdf_dir = os .path .abspath ( f'{ __file__ } /../..' )
9191
92- sys .path .insert (0 , pymupdf_dir )
92+ sys .path .insert (0 , f' { pymupdf_dir } /src' )
9393import pipcl
9494del sys .path [0 ]
9595
Original file line number Diff line number Diff line change 379379pymupdf_dir_abs = os .path .abspath ( f'{ __file__ } /../..' )
380380
381381try :
382- sys .path .insert (0 , pymupdf_dir_abs )
382+ sys .path .insert (0 , f' { pymupdf_dir_abs } /src' )
383383 import pipcl
384384finally :
385385 del sys .path [0 ]
@@ -1140,13 +1140,9 @@ def get_requires_for_build_wheel(config_settings=None):
11401140 with open (f'{ testdir } /pyproject.toml' , 'w' ) as f :
11411141 f .write (textwrap .dedent ('''
11421142 [build-system]
1143- # We define required packages in setup.py:get_requires_for_build_wheel().
1144- requires = []
1145-
1146- # See pep-517.
1147- #
1148- build-backend = "setup"
1149- backend-path = ["."]
1143+ requires = ['pipcl']
1144+ build-backend = 'setup'
1145+ backend-path = ['.']
11501146 ''' ))
11511147
11521148 shutil .copy2 (f'{ pymupdf_dir_abs } /pipcl.py' , f'{ testdir } /pipcl.py' )
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -44,11 +44,7 @@ def test_codespell():
4444 --ignore-multiline-regex 'codespell:ignore-begin.*codespell:ignore-end'
4545 ''' )
4646
47- sys .path .append (root )
48- try :
49- import pipcl
50- finally :
51- del sys .path [0 ]
47+ import pipcl
5248
5349 git_files = pipcl .git_items (root )
5450
Original file line number Diff line number Diff line change @@ -1082,15 +1082,11 @@ def test_cli_out():
10821082 import platform
10831083 import re
10841084 import subprocess
1085+ import pipcl
10851086 log_prefix = None
10861087 if os .environ .get ('PYMUPDF_USE_EXTRA' ) == '0' :
10871088 log_prefix = f'.+Using non-default setting from PYMUPDF_USE_EXTRA: \' 0\' '
10881089
1089- sys .path .append (os .path .normpath (f'{ __file__ } /../..' ))
1090- try :
1091- import pipcl
1092- finally :
1093- del sys .path [0 ]
10941090 pipcl .show_system ()
10951091 def check (
10961092 expect_out ,
@@ -1482,11 +1478,7 @@ def test_open2():
14821478 # of tests/resources/test_open2_expected.json regardless of the actual
14831479 # checkout directory.
14841480 print ()
1485- sys .path .append (root )
1486- try :
1487- import pipcl
1488- finally :
1489- del sys .path [0 ]
1481+ import pipcl
14901482 paths = pipcl .git_items (f'{ root } /tests/resources' )
14911483 paths = fnmatch .filter (paths , f'test_open2.*' )
14921484 paths = [f'tests/resources/{ i } ' for i in paths ]
Original file line number Diff line number Diff line change @@ -178,11 +178,7 @@ def test_4125():
178178 import psutil
179179
180180 root = os .path .normpath (f'{ __file__ } /../..' )
181- sys .path .insert (0 , root )
182- try :
183- import pipcl
184- finally :
185- del sys .path [0 ]
181+ import pipcl
186182
187183 process = psutil .Process ()
188184
Original file line number Diff line number Diff line change @@ -102,9 +102,7 @@ def test_pylint():
102102
103103 root = os .path .abspath (f'{ __file__ } /../..' )
104104
105- sys .path .insert (0 , root )
106105 import pipcl
107- del sys .path [0 ]
108106
109107 # We want to run pylist on all of our src/*.py files so we find them with
110108 # `pipcl.git_items()`. However this seems to fail on github windows with
Original file line number Diff line number Diff line change 77
88g_root_abs = os .path .normpath (f'{ __file__ } /../../' )
99
10- sys .path .insert (0 , g_root_abs )
10+ sys .path .insert (0 , f' { g_root_abs } /src' )
1111try :
1212 import pipcl
1313 import setup
You can’t perform that action at this time.
0 commit comments