From 8806348f9557bacbdd724a06fe6072cb0e393f24 Mon Sep 17 00:00:00 2001 From: Izalia Mae Date: Mon, 22 Jan 2024 06:30:28 -0500 Subject: [PATCH] fix python packaging --- MANIFEST.in | 1 + relay.spec | 67 ++++++++++++++++++++++++++++------------------------- setup.cfg | 17 +++++++++----- 3 files changed, 47 insertions(+), 38 deletions(-) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..fd4498e --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include database/statements.sql diff --git a/relay.spec b/relay.spec index 57fedc7..7ed9c83 100644 --- a/relay.spec +++ b/relay.spec @@ -5,40 +5,43 @@ block_cipher = None a = Analysis( - ['relay/__main__.py'], - pathex=[], - binaries=[], - datas=[], - hiddenimports=[], - hookspath=[], - hooksconfig={}, - runtime_hooks=[], - excludes=[], - win_no_prefer_redirects=False, - win_private_assemblies=False, - cipher=block_cipher, - noarchive=False, + ['relay/__main__.py'], + pathex=[], + binaries=[], + datas=[ + ('relay/database', 'relay/database') + ], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + 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, - a.binaries, - a.zipfiles, - a.datas, - [], - name='activityrelay', - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - upx_exclude=[], - runtime_tmpdir=None, - console=True, - disable_windowed_traceback=False, - argv_emulation=False, - target_arch=None, - codesign_identity=None, - entitlements_file=None, + pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='activityrelay', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, ) diff --git a/setup.cfg b/setup.cfg index 8b807e3..8ca3aad 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,26 +10,31 @@ license_file = LICENSE classifiers = Environment :: Console License :: OSI Approved :: AGPLv3 License - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 project_urls = Source = https://git.pleroma.social/pleroma/relay Tracker = https://git.pleroma.social/pleroma/relay/-/issues [options] zip_safe = False -packages = find: +packages = relay +include_package_data = true install_requires = file: requirements.txt python_requires = >=3.8 [options.extras_require] dev = - flake8 = 3.1.0 - pyinstaller = 6.3.0 - pylint = 3.0 + flake8 == 3.1.0 + pyinstaller == 6.3.0 + pylint == 3.0 + +[options.package_data] +relay = + database/statements.sql [options.entry_points] console_scripts =