How to include license file in setup.py script?

前端 未结 5 1896
陌清茗
陌清茗 2021-02-01 14:55

I have written a Python extension module in C++. I plan to distribute the module with setuptools. There will be binary distributions for 32- and 64-bit Windows (built with

5条回答
  •  自闭症患者
    2021-02-01 15:33

    You have to move the LICENSE.txt file into the package directory for your project. It cannot reside the top level. Python directories get deployed, not the deployment artifact. If you create a python package, that package actually contains a number of subpackages. Each subpackage must contain ALL the files relevant to deployment.

    Do not use data_files as it will actually distribute the files as a separate package. (I've heard package_files works, but I have yet to see a working example to do this).

提交回复
热议问题