我有一个包含大量* .py文件(脚本)的目录和带有* .py文件的子目录。
如何将根目录中的所有* .py文件添加到包中?
现在我的setup.py是
from setuptools import setup, find_packages
setup(
name='my-awesome-helloworld-script', # This is the name of your PyPI-package.
version='0.1', # Update the version number for new releases
scripts=['????????????????????'], # The name of your scipt, and also the command you'll be using for calling it
# Packages
packages=find_packages(),
)
如您所见,我已使用find_packages()
解决了文件夹的附加问题。
但是如何从根目录添加* .py文件?
我使用命令python.exe setup.py sdist
打包。
谢谢!
答案 0 :(得分:0)
解决了代码:
from setuptools import setup, find_packages
pckgs=find_packages()
pckgs.append('.')
setup(
name='my-awesome-helloworld-script', # This is the name of your PyPI-package.
version='0.1', # Update the version number for new releases
# scripts=[''], # The name of your scipt, and also the command you'll be using for calling it
# Packages
packages=pckgs,
)