gemma_pytorch
/
setup.py
60 строк · 1.9 Кб
1# Copyright 2024 Google LLC
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15import io16import os17from typing import List18
19import setuptools20
21ROOT_DIR = os.path.dirname(__file__)22
23
24def get_path(*filepath) -> str:25return os.path.join(ROOT_DIR, *filepath)26
27
28def read_readme() -> str:29"""Read the README file."""30return io.open(get_path("README.md"), "r", encoding="utf-8").read()31
32
33def get_requirements() -> List[str]:34"""Get Python package dependencies from requirements.txt."""35with open(get_path("requirements.txt")) as f:36requirements = f.read().strip().split("\n")37return requirements38
39
40setuptools.setup(41name="gemma",42version="0.1",43author="Gemma contributors",44license="Apache 2.0",45description=("Gemma model implementation"),46long_description=read_readme(),47long_description_content_type="text/markdown",48classifiers=[49"Programming Language :: Python :: 3.8",50"Programming Language :: Python :: 3.9",51"Programming Language :: Python :: 3.10",52"Programming Language :: Python :: 3.11",53"License :: OSI Approved :: Apache Software License",54"Topic :: Scientific/Engineering :: Artificial Intelligence",55],56packages=setuptools.find_packages(exclude=("benchmarks", "docs",57"examples", "tests")),58python_requires=">=3.8",59install_requires=get_requirements(),60)
61