From 3a20dd4d705ef3699c441bde95fa00a9917d55b5 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Sat, 9 Jul 2022 11:00:10 -0400 Subject: [PATCH] Fix inclusion of siplib and sip.h in sdist with sip 6.6.2 Since these files are no longer tracked in git, they need to be explicitly included in the sdist. Fixes #2207. --- build.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/build.py b/build.py index 60e7359f..530d8752 100755 --- a/build.py +++ b/build.py @@ -2157,10 +2157,16 @@ def cmd_sdist(options, args): # copy Phoenix's generated code into the archive tree msg('Copying generated files...') - for srcdir in ['cpp', 'gen']: + os.mkdir(posixjoin(PDEST, 'sip', 'siplib')) + for srcdir in ['cpp', 'gen', 'siplib']: destdir = posixjoin(PDEST, 'sip', srcdir) for name in glob.glob(posixjoin('sip', srcdir, '*')): - copyFile(name, destdir) + try: + copyFile(name, destdir) + except IsADirectoryError: + pass + sip_h_dir = posixjoin(cfg.PKGDIR, 'include', 'wxPython') + copyFile(posixjoin(sip_h_dir, 'sip.h'), posixjoin(PDEST, sip_h_dir)) for wc in ['*.py', '*.pi', '*.pyi']: destdir = posixjoin(PDEST, cfg.PKGDIR) for name in glob.glob(posixjoin(cfg.PKGDIR, wc)):