|
14 | 14 |
|
15 | 15 | import os
|
16 | 16 | import os.path as osp
|
| 17 | +from pathlib import Path |
17 | 18 | import re
|
18 | 19 | import subprocess
|
19 | 20 | import shutil
|
@@ -41,7 +42,8 @@ def get_drives():
|
41 | 42 |
|
42 | 43 | def get_nsis_exe():
|
43 | 44 | """Return NSIS executable"""
|
44 |
| - localdir = osp.join(sys.prefix, os.pardir, os.pardir) |
| 45 | + # localdir = osp.join(sys.prefix, os.pardir, os.pardir) |
| 46 | + localdir = str(Path(sys.prefix).parent.parent) |
45 | 47 | for drive in get_drives():
|
46 | 48 | for dirname in (
|
47 | 49 | r'C:\Program Files',
|
@@ -71,7 +73,8 @@ def get_nsis_exe():
|
71 | 73 |
|
72 | 74 | def get_iscc_exe():
|
73 | 75 | """Return ISCC executable"""
|
74 |
| - localdir = osp.join(sys.prefix, os.pardir, os.pardir) |
| 76 | + # localdir = osp.join(sys.prefix, os.pardir, os.pardir) |
| 77 | + localdir = str(Path(sys.prefix).parent.parent) |
75 | 78 | for drive in get_drives():
|
76 | 79 | for dirname in (
|
77 | 80 | r'C:\Program Files',
|
@@ -101,7 +104,8 @@ def get_iscc_exe():
|
101 | 104 |
|
102 | 105 | def get_7zip_exe():
|
103 | 106 | """Return 7zip executable"""
|
104 |
| - localdir = osp.join(sys.prefix, os.pardir, os.pardir) |
| 107 | + # localdir = osp.join(sys.prefix, os.pardir, os.pardir) |
| 108 | + localdir = str(Path(sys.prefix).parent.parent) |
105 | 109 | for drive in get_drives():
|
106 | 110 | for dirname in (
|
107 | 111 | r'C:\Program Files',
|
@@ -2198,16 +2202,20 @@ def make(
|
2198 | 2202 | self.python_fullversion,
|
2199 | 2203 | self.build_number,
|
2200 | 2204 | )
|
2201 |
| - fname = osp.join( |
2202 |
| - self.winpydir, |
2203 |
| - os.pardir, |
2204 |
| - 'WinPython%s-%sbit-%s.md' |
2205 |
| - % ( |
2206 |
| - self.flavor, |
2207 |
| - self.distribution.architecture, |
2208 |
| - self.winpyver2, |
2209 |
| - ), |
2210 |
| - ) |
| 2205 | + #fname = osp.join( |
| 2206 | + # self.winpydir, |
| 2207 | + # os.pardir, |
| 2208 | + # 'WinPython%s-%sbit-%s.md' |
| 2209 | + # % ( |
| 2210 | + # self.flavor, |
| 2211 | + # self.distribution.architecture, |
| 2212 | + # self.winpyver2, |
| 2213 | + # ), |
| 2214 | + #) |
| 2215 | + fname = str(Path(self.winpydir).parent / ( |
| 2216 | + f'WinPython{self.flavor}-' + |
| 2217 | + f'-{self.distribution.architecture}bit-'+ |
| 2218 | + f'{self.winpyver2}.md')) |
2211 | 2219 | open(fname, 'w').write(self.package_index_wiki)
|
2212 | 2220 | # Copy to winpython/changelogs
|
2213 | 2221 | shutil.copyfile(
|
|
0 commit comments