Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0c4d947

Browse files
committed
Replaced addpack by handcrafted code to find the bgen stuff.
1 parent b36b830 commit 0c4d947

27 files changed

Lines changed: 68 additions & 64 deletions

Mac/Modules/ae/aescan.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
# Scan AppleEvents.h header file, generate aegen.py and AppleEvents.py files.
22
# Then run aesupport to generate AEmodule.c.
3-
0# (Should learn how to tell the compiler to compile it as well.)
3+
# (Should learn how to tell the compiler to compile it as well.)
44

5-
import addpack
6-
addpack.addpack(':Tools:bgen:bgen')
75
import sys
86
import os
97
import string
108
import regex
119
import regsub
1210
import MacOS
11+
12+
BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
13+
sys.path.append(BGENDIR)
1314
from bgenlocations import TOOLBOXDIR
1415

1516
from scantools import Scanner

Mac/Modules/ae/aesupport.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# It execs the file aegen.py which contain the function definitions
44
# (aegen.py was generated by aescan.py, scanning the <AppleEvents.h> header file).
55

6-
import addpack
7-
addpack.addpack(':Tools:bgen:bgen')
86

97
from macsupport import *
108

Mac/Modules/ae/nsremote.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,8 @@
1111
# be nicer to use the more "object oriented" standard OSA stuff, when it
1212
# is implemented in Netscape.
1313
#
14-
import addpack
1514
import sys
1615

17-
addpack.addpack('Tools')
18-
addpack.addpack('bgen')
19-
addpack.addpack('ae')
20-
2116
import aetools
2217
import Standard_Suite
2318
import WWW_Suite

Mac/Modules/cm/cmscan.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Scan an Apple header file, generating a Python file of generator calls.
22

3-
import addpack
4-
addpack.addpack(':tools:bgen:bgen')
3+
import sys
4+
import os
5+
BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
6+
sys.path.append(BGENDIR)
57
from scantools import Scanner
68
from bgenlocations import TOOLBOXDIR
79

Mac/Modules/ctl/ctlscan.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Scan <Controls.h>, generating ctlgen.py.
2-
import addpack
3-
addpack.addpack(':Tools:bgen:bgen')
2+
import sys
3+
import os
4+
BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
5+
sys.path.append(BGENDIR)
46

57
from scantools import Scanner
68
from bgenlocations import TOOLBOXDIR

Mac/Modules/ctl/ctlsupport.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55

66
import string
77

8-
import addpack
9-
addpack.addpack(':Tools:bgen:bgen')
10-
118
# Declarations that change for each manager
129
MACHEADERFILE = 'Controls.h' # The Apple header file
1310
MODNAME = 'Ctl' # The name of the module

Mac/Modules/dlg/dlgscan.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Scan an Apple header file, generating a Python file of generator calls.
22

3-
import addpack
4-
addpack.addpack(':Tools:bgen:bgen')
3+
import sys
4+
import os
5+
BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
6+
sys.path.append(BGENDIR)
57

68
from scantools import Scanner
79
from bgenlocations import TOOLBOXDIR

Mac/Modules/dlg/dlgsupport.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
# It execs the file dlggen.py which contain the function definitions
44
# (dlggen.py was generated by dlgscan.py, scanning the <Dialogs.h> header file).
55

6-
import addpack
7-
addpack.addpack(':Tools:bgen:bgen')
8-
96
from macsupport import *
107

118
# Create the type objects

Mac/Modules/evt/evtscan.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Scan an Apple header file, generating a Python file of generator calls.
22

3-
import addpack
4-
addpack.addpack(':tools:bgen:bgen')
3+
import sys
4+
import os
5+
BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
6+
sys.path.append(BGENDIR)
57
from scantools import Scanner
68
from bgenlocations import TOOLBOXDIR
79

Mac/Modules/fm/fmscan.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Scan an Apple header file, generating a Python file of generator calls.
22

3-
import addpack
4-
addpack.addpack(':tools:bgen:bgen')
3+
import sys
4+
import os
5+
BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
6+
sys.path.append(BGENDIR)
57
from scantools import Scanner
68
from bgenlocations import TOOLBOXDIR
79

0 commit comments

Comments
 (0)