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