2015-04-29 70 views
4

你好老鄉程序員,沒有在所有發行版中發現,即使我最近出版了包

所以,最近我一直在做一個項目,在我的工作,我們要開源。這是名爲django-push-notifications-manager的軟件包(是的,我知道這是一個不尋常的長名字)。

所以我已經做了登記和包的上傳,但由於某些原因,種類的pip install django-push-notifications-manager將無法​​正常工作,並會給出錯誤:

Downloading/unpacking django-push-notifications-manager 
    Could not find any downloads that satisfy the requirement django-push-notifications-manager 
Cleaning up... 
No distributions at all found for django-push-notifications-manager 
Storing debug log for failure in /Users/pauloostenrijk/.pip/pip.log 

所以我一直沒能解決它通過刪除和替換軟件包,將其刪除,製作新版本。他們都沒有工作。

我想你們想知道我的setup.py了,所以特此:

#!/usr/bin/env python 
# -*- coding: utf-8 -*- 

import os 
import sys 

import push_notifications 


def get_packages(package): 
    """ 
    Return root package and all sub-packages. 
    """ 
    return [dirpath 
      for dirpath, dirnames, filenames in os.walk(package) 
      if os.path.exists(os.path.join(dirpath, '__init__.py'))] 

try: 
    from setuptools import setup 
except ImportError: 
    from distutils.core import setup 

version = push_notifications.__version__ 

if sys.argv[-1] == 'publish': 
    os.system('python setup.py sdist upload') 
    print("You probably want to also tag the version now:") 
    print(" git tag -a %s -m 'version %s'" % (version, version)) 
    print(" git push --tags") 
    sys.exit() 

readme = open('README.rst').read() 

setup(
    name='django-push-notifications-manager', 
    version=version, 
    description="""A plug and play package to handle push devices and push notifications for services such as ZeroPush and Urban Airship""", 
    long_description=readme, 
    author='Paul Oostenrijk', 
    author_email='[email protected]', 
    url='https://github.com/glemmaPaul/django-push-notifications-manager', 
    packages=get_packages('push_notifications'), 
    include_package_data=True, 
    install_requires=[ 
     'django>=1.5.1', 
     'requests>=2.5.1' 
    ], 
    license="BSD", 
    zip_safe=False, 
    keywords='django-push-notifications-manager', 
    classifiers=[ 
     'Development Status :: 2 - Pre-Alpha', 
     'Framework :: Django', 
     'Intended Audience :: Developers', 
     'License :: OSI Approved :: BSD License', 
     'Natural Language :: English', 
     'Programming Language :: Python :: 2', 
     'Programming Language :: Python :: 2.6', 
     'Programming Language :: Python :: 2.7', 
     'Programming Language :: Python :: 3', 
     'Programming Language :: Python :: 3.3', 
    ], 
) 

任何希望你們的可以幫助我!在此先感謝:)

+0

如果我用'pip search django-push-notifications-manager'搜索你的軟件包,pip可以正確找到它。但是,如果我嘗試使用'pip安裝django-push-notifications-manager'來安裝它,我會得到和你一樣的錯誤。也許它是'sdist upload'的問題? – agconti

回答

0

所以花了很長時間的嘗試和搞清楚我終於找到了問題。

別看怪我,但顯然PyPI將有一個名爲django-push-notifications-manager的問題,我覺得可以有2個原因:

  • 名稱的長度
  • 具有在2個破折號名字是最大的

我希望沒有人會得到這個問題,這是頭破解!

謝謝你的時間!

相關問題