gaphor/packaging/gaphor.spec.in
2021-01-02 22:43:17 -05:00

64 lines
2.2 KiB
RPMSpec

from PyInstaller.utils.hooks import copy_metadata
block_cipher = None
a = Analysis(['gaphor-script.py'],
pathex=['../'],
binaries=[],
datas=[
('../gaphor/diagram/*.glade', 'gaphor/diagram'),
('../gaphor/ui/layout.xml', 'gaphor/ui'),
('../gaphor/ui/layout.css', 'gaphor/ui'),
('../gaphor/ui/*.glade', 'gaphor/ui'),
('../gaphor/ui/*.png', 'gaphor/ui'),
('../gaphor/services/helpservice/*.svg', 'gaphor/services/helpservice'),
('../gaphor/services/helpservice/*.glade', 'gaphor/services/helpservice'),
('../gaphor/ui/icons/hicolor/scalable/actions/*.svg', 'gaphor/ui/icons/hicolor/scalable/actions'),
('../LICENSE.txt', 'gaphor'),
('../gaphor/locale/*', 'gaphor/locale')
]+copy_metadata('gaphor')+copy_metadata('gaphas'),
# Fixes issue with setuptools https://github.com/pypa/setuptools/issues/1963
hiddenimports=['pkg_resources.py2_warn'],
hookspath=[],
runtime_hooks=[],
excludes=['lib2to3', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
options=[],
exclude_binaries=True,
name='gaphor-exe',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
icon='misc/gaphor.ico',
version='file_version_info.txt',
console=False)
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name='gaphor')
app = BUNDLE(coll,
name='Gaphor.app',
icon='misc/gaphor.icns',
bundle_identifier='org.gaphor.gaphor',
info_plist={
'CFBundleName': 'Gaphor',
'CFBundleDisplayName': 'Gaphor',
'CFBundleVersion': '__version__',
'CFBundlerShortVersionString': '__version__',
'NSRequiresAquaSystemAppearance': 'No',
'NSHighResolutionCapable': 'True',
},
)