我在我的setup.py
...
setup(name='pyfoo',
version="1.0.2",
description='Example for stack overflow',
url='http://stackoverflow.com/',
author='David Michael Pennington',
author_email='mike /|at|\ pennington.net',
license='GPL',
platforms='any',
keywords='Stack Overflow Example',
entry_points = "",
long_description=read('README.rst'),
include_package_data=True, # Checks MANIFEST.in for explicit rules
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
packages=find_packages(),
use_2to3=True,
zip_safe=False,
setup_requires=["setuptools_hg"],
我有一个doc/
目录,由于其中包含的图像数量而变得庞大;这意味着我的大小sdist
正在增长超过 500kB。原来我有这个在我的MANIFEST.in
...
include LICENSE CHANGES README.rst requirements.txt
recursive-exclude * __pycache__
recursive-exclude * *.pyc
recursive-exclude * *.pyo
recursive-exclude * *.orig
为了排除我的 doc 目录,我唯一要做的就是MANIFEST.in
...底部的这一行
prune doc*
使用prune doc*
突然doc/
从压缩包中删除了我的所有目录sdist
。所以,看起来你只需要在MANIFEST.in
文件中使用它......
prune tests*