generated from microsoft/python-package-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
60 lines (54 loc) · 1.87 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
import os
import subprocess
import sys
from setuptools import setup, find_packages
from setuptools.command.install import install
class CustomInstallCommand(install):
"""Customized setuptools install command to integrate FLUX installation."""
def run(self):
# Run standard installation
install.run(self)
# Run the unified installer script after dependencies are installed
try:
installer_path = os.path.join(os.path.dirname(__file__), "fluxpype", "comprehensive_fluxpype_installer.py")
if os.path.exists(installer_path):
print("Running unified installer...")
subprocess.run([sys.executable, installer_path], check=True)
else:
print("Unified installer script not found. Skipping FLUX installation.")
except subprocess.CalledProcessError as e:
print(f"FLUX installation failed: {e}")
raise RuntimeError("Failed to complete FLUX installation.")
setup(
name="fluxpype",
version="0.2.0",
description="A Python wrapper and installer for the FLUX model",
packages=find_packages(),
python_requires=">=3.8",
install_requires=[
"matplotlib",
"numpy<2.0",
"sunpy",
"pandas",
"tqdm",
"astropy<7.0",
"bs4",
"lxml",
"zeep",
"drms",
"timeout-decorator",
"rich",
"opencv-python",
"tqdm"
],
entry_points={
"console_scripts": [
"flux-install = fluxpype.unified_installer:main",
"flux-config-run = fluxpype.config_runner:run",
"flux-config-view = fluxpype.config_runner:view",
"flux-config-edit = fluxpype.config_runner:open_config",
"flux-config-gallery = fluxpype.config_runner:gallery",
]
},
cmdclass={"install": CustomInstallCommand},
)