Open-Sora/setup.py

77 lines
2.1 KiB
Python
Raw Permalink Normal View History

2024-03-15 14:49:38 +01:00
from typing import List
from setuptools import find_packages, setup
2024-05-16 10:50:24 +02:00
def fetch_requirements(paths) -> List[str]:
2024-03-15 14:49:38 +01:00
"""
This function reads the requirements file.
Args:
path (str): the path to the requirements file.
Returns:
The lines in the requirements file.
"""
2024-05-16 10:50:24 +02:00
if not isinstance(paths, list):
paths = [paths]
requirements = []
for path in paths:
with open(path, "r") as fd:
requirements += [r.strip() for r in fd.readlines()]
return requirements
2024-03-15 14:49:38 +01:00
def fetch_readme() -> str:
"""
This function reads the README.md file in the current directory.
Returns:
The lines in the README file.
"""
with open("README.md", encoding="utf-8") as f:
return f.read()
setup(
name="opensora",
version="2.0.0",
2024-03-15 14:49:38 +01:00
packages=find_packages(
exclude=(
2024-03-17 13:48:32 +01:00
"assets",
"configs",
"docs",
2024-05-16 10:50:24 +02:00
"eval",
"evaluation_results",
"gradio",
"logs",
"notebooks",
2024-03-17 13:48:32 +01:00
"outputs",
"pretrained_models",
2024-05-16 10:50:24 +02:00
"samples",
2024-03-17 13:48:32 +01:00
"scripts",
2024-03-15 14:49:38 +01:00
"*.egg-info",
)
),
2024-03-17 13:55:11 +01:00
description="Democratizing Efficient Video Production for All",
2024-03-15 14:49:38 +01:00
long_description=fetch_readme(),
long_description_content_type="text/markdown",
license="Apache Software License 2.0",
2024-05-16 10:50:24 +02:00
url="https://github.com/hpcaitech/Open-Sora",
project_urls={
"Bug Tracker": "https://github.com/hpcaitech/Open-Sora/issues",
"Examples": "https://hpcaitech.github.io/Open-Sora/",
"Documentation": "https://github.com/hpcaitech/Open-Sora?tab=readme-ov-file",
"Github": "https://github.com/hpcaitech/Open-Sora",
},
install_requires=fetch_requirements("requirements.txt"),
2024-03-15 14:49:38 +01:00
python_requires=">=3.6",
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Environment :: GPU :: NVIDIA CUDA",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: System :: Distributed Computing",
],
)