我正在制作一个程序包,以连接到多个python应用程序的googlecloud,amazon s3和sftp / ftp服务等云服务,我的目的是在Pypi中以LGPL身份发布。
问题是我正在尝试使用setuptools制作dist软件包,到目前为止,我还没有成功。
我正在关注https://packaging.python.org/tutorials/packaging-projects/中的教程
我正在执行命令python3 setup.py sdist bdist_wheel
在我的包裹里。
执行时,我得到了
running sdist
running egg_info
writing cloud_uploader.egg-info/PKG-INFO
writing dependency_links to cloud_uploader.egg-info/dependency_links.txt
writing requirements to cloud_uploader.egg-info/requires.txt
writing top-level names to cloud_uploader.egg-info/top_level.txt
reading manifest file 'cloud_uploader.egg-info/SOURCES.txt'
writing manifest file 'cloud_uploader.egg-info/SOURCES.txt'
running check
creating cloud-uploader-0.1
creating cloud-uploader-0.1/cloud
creating cloud-uploader-0.1/cloud/uploader
creating cloud-uploader-0.1/cloud/uploader/Exceptions
creating cloud-uploader-0.1/cloud/uploader/providers
creating cloud-uploader-0.1/cloud_uploader.egg-info
copying files to cloud-uploader-0.1...
copying README.md -> cloud-uploader-0.1
copying setup.cfg -> cloud-uploader-0.1
copying setup.py -> cloud-uploader-0.1
copying cloud/__init__.py -> cloud-uploader-0.1/cloud
copying cloud/uploader/FileSystem.py -> cloud-uploader-0.1/cloud/uploader
copying cloud/uploader/__init__.py -> cloud-uploader-0.1/cloud/uploader
copying cloud/uploader/Exceptions/SystemExceptions.py -> cloud-uploader-0.1/cloud/uploader/Exceptions
copying cloud/uploader/Exceptions/__init__.py -> cloud-uploader-0.1/cloud/uploader/Exceptions
copying cloud/uploader/providers/AmazonProvider.py -> cloud-uploader-0.1/cloud/uploader/providers
copying cloud/uploader/providers/BaseProvider.py -> cloud-uploader-0.1/cloud/uploader/providers
copying cloud/uploader/providers/FtpProvider.py -> cloud-uploader-0.1/cloud/uploader/providers
copying cloud/uploader/providers/GoogleProvider.py -> cloud-uploader-0.1/cloud/uploader/providers
copying cloud/uploader/providers/SFTPProvider.py -> cloud-uploader-0.1/cloud/uploader/providers
copying cloud/uploader/providers/__init__.py -> cloud-uploader-0.1/cloud/uploader/providers
copying cloud_uploader.egg-info/PKG-INFO -> cloud-uploader-0.1/cloud_uploader.egg-info
copying cloud_uploader.egg-info/SOURCES.txt -> cloud-uploader-0.1/cloud_uploader.egg-info
copying cloud_uploader.egg-info/dependency_links.txt -> cloud-uploader-0.1/cloud_uploader.egg-info
copying cloud_uploader.egg-info/requires.txt -> cloud-uploader-0.1/cloud_uploader.egg-info
copying cloud_uploader.egg-info/top_level.txt -> cloud-uploader-0.1/cloud_uploader.egg-info
Writing cloud-uploader-0.1/setup.cfg
Creating tar archive
removing 'cloud-uploader-0.1' (and everything under it)
running bdist_wheel
running build
running build_py
running build_scripts
error: [Errno 2] No such file or directory: ''
项目的结构是
.
├── build
│ ├── lib
│ │ └── cloud
│ │ ├── __init__.py
│ │ └── uploader
│ │ ├── Exceptions
│ │ │ ├── __init__.py
│ │ │ └── SystemExceptions.py
│ │ ├── FileSystem.py
│ │ ├── __init__.py
│ │ └── providers
│ │ ├── AmazonProvider.py
│ │ ├── BaseProvider.py
│ │ ├── FtpProvider.py
│ │ ├── GoogleProvider.py
│ │ ├── __init__.py
│ │ └── SFTPProvider.py
│ └── scripts-3.6
├── cloud
│ ├── __init__.py
│ └── uploader
│ ├── configuration
│ │ ├── ConfigLoader.py
│ │ └── __pycache__
│ │ └── ConfigLoader.cpython-36.pyc
│ ├── Exceptions
│ │ ├── __init__.py
│ │ ├── __pycache__
│ │ │ ├── __init__.cpython-36.pyc
│ │ │ └── SystemExceptions.cpython-36.pyc
│ │ └── SystemExceptions.py
│ ├── FileSystem.py
│ ├── __init__.py
│ └── providers
│ ├── AmazonProvider.py
│ ├── BaseProvider.py
│ ├── FtpProvider.py
│ ├── FtpProvider.pyc
│ ├── GoogleProvider.py
│ ├── __init__.py
│ ├── __pycache__
│ │ ├── AmazonProvider.cpython-36.pyc
│ │ ├── BaseProvider.cpython-36.pyc
│ │ ├── FtpProvider.cpython-36.pyc
│ │ ├── GoogleProvider.cpython-36.pyc
│ │ ├── __init__.cpython-36.pyc
│ │ └── SFTPProvider.cpython-36.pyc
│ └── SFTPProvider.py
├── cloud_uploader.egg-info
│ ├── dependency_links.txt
│ ├── PKG-INFO
│ ├── requires.txt
│ ├── SOURCES.txt
│ └── top_level.txt
├── dist
│ └── cloud-uploader-0.1.tar.gz
├── README.md
├── setup.cfg
├── setup.py
└── test
如果我尝试使用bitbutket的pip install进行安装
pip install -e git+https://vteran@bitbucket.org/houselandbog/images-uploader@Ftp_Connection_Driver#egg=images_uploader
我知道了
Errno 21 [是目录]和与
相关的回溯直到现在,该仓库都是私有的。但是,如果有人想帮助我,我可以将其公开发布。
谢谢。
答案 0 :(得分:0)
@ vteran93问题与路径有关,也许是打包目录或文件的亲戚路径,请检查安装模块文件
答案 1 :(得分:0)
您需要确保scripts
函数中的setuptools.setup
关键字参数不包含空字符串,即
from setuptools import setup
setup(scripts=[''])
会产生错误:
running build_scripts
error: [Errno 2] No such file or directory: ''