from setuptools import setup, find_packages import os from pathlib import Path # Read requirements with open('requirements.txt', 'r') as f: requirements = [line.strip() for line in f if line.strip() and not line.startswith('#')] # Find all packages including pyarmor_runtime packages = find_packages(where="src") # Collect all package data including PyArmor runtime files package_data = {} for pkg in packages: pkg_path = Path('src') / pkg.replace('.', '/') if pkg_path.exists(): # Include all .pyd, .so, .dll files (PyArmor runtime) data_files = [] for pattern in ['*.pyd', '*.so', '*.dll', '*.dylib']: data_files.extend([str(f.relative_to(pkg_path)) for f in pkg_path.glob(pattern)]) if data_files: package_data[pkg] = data_files setup( name="orisys", version="0.1.0", description="Orisys - Optical Tactile Sensor SDK (Protected)", author="Your Name", package_dir={"": "src"}, packages=packages, package_data=package_data, include_package_data=True, install_requires=requirements, python_requires="==3.8.*", # Include PyArmor runtime files zip_safe=False, options={ 'bdist_wheel': { 'python_tag': 'py38', } }, )