import os
from setuptools import setup
from setuptools import find_packages
try:
from packaging.version import Version, InvalidVersion
__version__ = os.environ.get("WHL_VERSION", "0.0.1")
try:
Version(__version__)
print(f"Using version: {__version__}")
except InvalidVersion as e:
print(f"Warning: Version '{__version__}' is invalid: {e}. Using default '0.0.1'")
__version__ = "0.0.1"
except ImportError:
print("Warning: packaging module not available, using version as-is")
__version__ = os.environ.get("WHL_VERSION", "0.0.1")
except Exception as e:
print(f"Error: Failed to process version, using default '0.0.1'. Error: {e}")
__version__ = "0.0.1"
cur_path = os.path.abspath(os.path.dirname(__file__))
root_path = os.path.join(cur_path, "../")
setup(
name="msprof",
version=__version__,
description="msprof desc",
url="msprof",
author="msprof",
author_email="",
license="",
package_dir={"": root_path},
packages=find_packages(root_path),
include_package_data=False,
package_data={
"": ["*.json"],
"analysis": ["lib64/*"]
},
python_requires=">=3.7"
)