Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setup py #31

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import os
import sys
from datetime import datetime
from typing import List

from setuptools import find_packages, setup

def fetch_requirements(path) -> List[str]:
"""
This function reads the requirements file.

Args:
path (str): the path to the requirements file.

Returns:
The lines in the requirements file.
"""
with open(path, "r") as fd:
return [r.strip() for r in fd.readlines()]


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()
# use date as the nightly version
version = datetime.today().strftime("%Y.%m.%d")
package_name = "pipegoose-nightly"

setup(
name=package_name,
version=version,
packages=find_packages(
exclude=(
"tests",
"docs",
"examples",
"tests",
"*.egg-info",
)
),
description="A library for 3d parallelism",
long_description=fetch_readme(),
long_description_content_type="text/markdown",
license="MIT License",
install_requires=fetch_requirements("requirements.txt"),
classifiers=[
"Programming Language :: Python :: 3",
"Environment :: GPU :: NVIDIA CUDA",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: System :: Distributed Computing",
],
)