如何通过我的setup.py安装github3.py?

时间:2016-08-31 07:58:22

标签: python setup.py github3.py

我想在我的金字塔应用程序中使用github3.py模块。

在我的开发环境中,我可以通过pip安装github3.py,这很好用。 但我需要将github3.py添加到setup.py进行生产环境,因为我想通过一个命令设置生产环境。 python setup.py install

所以我为我的金字塔应用程序编写了setup.py,如下所示。

from setuptools import setup, find_packages

requires = [
    # add only this module to confirm the problem.
    'github3.py'
    ]

setup(
      ...
      install_requires=requires,
      ...
      )

当我执行install命令时,出现错误。

$ python setup.py install

...
error: The 'uritemplate.py>=0.2.0' distribution was not found and is required by github3.py

我在新的virtualenv上执行了install命令,以确保环境清洁。

我该如何解决?提前谢谢!

ADD:完整的输出在这里。我使用develep参数代替install来获取完整输出。因为当我使用install参数时输出太长。我想在我的新开发环境中安装github3.py。

$ python setup.py develop                                                            
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'message_extractors'
  warnings.warn(msg)
running develop
running egg_info
writing requirements to saleaddirect.egg-info/requires.txt
writing saleaddirect.egg-info/PKG-INFO
writing top-level names to saleaddirect.egg-info/top_level.txt
writing dependency_links to saleaddirect.egg-info/dependency_links.txt
writing entry points to saleaddirect.egg-info/entry_points.txt
reading manifest file 'saleaddirect.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.rst'
warning: no files found matching '*.mak' under directory 'saleaddirect'
warning: no files found matching '*.mako' under directory 'saleaddirect'
warning: no files found matching '*.html' under directory 'saleaddirect'
warning: no files found matching '*.xml' under directory 'saleaddirect'
writing manifest file 'saleaddirect.egg-info/SOURCES.txt'
running build_ext
Creating /home/yazaki/.virtualenvs/test-pyramid/lib/python2.7/site-packages/saleaddirect.egg-link (link to .)
Adding saleaddirect 0.1 to easy-install.pth file

Installed /home/yazaki/work/exsoft.saleaddirect/saleaddirect
Processing dependencies for saleaddirect==0.1
Searching for github3.py
Reading https://pypi.python.org/simple/github3.py/
Best match: github3.py 1.0.0a4
Downloading https://pypi.python.org/packages/e5/8d/b97e44ca548ceb17c33aa8e4c5cc884fa0a11bd88247690c9915fd73ecc4/github3.py-1.0.0a4.tar.gz#md5=a8513584fd3b11746b14e91e00a74960
Processing github3.py-1.0.0a4.tar.gz
Writing /tmp/easy_install-LKvb9U/github3.py-1.0.0a4/setup.cfg
Running github3.py-1.0.0a4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-LKvb9U/github3.py-1.0.0a4/egg-dist-tmp-IfRPcR
no previously-included directories found matching '*.pyc'
no previously-included directories found matching 'docs/_build'
zip_safe flag not set; analyzing archive contents...
Moving github3.py-1.0.0a4-py2.7.egg to /home/yazaki/.virtualenvs/test-pyramid/lib/python2.7/site-packages
Adding github3.py 1.0.0a4 to easy-install.pth file

Installed /home/yazaki/.virtualenvs/test-pyramid/lib/python2.7/site-packages/github3.py-1.0.0a4-py2.7.egg
Searching for uritemplate.py>=0.2.0
Reading https://pypi.python.org/simple/uritemplate.py/
Best match: uritemplate.py 3.0.2
Downloading https://pypi.python.org/packages/12/97/e12695c7d7710143767022ce931061b4a6b5b19982b20ecf5d71cdde3da1/uritemplate.py-3.0.2.tar.gz#md5=ee63cccbba43851e18f902f86cba0688
Processing uritemplate.py-3.0.2.tar.gz
Writing /tmp/easy_install-eCXkH9/uritemplate.py-3.0.2/setup.cfg
Running uritemplate.py-3.0.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-eCXkH9/uritemplate.py-3.0.2/egg-dist-tmp-ToLyxT
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*.py[cdo]' found anywhere in distribution
warning: no previously-included files matching '__pycache__' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
zip_safe flag not set; analyzing archive contents...
Moving uritemplate-2.0.0-py2.7.egg to /home/yazaki/.virtualenvs/test-pyramid/lib/python2.7/site-packages
Adding uritemplate 2.0.0 to easy-install.pth file

Installed /home/yazaki/.virtualenvs/test-pyramid/lib/python2.7/site-packages/uritemplate-2.0.0-py2.7.egg
error: The 'uritemplate.py>=0.2.0' distribution was not found and is required by github3.py

0 个答案:

没有答案