1

我创建了一个包“honeywell_thermostat”并将其添加到 github。我想通过以下方式将其添加到 pypi:“python setup.py bdist_egg upload --quiet”

看起来该软件包已在 pypi.python.org 上正确安装,但未在任何机器上正确安装。

这是我的 setup.py:

from setuptools import setup

setup(
    name='honeywell_thermostat',
    packages=['honeywell_thermostat'],
    version='1.1.0',
    description='Python API for Honeywell thermostats',
    author='Jordan Thompson',
    author_email='Jordan@ThompCo.com',
    download_url='https://github.com/jorythompson/thermostat',
    url='https://github.com/jorythompson/thermostat',
    license='MIT',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Build Tools',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7'
    ],
    keywords='develoment tools',
    install_requires=[],

)

我的目录结构如下所示:

LICENCE.txt
README.md
setup.cfg
setup.py
[honeywell_thermostat]
  __init__.py
  logging.conf
  main.py
  thermostat.py

设置.cfg:

[metadata]
description-file = README.md

当我在具有 python 版本 2.7.12 的机器上运行命令时:

python setup.py bdist_egg upload --quiet

我得到以下信息:

[jthompson@jrt thermostat]$ python setup.py bdist_egg upload --quiet
running bdist_egg
running egg_info
writing honeywell_thermostat.egg-info\PKG-INFO
writing top-level names to honeywell_thermostat.egg-info\top_level.txt
writing dependency_links to honeywell_thermostat.egg-info\dependency_links.txt
reading manifest file 'honeywell_thermostat.egg-info\SOURCES.txt'
writing manifest file 'honeywell_thermostat.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\honeywell_thermostat
copying build\lib\honeywell_thermostat\main.py -> build\bdist.win-amd64\egg\honeywell_thermostat
copying build\lib\honeywell_thermostat\thermostat.py -> build\bdist.win-amd64\egg\honeywell_thermostat
copying build\lib\honeywell_thermostat\__init__.py -> build\bdist.win-amd64\egg\honeywell_thermostat
byte-compiling build\bdist.win-amd64\egg\honeywell_thermostat\main.py to main.pyc
byte-compiling build\bdist.win-amd64\egg\honeywell_thermostat\thermostat.py to thermostat.pyc
byte-compiling build\bdist.win-amd64\egg\honeywell_thermostat\__init__.py to __init__.pyc
creating build\bdist.win-amd64\egg\EGG-INFO
copying honeywell_thermostat.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying honeywell_thermostat.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying honeywell_thermostat.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying honeywell_thermostat.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
honeywell_thermostat.thermostat: module references __file__
honeywell_thermostat.thermostat: module MAY be using inspect.stack
creating 'dist\honeywell_thermostat-1.1.1-py2.7.egg' and adding 'build\bdist.win-amd64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
running upload
Submitting dist\honeywell_thermostat-1.1.1-py2.7.egg to https://pypi.python.org/pypi
Server response (200): OK

当我尝试在另一台机器上安装包时(运行 python 版本 2.7.12):

pip install honeywell_thermostat   

我明白了:

Collecting honeywell_thermostat
Could not find a version that satisfies the requirement honeywell_thermostat (from versions: )
No matching distribution found for honeywell_thermostat

提前感谢任何人可能有的任何支持或建议

4

0 回答 0