vnpy / vnpy_excelrtd

VeighNa框架的Excel RTD应用模块
https://www.vnpy.com
MIT License
8 stars 17 forks source link

来自PyXLL作者的建议 #4

Closed vnpy closed 5 months ago

vnpy commented 5 months ago

以下内容来自PyXLL作者的邮件:

Hi!

I'm the founder/developer of PyXLL, and I came across your web page about using PyXLL for real time data from VeighNa here https://www.vnpy.com/docs/cn/excel_rtd.html

I noticed that in your description you do not mention adding your "vnpy_excelrtd" module to the pyxll.cfg file, and without that your module will not be loaded. I believe this could be a problem for some of your users who are not familiar with how PyXLL works.

Rather than have your users configure the pyxll.cfg file to include your module, did you know that you can add entry points to your Python package so that PyXLL will auto-discover it? This is what other packages do so they do not require the user to do any configuration, the user then simply has to pip install the package and PyXLL will find it.

Please see https://www.pyxll.com/docs/userguide/distribution.html#setuptools-entry-points for information about how to do this. For an example of this being used, you can take a look at these packages.

https://github.com/pyxll/pyxll-jupyter https://github.com/pyxll/pyxll-openbb

The first specifies the entry points in the setup.py file, and the second uses the newer pyproject.toml method.

I hope this information is helpful, and please do let me know if anything is not clear or if I can be of any further help.

Kind regards, Tony

计划调整setup.py来完成pyxll模块的自动识别加载。

vnpy commented 5 months ago

PR merged. #5