This repository was archived by the owner on May 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
54 lines (43 loc) · 1.38 KB
/
setup.py
File metadata and controls
54 lines (43 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import codecs
import os
from setuptools import find_packages, setup
CLASSIFIERS = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
]
INSTALL_REQUIRES = [
"jax>=0.4.1",
"jaxlib>=0.4.1",
"simple-pytree==0.1.6",
]
EXTRA_REQUIRE = {
"dev": ["pytest", "pre-commit", "pytest-cov", "flax"],
}
GLOBAL_PATH = os.path.dirname(os.path.realpath(__file__))
def read(*local_path: str) -> str:
"""Read a file, given a local path.
Args:
*local_path (str): The local path to the file.
Returns:
str: The contents of the file.
"""
with codecs.open(os.path.join(GLOBAL_PATH, *local_path), "rb", "utf-8") as f:
return f.read()
if __name__ == "__main__":
setup(
name="mytree",
version="0.2.1",
author="Daniel Dodd",
author_email="daniel_dodd@icloud.com",
license="MIT",
description="Module pytrees that cleanly handle parameter trainability and transformations for JAX models.",
long_description=read("README.md"),
long_description_content_type="text/markdown",
packages=find_packages(".", exclude=["tests"]),
python_requires=">=3.8",
install_requires=INSTALL_REQUIRES,
extras_require=EXTRA_REQUIRE,
zip_safe=True,
)