import re import sys from pathlib import Path from setuptools import setup, find_packages # Single source of truth for the version is lintunes/__init__.py; read it # textually so setup.py doesn't import the package (and its Qt deps). _init = (Path(__file__).parent / "lintunes" / "__init__.py").read_text() _version = re.search(r'^__version__ = "([^"]+)"', _init, re.MULTILINE)[1] setup( name="lintunes", version=_version, packages=find_packages(), # The web-mix templates (player.js/css, the player sprite GIF and # the placeholder image) must ride along in an installed copy. # The andTunes APK LinTunes installs, and the default button artwork # sync ships to the device. package_data={ "lintunes": ["sounds/*.wav", "sounds/*.mp3", "sounds/*.md"], "lintunes.export": ["templates/*"], "lintunes.android": ["andTunes.apk", "andTunes.json"], "lintunes.andtunes": ["buttons/*.png"], "lintunes.kaleidostrobe": ["tables.npz"], }, install_requires=[ "PyQt6>=6.8.0", # QAudioBufferOutput (visualizer) needs Qt 6.8+ "mutagen>=1.46", "numpy>=1.24", "requests>=2.28", "pychromecast>=14.0.10", "pyatv>=0.18.0", # AirPlay (RAOP) streaming; decodes via the ffmpeg CLI # macOS: Now Playing + media keys (MediaPlayer) and the Cocoa glue # it needs. Imported lazily, only on a Mac. 'pyobjc-framework-Cocoa>=10.0; sys_platform == "darwin"', 'pyobjc-framework-MediaPlayer>=10.0; sys_platform == "darwin"', ], # The .desktop entry is a Linux desktop's; a Mac has LinTunes.app. data_files=([("share/applications", ["packaging/lintunes.desktop"])] if sys.platform.startswith("linux") else []), entry_points={ "console_scripts": [ "lintunes=lintunes.main:main", ], }, python_requires=">=3.11", )