comparison setup.py @ 46363:d6cfe45afb18 stable

packaging: allow specifying modules to include with py2exe Maybe this was missing because there wasn't a need for it. Differential Revision: https://phab.mercurial-scm.org/D9856
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 24 Jan 2021 19:08:47 -0500
parents 2ef575c62f10
children ed43b6fa847e
comparison
equal deleted inserted replaced
46353:a6c5ec6b4728 46363:d6cfe45afb18
1692 'mercurial.cext', 1692 'mercurial.cext',
1693 #'mercurial.cffi', 1693 #'mercurial.cffi',
1694 'mercurial.pure', 1694 'mercurial.pure',
1695 ] 1695 ]
1696 1696
1697 py2exe_includes = []
1698
1697 py2exeexcludes = [] 1699 py2exeexcludes = []
1698 py2exedllexcludes = ['crypt32.dll'] 1700 py2exedllexcludes = ['crypt32.dll']
1699 1701
1700 if issetuptools: 1702 if issetuptools:
1701 extra['python_requires'] = supportedpy 1703 extra['python_requires'] = supportedpy
1719 # variables. This is better than setup.cfg files because it allows 1721 # variables. This is better than setup.cfg files because it allows
1720 # supplementing configs instead of replacing them. 1722 # supplementing configs instead of replacing them.
1721 extrapackages = os.environ.get('HG_PY2EXE_EXTRA_PACKAGES') 1723 extrapackages = os.environ.get('HG_PY2EXE_EXTRA_PACKAGES')
1722 if extrapackages: 1724 if extrapackages:
1723 py2exepackages.extend(extrapackages.split(' ')) 1725 py2exepackages.extend(extrapackages.split(' '))
1726
1727 extra_includes = os.environ.get('HG_PY2EXE_EXTRA_INCLUDES')
1728 if extra_includes:
1729 py2exe_includes.extend(extra_includes.split(' '))
1724 1730
1725 excludes = os.environ.get('HG_PY2EXE_EXTRA_EXCLUDES') 1731 excludes = os.environ.get('HG_PY2EXE_EXTRA_EXCLUDES')
1726 if excludes: 1732 if excludes:
1727 py2exeexcludes.extend(excludes.split(' ')) 1733 py2exeexcludes.extend(excludes.split(' '))
1728 1734
1819 distclass=hgdist, 1825 distclass=hgdist,
1820 options={ 1826 options={
1821 'py2exe': { 1827 'py2exe': {
1822 'bundle_files': 3, 1828 'bundle_files': 3,
1823 'dll_excludes': py2exedllexcludes, 1829 'dll_excludes': py2exedllexcludes,
1830 'includes': py2exe_includes,
1824 'excludes': py2exeexcludes, 1831 'excludes': py2exeexcludes,
1825 'packages': py2exepackages, 1832 'packages': py2exepackages,
1826 }, 1833 },
1827 'bdist_mpkg': { 1834 'bdist_mpkg': {
1828 'zipdist': False, 1835 'zipdist': False,