我想转移到使用新的GitHub发布为我的软件包。我不知道我的download_url需要成为什么。这个版本是1.3.5,我尝试过releases/tag/1.3.5、archive/1.3.5和archive/1.3.5#egg=v1.3.5的各种化身,但都没有效果。
我的问题是,在阅读PEP 438时,我知道它在寻找simple-history-v1.3.5.EXT ,但我可以强迫setup.py使用特定的url?吗?
from setuptools import find_packages, setup
from simple_history import __version__
base_url = 'https://github.com/pivotal-energy-solutions/django-simple-history'
setup(name='simple_history',
version=__version__,
description='Store Django model history with the ability to revert back to a '
'specific change at any time. This includes capturing request.user',
author='Steven Klass',
author_email='sklass@pivotalenergysolutions.com',
url=base_url,
download_url='{0}/archive/{1}.tar.gz'.format(base_url, __version__),
license='Apache License (2.0)',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development',
],
packages=find_packages(exclude=['tests', 'tests.*']),
package_data={'simple_history': ['static/js/*.js', 'templates/simple_history/*.html']},
include_package_data=True,
zip_safe=False,
requires=['django (>=1.2)', ],
)当我做一个简单的安装,它是说它找到它,但它总是回到1.1版。有人能告诉我我的问题吗。
$ easy_install -vvv simple_history
Searching for simple-history
Reading http://pypi.python.org/simple/simple_history/
Reading https://github.com/pivotal-energy-solutions/django-simple-history
Found link: https://github.com/pivotal-energy-solutions/django-simple-history/archive/master.zip
Found link: https://github.com/pivotal-energy-solutions/django-simple-history/archive/1.3.5.tar.gz
Found link: https://github.com/pivotal-energy-solutions/django-simple-history/archive/v1.3.3.tar.gz
Found link: https://pypi.python.org/packages/source/s/simple_history/simple_history-1.1.tar.gz#md5=b4c4bb2512904d7826a75f58cc9df651
Found link: https://pypi.python.org/packages/source/s/simple_history/simple_history-v1.3.3.tar.gz#md5=1564e23e982553b76a4ed7328fb5b812
Best match: simple-history 1.1发布于 2013-07-13 07:44:03
请提供simple-history-1.3.5.tar.gz作为发布1.3.5的下载;换句话说,'{0}-{1}{2}'.format(packagename, version, ext))。有关setuptools.package_index.interpret_distro_name如何尝试解析url的basename,请参见easy_install。
更新:
换句话说,如果将GitHub上的发布命名为<pypi package>-<version>。如果您只需将download_url更改为
download_url='{0}/releases'.format(base_url)
# or
package_name='simple_history' # define it before setup()
download_url='{0}/archive/{1}-{2}'.format(base_url, package_name, __version__)https://stackoverflow.com/questions/17627343
复制相似问题