| 1 | import sys |
| 2 | from pathlib import Path |
| 3 | from setuptools import setup, find_packages |
| 4 | |
| 5 | # Get the project root directory |
| 6 | root_dir = Path(__file__).parent |
| 7 | |
| 8 | # Add the package directory to the Python path |
| 9 | package_dir = root_dir / "mlx_vlm" |
| 10 | sys.path.append(str(package_dir)) |
| 11 | |
| 12 | # Read the requirements from the requirements.txt file |
| 13 | requirements_path = root_dir / "requirements.txt" |
| 14 | with open(requirements_path) as fid: |
| 15 | requirements = [l.strip() for l in fid.readlines()] |
| 16 | |
| 17 | # Import the version from the package |
| 18 | from version import __version__ |
| 19 | |
| 20 | # Setup configuration |
| 21 | setup( |
| 22 | name="mlx-vlm", |
| 23 | version=__version__, |
| 24 | description="Vision LLMs on Apple silicon with MLX and the Hugging Face Hub", |
| 25 | long_description=open(root_dir / "README.md", encoding="utf-8").read(), |
| 26 | long_description_content_type="text/markdown", |
| 27 | author_email="prince.gdt@gmail.com", |
| 28 | author="MLX Contributors", |
| 29 | url="https://github.com/Blaizzy/mlx-vlm", |
| 30 | license="MIT", |
| 31 | install_requires=requirements, |
| 32 | packages=find_packages(where=root_dir), |
| 33 | python_requires=">=3.8", |
| 34 | ) |