diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7b826d7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2017-2022, 元谷 +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index 0d5098e..fb45ddd 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,8 @@ sxtwl_cpp是参考[寿星天文历](http://www.nongli.net/sxwnl/)并使用C++实 点击[C#安装及事例文档](doc/如何构建.md)阅读文档 + #### C语言用户专享文档 - 注:如有需要显示给其它语言调用的用户,可以使用此版本。目前只提供DLL或者so生成 + 注:如有需要显示给其它语言调用的用户,可以使用此版本。目前只提供静态库的生成。 + 另外,导接的接口可参考 c/sxtwl_c.h 点击[C语言安装及事例文档](doc/如何构建.md)阅读文档 diff --git a/c/sxtwl_c.h b/c/sxtwl_c.h index b6ef340..606a6b5 100644 --- a/c/sxtwl_c.h +++ b/c/sxtwl_c.h @@ -55,6 +55,7 @@ extern "C" } sxtwl_Day; + // 注意返回的sxtwl_Day指针,需要使用sxtwl_freeDay释放 CC_EX_DLL sxtwl_Day* sxtwl_after(sxtwl_Day* day, sxtwl_Day* ret, int day_num); CC_EX_DLL sxtwl_Day* sxtwl_before(sxtwl_Day* day, sxtwl_Day* ret, int day_num); diff --git a/python/MANIFEST.in b/python/MANIFEST.in new file mode 100644 index 0000000..6e8673e --- /dev/null +++ b/python/MANIFEST.in @@ -0,0 +1 @@ +recursive-include src *.h \ No newline at end of file diff --git a/python/setup.py b/python/setup.py index b1ab9e8..06312e8 100644 --- a/python/setup.py +++ b/python/setup.py @@ -67,7 +67,6 @@ sxtwl_module = setuptools.Extension('_sxtwl', - include_dirs=[os.path.abspath("./src"),], sources=[ 'sxtwl_wrap.cxx', 'src/eph.cpp', @@ -75,22 +74,16 @@ 'src/SSQ.cpp', 'src/sxtwl.cpp', 'src/day.cpp', - - 'src/const.h', - 'src/day.h', - 'src/eph.h', - 'src/JD.h', - 'src/SSQ.h', - 'src/sxtwl.h', - 'src/XL.h' ], - extra_compile_args=extra_compile_args, + include_dirs=["./src"], + extra_compile_args=extra_compile_args + ) setuptools.setup( name="sxtwl", - version="2.0.4", + version="2.0.5", author="yuangu", author_email="seantone@126.com", description="sxtwl_cpp warpper for python",