mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-01-27 18:20:05 +00:00
* Make sure tests are not making external calls and pass url with scheme to urllib3 to avoid warnings * Make sure unit tests not rely on filesystem state * Bump pyright and "solve" reported "issues" Most of them are related to partially unknown types of values from empty dict or list. To solve it for the empty dict we use `EMPTY_DICT` object of newly introduced `_FrozenDict` class. * Improve unit-tests code coverage * Add release notes for 3.3.0 * Bump version * Fix pyinstaller spec file * python 3.6 compatibility --------- Co-authored-by: Polina Bungina <27892524+hughcapet@users.noreply.github.com>
47 lines
1.0 KiB
Python
47 lines
1.0 KiB
Python
# -*- mode: python -*-
|
|
|
|
block_cipher = None
|
|
|
|
|
|
def hiddenimports():
|
|
import sys
|
|
sys.path.insert(0, '.')
|
|
try:
|
|
import patroni.dcs
|
|
return patroni.dcs.dcs_modules() + ['http.server']
|
|
finally:
|
|
sys.path.pop(0)
|
|
|
|
|
|
def resources():
|
|
import os
|
|
res_dir = 'patroni/postgresql/available_parameters/'
|
|
exts = set(f.split('.')[-1] for f in os.listdir(res_dir))
|
|
return [(res_dir + '*.' + e, res_dir) for e in exts if e.lower() in {'yml', 'yaml'}]
|
|
|
|
|
|
a = Analysis(['patroni/__main__.py'],
|
|
pathex=[],
|
|
binaries=None,
|
|
datas=resources(),
|
|
hiddenimports=hiddenimports(),
|
|
hookspath=[],
|
|
runtime_hooks=[],
|
|
excludes=[],
|
|
win_no_prefer_redirects=False,
|
|
win_private_assemblies=False,
|
|
cipher=block_cipher)
|
|
|
|
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
|
|
|
|
exe = EXE(pyz,
|
|
a.scripts,
|
|
a.binaries,
|
|
a.zipfiles,
|
|
a.datas,
|
|
name='patroni',
|
|
debug=False,
|
|
strip=False,
|
|
upx=True,
|
|
console=True)
|