Commit 38c68810 authored by Fang Yuedong's avatar Fang Yuedong
Browse files

change package name to "csst_msc_sim", change version number to 3.0.0

parent 50a9f005
......@@ -16,7 +16,10 @@ from Cython.Build import cythonize
import numpy
class CTypes(Extension): pass
class CTypes(Extension):
pass
class build_ext(build_ext):
......@@ -34,24 +37,29 @@ class build_ext(build_ext):
return ext_name + '.so'
return super().get_ext_filename(ext_name)
extensions = [
Extension("ObservationSim.MockObject.SpecDisperser.disperse_c.interp", ["ObservationSim/MockObject/SpecDisperser/disperse_c/interp.pyx"],
include_dirs = [numpy.get_include()],
libraries=["m"]),
include_dirs=[numpy.get_include()],
libraries=["m"]),
Extension("ObservationSim.MockObject.SpecDisperser.disperse_c.disperse", ["ObservationSim/MockObject/SpecDisperser/disperse_c/disperse.pyx"],
include_dirs = [numpy.get_include()],
libraries=["m"]),
include_dirs=[numpy.get_include()],
libraries=["m"]),
]
df_module = [CTypes('ObservationSim.Instrument.Chip.libBF.libmoduleBF',
['ObservationSim/Instrument/Chip/libBF/diffusion_X1.c', 'ObservationSim/Instrument/Chip/libBF/nrutil.c'],
include_dirs=['ObservationSim/Instrument/Chip/libBF/', '/usr/include']
)]
['ObservationSim/Instrument/Chip/libBF/diffusion_X1.c',
'ObservationSim/Instrument/Chip/libBF/nrutil.c'],
include_dirs=[
'ObservationSim/Instrument/Chip/libBF/', '/usr/include']
)]
cti_module = [CTypes('ObservationSim.Instrument.Chip.libCTI.libmoduleCTI',
['ObservationSim/Instrument/Chip/libCTI/src/add_CTI.c', 'ObservationSim/Instrument/Chip/libCTI/src/nrutil.c', 'ObservationSim/Instrument/Chip/libCTI/src/ran1.c', 'ObservationSim/Instrument/Chip/libCTI/src/ran2.c', 'ObservationSim/Instrument/Chip/libCTI/src/poidev.c', 'ObservationSim/Instrument/Chip/libCTI/src/gammln.c', 'ObservationSim/Instrument/Chip/libCTI/src/gasdev.c', 'ObservationSim/Instrument/Chip/libCTI/src/sort.c', 'ObservationSim/Instrument/Chip/libCTI/src/creattraps.c'],
include_dirs=['ObservationSim/Instrument/Chip/libCTI/src/', '/usr/include']
)]
['ObservationSim/Instrument/Chip/libCTI/src/add_CTI.c', 'ObservationSim/Instrument/Chip/libCTI/src/nrutil.c', 'ObservationSim/Instrument/Chip/libCTI/src/ran1.c', 'ObservationSim/Instrument/Chip/libCTI/src/ran2.c', 'ObservationSim/Instrument/Chip/libCTI/src/poidev.c',
'ObservationSim/Instrument/Chip/libCTI/src/gammln.c', 'ObservationSim/Instrument/Chip/libCTI/src/gasdev.c', 'ObservationSim/Instrument/Chip/libCTI/src/sort.c', 'ObservationSim/Instrument/Chip/libCTI/src/creattraps.c'],
include_dirs=[
'ObservationSim/Instrument/Chip/libCTI/src/', '/usr/include']
)]
# setup(
......@@ -67,45 +75,45 @@ with open("requirements.txt", "r") as f:
if not req.startswith("#") and req.__contains__("==")
]
setup(name='CSSTSim',
version='2.1.0',
packages=find_packages(),
# install_requires=[
# # 'numpy>=1.18.5',
# # 'galsim>=2.2.4',
# # 'pyyaml>=5.3.1',
# # 'astropy>=4.0.1',
# # 'scipy>=1.5.0',
# # 'mpi4py>=3.0.3',
# # 'sep>=1.0.3',
# # 'healpy>=1.14.0',
# # 'h5py>=2.10.0',
# # 'Cython>=0.29.21',
# # 'numba>=0.50.1'
# ],
package_data = {
'ObservationSim.Astrometry.lib': ['libshao.so'],
'ObservationSim.Instrument.Chip.libBF': ['libmoduleBF.so'],
'ObservationSim.Instrument.Chip.libCTI': ['libmoduleCTI.so'],
'ObservationSim.MockObject.data': ['*.dat'],
'ObservationSim.MockObject.data.led': ['*.fits'],
'ObservationSim.Instrument.data': ['*.txt', '*.dat', '*.json'],
'ObservationSim.Instrument.data.field_distortion': ['*.pickle'],
'ObservationSim.Instrument.data.ccd': ['*.txt','*.json'],
'ObservationSim.Instrument.data.filters': ['*.txt', '*.list', '*.dat'],
'ObservationSim.Instrument.data.throughputs': ['*.txt', '*.dat'],
'ObservationSim.Instrument.data.sls_conf': ['*.conf', '*.fits'],
'ObservationSim.Instrument.data.flatCube': ['*.fits'],
'Catalog.data': ['*.fits','*.so'],
'ObservationSim.Config.Header':['*.fits','*.lst'],
'ObservationSim.Straylight.data': ['*.dat'],
'ObservationSim.Straylight.data.sky': ['*.dat'],
'ObservationSim.Straylight.lib': ['*'],
},
python_requires=">=3.11", # Python版本要求
install_requires=requirements,
ext_modules = cythonize(extensions) + df_module + cti_module,
cmdclass={'build_ext': build_ext}
)
setup(name='csst_msc_sim',
version='3.0.0',
packages=find_packages(),
# install_requires=[
# # 'numpy>=1.18.5',
# # 'galsim>=2.2.4',
# # 'pyyaml>=5.3.1',
# # 'astropy>=4.0.1',
# # 'scipy>=1.5.0',
# # 'mpi4py>=3.0.3',
# # 'sep>=1.0.3',
# # 'healpy>=1.14.0',
# # 'h5py>=2.10.0',
# # 'Cython>=0.29.21',
# # 'numba>=0.50.1'
# ],
package_data={
'ObservationSim.Astrometry.lib': ['libshao.so'],
'ObservationSim.Instrument.Chip.libBF': ['libmoduleBF.so'],
'ObservationSim.Instrument.Chip.libCTI': ['libmoduleCTI.so'],
'ObservationSim.MockObject.data': ['*.dat'],
'ObservationSim.MockObject.data.led': ['*.fits'],
'ObservationSim.Instrument.data': ['*.txt', '*.dat', '*.json'],
'ObservationSim.Instrument.data.field_distortion': ['*.pickle'],
'ObservationSim.Instrument.data.ccd': ['*.txt', '*.json'],
'ObservationSim.Instrument.data.filters': ['*.txt', '*.list', '*.dat'],
'ObservationSim.Instrument.data.throughputs': ['*.txt', '*.dat'],
'ObservationSim.Instrument.data.sls_conf': ['*.conf', '*.fits'],
'ObservationSim.Instrument.data.flatCube': ['*.fits'],
'Catalog.data': ['*.fits', '*.so'],
'ObservationSim.Config.Header': ['*.fits', '*.lst'],
'ObservationSim.Straylight.data': ['*.dat'],
'ObservationSim.Straylight.data.sky': ['*.dat'],
'ObservationSim.Straylight.lib': ['*'],
},
python_requires=">=3.11", # Python版本要求
install_requires=requirements,
ext_modules=cythonize(extensions) + df_module + cti_module,
cmdclass={'build_ext': build_ext}
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment