简体   繁体   English

为什么我的非python文件没有打包?

[英]Why are my non-python files not being packaged?

I'm new to packaging in Python. 我是Python打包的新手。 I've tried to specify my non-python files within setup.py's 'scripts' argument, and also specifying the file within MANIFEST.in, however after I package the file using python setup.py build sdist and install using pip, only the files with the .py extension make it to the site-packages/my_package directory. 我尝试在setup.py的'scripts'参数中指定我的非python文件,并在MANIFEST.in中指定该文件,但是在我使用python setup.py build sdist打包文件并使用pip安装后,仅扩展名为.py文件将其添加到site-packages/my_package目录。

Am I missing something? 我想念什么吗?

15 minutes later I find the answer. 15分钟后,我找到了答案。 sdist only includes the *.py files. sdist仅包含*.py文件。 I just changed the command to use bdist_wheel and all the files I needed were included. 我只是将命令更改为使用bdist_wheel ,所有需要的文件都包括在内。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM