Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /iDDS/monitor/setup.py was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 #!/usr/bin/env python
0002 #
0003 # Licensed under the Apache License, Version 2.0 (the "License");
0004 # You may not use this file except in compliance with the License.
0005 # You may obtain a copy of the License at
0006 # http://www.apache.org/licenses/LICENSE-2.0
0007 #
0008 # Authors:
0009 # - Wen Guan, <wen.guan@cern.ch>, 2019 - 2025
0010 
0011 # Metadata is in pyproject.toml. This file handles data_files and scripts
0012 # which require glob patterns not supported in pyproject.toml.
0013 
0014 import os
0015 from setuptools import setup
0016 
0017 
0018 def get_data_files(dest, src):
0019     """Walk a source directory and produce data_files entries."""
0020     data = []
0021     for root, dirs, files in os.walk(src):
0022         if root.endswith('/dist') or root.endswith('/build') or 'egg-info' in root:
0023             continue
0024         dest_dir = os.path.join(dest, root)
0025         src_files = [os.path.join(root, f) for f in files]
0026         if src_files:
0027             data.append((dest_dir, src_files))
0028     return data
0029 
0030 
0031 data_files = []
0032 data_files += get_data_files('monitor/', './data')
0033 
0034 setup(
0035     data_files=data_files,
0036 )