250 lines
6.4 KiB
Python
250 lines
6.4 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
EU-Utility - Setup Script
|
|
|
|
A versatile Entropia Universe utility suite with a modular plugin system.
|
|
|
|
For more information, visit: https://github.com/ImpulsiveFPS/EU-Utility
|
|
"""
|
|
|
|
import os
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
# Ensure setuptools is available
|
|
from setuptools import setup, find_packages
|
|
|
|
# Project root directory
|
|
PROJECT_ROOT = Path(__file__).parent.resolve()
|
|
|
|
# Read version from core/__init__.py
|
|
def get_version():
|
|
"""Extract version from core/__init__.py."""
|
|
init_file = PROJECT_ROOT / "core" / "__init__.py"
|
|
with open(init_file, "r", encoding="utf-8") as f:
|
|
for line in f:
|
|
if line.startswith("__version__"):
|
|
return line.split("=")[1].strip().strip('"\'')
|
|
raise RuntimeError("Version not found in core/__init__.py")
|
|
|
|
# Read long description from README
|
|
def get_long_description():
|
|
"""Read README.md for long description."""
|
|
readme_file = PROJECT_ROOT / "README.md"
|
|
if readme_file.exists():
|
|
with open(readme_file, "r", encoding="utf-8") as f:
|
|
return f.read()
|
|
return ""
|
|
|
|
# Runtime dependencies
|
|
INSTALL_REQUIRES = [
|
|
# Core GUI Framework
|
|
"PyQt6>=6.4.0,<7.0.0",
|
|
|
|
# System Integration
|
|
"keyboard>=0.13.5,<1.0.0",
|
|
"psutil>=5.9.0,<6.0.0",
|
|
"pyperclip>=1.8.2,<2.0.0",
|
|
|
|
# OCR and Image Processing
|
|
"easyocr>=1.7.0,<2.0.0",
|
|
"pytesseract>=0.3.10,<1.0.0",
|
|
"pyautogui>=0.9.54,<1.0.0",
|
|
"pillow>=10.0.0,<11.0.0",
|
|
|
|
# HTTP and Networking
|
|
"requests>=2.28.0,<3.0.0",
|
|
"urllib3>=1.26.0,<3.0.0",
|
|
|
|
# Data Processing
|
|
"numpy>=1.21.0,<2.0.0",
|
|
|
|
# Windows-specific dependencies (installed only on Windows)
|
|
'portalocker>=2.7.0; platform_system=="Windows"',
|
|
'pywin32>=306; platform_system=="Windows"',
|
|
]
|
|
|
|
# Development dependencies
|
|
DEV_REQUIRES = [
|
|
# Testing
|
|
"pytest>=7.4.0,<8.0.0",
|
|
"pytest-cov>=4.1.0,<5.0.0",
|
|
"pytest-mock>=3.11.0,<4.0.0",
|
|
"pytest-benchmark>=4.0.0,<5.0.0",
|
|
"pytest-qt>=4.2.0,<5.0.0",
|
|
"pytest-xvfb>=2.0.0,<3.0.0",
|
|
|
|
# Code Quality
|
|
"black>=23.0.0,<24.0.0",
|
|
"flake8>=6.0.0,<7.0.0",
|
|
"mypy>=1.5.0,<2.0.0",
|
|
"isort>=5.12.0,<6.0.0",
|
|
"pydocstyle>=6.3.0,<7.0.0",
|
|
|
|
# Security
|
|
"bandit>=1.7.5,<2.0.0",
|
|
"safety>=2.3.0,<3.0.0",
|
|
|
|
# Documentation
|
|
"sphinx>=7.0.0,<8.0.0",
|
|
"sphinx-rtd-theme>=1.3.0,<2.0.0",
|
|
"myst-parser>=2.0.0,<3.0.0",
|
|
|
|
# Build and Packaging
|
|
"build>=0.10.0,<1.0.0",
|
|
"twine>=4.0.0,<5.0.0",
|
|
"wheel>=0.41.0,<1.0.0",
|
|
|
|
# Pre-commit hooks
|
|
"pre-commit>=3.4.0,<4.0.0",
|
|
]
|
|
|
|
# Optional plugin dependencies
|
|
EXTRAS_REQUIRE = {
|
|
# Advanced media control features
|
|
"spotify": [
|
|
"spotipy>=2.23.0,<3.0.0",
|
|
'pycaw>=20230407; platform_system=="Windows"',
|
|
],
|
|
|
|
# Discord Rich Presence integration
|
|
"discord": [
|
|
"pypresence>=4.3.0,<5.0.0",
|
|
],
|
|
|
|
# All optional features
|
|
"all": [
|
|
"spotipy>=2.23.0,<3.0.0",
|
|
'pycaw>=20230407; platform_system=="Windows"',
|
|
"pypresence>=4.3.0,<5.0.0",
|
|
],
|
|
|
|
# Development extras (includes all dev dependencies)
|
|
"dev": DEV_REQUIRES,
|
|
}
|
|
|
|
# Package classifiers
|
|
CLASSIFIERS = [
|
|
# Development Status
|
|
"Development Status :: 4 - Beta",
|
|
|
|
# Intended Audience
|
|
"Intended Audience :: End Users/Desktop",
|
|
"Intended Audience :: Gamers",
|
|
|
|
# License
|
|
"License :: OSI Approved :: MIT License",
|
|
|
|
# Operating System
|
|
"Operating System :: OS Independent",
|
|
"Operating System :: Microsoft :: Windows",
|
|
"Operating System :: POSIX :: Linux",
|
|
|
|
# Programming Language
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3 :: Only",
|
|
|
|
# Topic
|
|
"Topic :: Games/Entertainment",
|
|
"Topic :: Utilities",
|
|
"Topic :: Desktop Environment",
|
|
|
|
# Environment
|
|
"Environment :: X11 Applications :: Qt",
|
|
"Environment :: Win32 (MS Windows)",
|
|
|
|
# Natural Language
|
|
"Natural Language :: English",
|
|
]
|
|
|
|
# Entry points for CLI usage
|
|
ENTRY_POINTS = {
|
|
"console_scripts": [
|
|
"eu-utility=core.main:main",
|
|
"eu-utility-secure=core.main_optimized:main",
|
|
],
|
|
"gui_scripts": [
|
|
"eu-utility-gui=core.main:main",
|
|
],
|
|
}
|
|
|
|
# Package data to include
|
|
PACKAGE_DATA = {
|
|
"core": ["*.json", "*.yaml", "*.yml", "*.css", "*.qss"],
|
|
"plugins": ["*/assets/*", "*/templates/*"],
|
|
}
|
|
|
|
|
|
def main():
|
|
"""Execute setup."""
|
|
setup(
|
|
# Basic metadata
|
|
name="eu-utility",
|
|
version=get_version(),
|
|
author="ImpulsiveFPS",
|
|
author_email="dev@impulsivefps.com",
|
|
maintainer="ImpulsiveFPS",
|
|
maintainer_email="dev@impulsivefps.com",
|
|
url="https://github.com/ImpulsiveFPS/EU-Utility",
|
|
project_urls={
|
|
"Bug Reports": "https://github.com/ImpulsiveFPS/EU-Utility/issues",
|
|
"Source": "https://github.com/ImpulsiveFPS/EU-Utility",
|
|
"Documentation": "https://github.com/ImpulsiveFPS/EU-Utility/tree/main/docs",
|
|
"Changelog": "https://github.com/ImpulsiveFPS/EU-Utility/blob/main/CHANGELOG.md",
|
|
},
|
|
|
|
# Descriptions
|
|
description="A versatile Entropia Universe utility suite with a modular plugin system",
|
|
long_description=get_long_description(),
|
|
long_description_content_type="text/markdown",
|
|
keywords=[
|
|
"entropia universe",
|
|
"game utility",
|
|
"overlay",
|
|
"plugin system",
|
|
"ocr",
|
|
"tracker",
|
|
"calculator",
|
|
"gaming",
|
|
"mmorpg",
|
|
],
|
|
|
|
# Classifiers
|
|
classifiers=CLASSIFIERS,
|
|
|
|
# License
|
|
license="MIT",
|
|
|
|
# Python version requirement
|
|
python_requires=">=3.11",
|
|
|
|
# Packages
|
|
packages=find_packages(
|
|
include=["core", "core.*", "plugins", "plugins.*"],
|
|
exclude=["tests", "tests.*", "benchmarks", "benchmarks.*", "docs", "docs.*"],
|
|
),
|
|
|
|
# Dependencies
|
|
install_requires=INSTALL_REQUIRES,
|
|
extras_require=EXTRAS_REQUIRE,
|
|
|
|
# Package data
|
|
include_package_data=True,
|
|
package_data=PACKAGE_DATA,
|
|
|
|
# Entry points
|
|
entry_points=ENTRY_POINTS,
|
|
|
|
# Zip safety
|
|
zip_safe=False,
|
|
|
|
# Platforms
|
|
platforms=["win32", "win64", "linux"],
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|