setup.py 1.82 KB
Newer Older
Wei Shoulin's avatar
Wei Shoulin committed
1
2
3
# coding: utf-8
import os
from setuptools import setup
Wei Shoulin's avatar
Wei Shoulin committed
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
setup_pars = {
    "packages" : [
        'csst_dfs_commons',
        'csst_dfs_commons.convert',
        'csst_dfs_commons.logging',
        'csst_dfs_commons.models',
        'csst_dfs_commons.utils',
    ],
    "package_dir" : {
        'csst_dfs_commons' : 'csst_dfs_commons',
        'csst_dfs_commons.convert' : 'csst_dfs_commons/convert',
        'csst_dfs_commons.logging' : 'csst_dfs_commons/logging',
        'csst_dfs_commons.models' : 'csst_dfs_commons/models',
        'csst_dfs_commons.utils' : 'csst_dfs_commons/utils',
    },
}

def requirements():
    with open("requirements.txt", "r") as f:
        return [
            req.strip()
            for req in f.readlines()
            if not req.startswith("#") and req.__contains__("==")
        ]

def version():
    __version = {}
    version_path = os.path.join(os.path.dirname(__file__), "csst_dfs_commons", "version.py")
    with open(version_path, "r") as file:
        exec(file.read(), __version)
    return __version["__version__"]

setup(
    name="csst_dfs_commons",
    version=version(),
    description="common library for CSST Data Flow System (DFS)",
    long_description=open('README.md').read(),
    license="MIT",
    python_requires=">=3.7",
    install_requires=requirements(),
    zip_safe=False,
    classifiers=[
        "Development Status :: 4 - Beta",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3",
        "Topic :: Scientific/Engineering :: Physics",
        "Topic :: Scientific/Engineering :: Astronomy",

    ],
    include_package_data=False,
    project_urls={
        'Source': 'https://csst-tb.bao.ac.cn/code/csst-dfs/csst-dfs-api-local',
    },
    **setup_pars
)
Wei Shoulin's avatar
Wei Shoulin committed
61