|
| 1 | +"""Setup script.""" |
| 2 | + |
| 3 | +import os |
| 4 | +import pathlib |
| 5 | + |
| 6 | +from setuptools import find_packages |
| 7 | +from setuptools import setup |
| 8 | + |
| 9 | + |
| 10 | +def read(rel_path: str) -> str: |
| 11 | + here = os.path.abspath(os.path.dirname(__file__)) |
| 12 | + with open(os.path.join(here, rel_path)) as fp: |
| 13 | + return fp.read() |
| 14 | + |
| 15 | + |
| 16 | +def get_version(rel_path: str) -> str: |
| 17 | + for line in read(rel_path).splitlines(): |
| 18 | + if line.startswith("__version__"): |
| 19 | + delim = '"' if '"' in line else "'" |
| 20 | + return line.split(delim)[1] |
| 21 | + raise RuntimeError("Unable to find version string.") |
| 22 | + |
| 23 | + |
| 24 | +HERE = pathlib.Path(__file__).parent |
| 25 | +README = (HERE / "README.md").read_text() |
| 26 | +VERSION = get_version("keras_rs/src/version_utils.py") |
| 27 | + |
| 28 | +setup( |
| 29 | + name="keras-rs", |
| 30 | + description=("Multi-backend recommender systems with Keras 3."), |
| 31 | + long_description=README, |
| 32 | + long_description_content_type="text/markdown", |
| 33 | + version=VERSION, |
| 34 | + url="https://github.com/keras-team/keras-rs", |
| 35 | + author="Keras team", |
| 36 | + |
| 37 | + license="Apache License 2.0", |
| 38 | + install_requires=[ |
| 39 | + "keras", |
| 40 | + ], |
| 41 | + # Supported Python versions |
| 42 | + python_requires=">=3.9", |
| 43 | + classifiers=[ |
| 44 | + "Development Status :: 3 - Alpha", |
| 45 | + "Programming Language :: Python :: 3", |
| 46 | + "Programming Language :: Python :: 3.9", |
| 47 | + "Programming Language :: Python :: 3.10", |
| 48 | + "Programming Language :: Python :: 3.11", |
| 49 | + "Programming Language :: Python :: 3 :: Only", |
| 50 | + "Operating System :: Unix", |
| 51 | + "Operating System :: Microsoft :: Windows", |
| 52 | + "Operating System :: MacOS", |
| 53 | + "Intended Audience :: Science/Research", |
| 54 | + "Topic :: Scientific/Engineering", |
| 55 | + "Topic :: Software Development", |
| 56 | + ], |
| 57 | + packages=find_packages(), # exclude=("keras_rs.src.testing",)), |
| 58 | +) |
0 commit comments