forked from Amber-MD/pytraj
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
49 lines (40 loc) · 1.44 KB
/
setup.py
File metadata and controls
49 lines (40 loc) · 1.44 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
#!/usr/bin/env python
"""
Refactored setup.py - cleaner structure focusing on main setup logic
Complex build logic moved to separate modules for better maintainability
"""
import os
import sys
from setuptools import setup, Extension
# Import build configuration and utilities
from base_setup.build_config import BuildConfig
from base_setup.platform_utils import PlatformHandler
from base_setup.extension_builder import ExtensionBuilder
def main():
"""Main setup entry point with cleaner flow"""
# Parse command line arguments and flags
config = BuildConfig()
# Handle platform-specific setup
platform = PlatformHandler()
platform.configure_environment(config)
# Build extensions if needed
ext_builder = ExtensionBuilder(config, platform)
ext_modules = ext_builder.get_extensions() if config.compile_extensions else []
# Get package data
package_data = ext_builder.get_package_data()
setup(
name="pytraj",
version=config.version,
author="Hai Nguyen",
url="https://github.com/Amber-MD/pytraj",
packages=config.packages,
description="Python API for cpptraj: a data analysis package for biomolecular simulation",
license="GPL v3",
install_requires=['numpy'],
classifiers=config.classifiers,
ext_modules=ext_modules,
package_data={'pytraj': package_data},
cmdclass=config.cmdclass,
)
if __name__ == "__main__":
main()