-
Notifications
You must be signed in to change notification settings - Fork 17
/
setup.py
98 lines (86 loc) · 3.53 KB
/
setup.py
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""SCICO package configuration."""
import importlib.util
import os
import os.path
import site
import sys
from setuptools import find_namespace_packages, setup
# Import module scico._version without executing __init__.py
spec = importlib.util.spec_from_file_location("_version", os.path.join("scico", "_version.py"))
module = importlib.util.module_from_spec(spec)
sys.modules["_version"] = module
spec.loader.exec_module(module)
from _version import package_version
name = "scico"
version = package_version()
# Add argument exclude=["test", "test.*"] to exclude test subpackage
packages = find_namespace_packages(where="scico")
packages = ["scico"] + [f"scico.{m}" for m in packages]
longdesc = """
SCICO is a Python package for solving the inverse problems that arise in scientific imaging applications. Its primary focus is providing methods for solving ill-posed inverse problems by using an appropriate prior model of the reconstruction space. SCICO includes a growing suite of operators, cost functionals, regularizers, and optimization routines that may be combined to solve a wide range of problems, and is designed so that it is easy to add new building blocks. SCICO is built on top of JAX, which provides features such as automatic gradient calculation and GPU acceleration.
"""
# Set install_requires from requirements.txt file
with open("requirements.txt") as f:
lines = f.readlines()
install_requires = [line.strip() for line in lines]
python_requires = ">=3.8"
tests_require = ["pytest", "pytest-runner"]
extra_require_files = [
"dev_requirements.txt",
os.path.join("docs", "docs_requirements.txt"),
os.path.join("examples", "examples_requirements.txt"),
os.path.join("examples", "notebooks_requirements.txt"),
]
extras_require = {"tests": tests_require}
for require_file in extra_require_files:
extras_label = os.path.basename(require_file).partition("_")[0]
with open(require_file) as f:
lines = f.readlines()
extras_require[extras_label] = [line.strip() for line in lines if line[0:2] != "-r"]
# PEP517 workaround, see https://www.scivision.dev/python-pip-devel-user-install/
site.ENABLE_USER_SITE = True
setup(
name=name,
version=version,
description="Scientific Computational Imaging COde: A Python "
"package for scientific imaging problems",
long_description=longdesc,
keywords=[
"Computational Imaging",
"Scientific Imaging",
"Inverse Problems",
"Plug-and-Play Priors",
"Total Variation",
"Optimization",
"ADMM",
"Linearized ADMM",
"PDHG",
"PGM",
],
platforms="Any",
license="BSD",
url="https://github.com/lanl/scico",
author="SCICO Developers",
author_email="[email protected]", # Temporary
packages=packages,
package_data={"scico": ["data/*/*.png", "data/*/*.npz"]},
include_package_data=True,
python_requires=python_requires,
tests_require=tests_require,
install_requires=install_requires,
extras_require=extras_require,
classifiers=[
"License :: OSI Approved :: BSD License",
"Development Status :: 4 - Beta",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development :: Libraries :: Python Modules",
],
zip_safe=False,
)