File tree 1 file changed +11
-7
lines changed
1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 3
3
import argparse
4
4
import pathlib
5
5
import shutil
6
+ import sysconfig
6
7
7
8
from setuplib import gen
8
9
@@ -20,17 +21,20 @@ def main():
20
21
gen + "/pygame_sdl2.display_api.h" ,
21
22
]
22
23
24
+ targets = [
25
+ pathlib .Path (args .target ) / "include" / "pygame_sdl2" ,
26
+ pathlib .Path (args .target ) / "include" / ("python" + sysconfig .get_config_var ("py_version_short" )) / "pygame_sdl2" ,
27
+ ]
23
28
29
+ for target in targets :
24
30
25
- headers_dir = pathlib . Path ( args . target ) / "pygame_sdl2"
31
+ target . mkdir ( exist_ok = True , parents = True )
26
32
27
- headers_dir .mkdir (exist_ok = True )
33
+ for header in headers :
34
+ srcpath = pathlib .Path (header )
35
+ dstpath = target / srcpath .name
28
36
29
- for header in headers :
30
- srcpath = pathlib .Path (header )
31
- dstpath = headers_dir / srcpath .name
32
-
33
- shutil .copy (srcpath , dstpath )
37
+ shutil .copy (srcpath , dstpath )
34
38
35
39
if __name__ == "__main__" :
36
40
main ()
You can’t perform that action at this time.
0 commit comments