Skip to content

Commit 6b868b2

Browse files
committed
Update win32 build for conf.py change
1 parent 5bef61c commit 6b868b2

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ order_by_type = True
2626
use_parentheses = True
2727
indent = 4
2828
include_trailing_comma = True
29-
skip = bin/meld
29+
skip = bin/meld, setup_win32.py

setup_win32.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22

33
import glob
44
import os.path
5+
import pathlib
56
import platform
67
import sys
78
import sysconfig
89

910
from cx_Freeze import Executable, setup
1011

11-
import meld.build_helpers
12-
import meld.conf
13-
1412

1513
def get_non_python_libs():
1614
"""Returns list of tuples containing extra dependencies required to run
@@ -125,6 +123,18 @@ def get_non_python_libs():
125123
"shortcutDir": "ProgramMenuFolder",
126124
})
127125

126+
# Copy conf.py in place if necessary
127+
base_path = pathlib.Path(__file__).parent
128+
conf_path = base_path / 'meld' / 'conf.py'
129+
130+
if not conf_path.exists():
131+
import shutil
132+
shutil.copyfile(conf_path.with_suffix('.py.in'), conf_path)
133+
134+
import meld.build_helpers # noqa: E402
135+
import meld.conf # noqa: E402
136+
137+
128138
setup(
129139
name="Meld",
130140
version=meld.conf.__version__,

0 commit comments

Comments
 (0)