【发布时间】:2015-07-03 19:13:56
【问题描述】:
嗨,我正在开发一个 python 模块,当我使用 python setup.py sdist bdist_egg 创建安装包时,所有文件都包含在 zip 文件中,但是当我运行 python setup.py install 时,所有文件都被复制,除了静态文件。
完整的项目正在进行中:
https://github.com/efirvida/python-gearbox
我的 setup.py
from setuptools import setup, find_packages
version = '0.1.0a'
setup(
name='python-gearbox',
version=version,
author='Eduardo M. Firvida Donestevez',
packages=find_packages(),
include_data_package=True,
author_email='efirvida@gmail.com',
description='Python library for gear transmission design',
requires=['numpy', 'scipy'],
url='https://github.com/efirvida/python-gearbox',
download_url='https://github.com/efirvida/python-gearbox/archive/master.zip',
keywords=['gearbox', 'gear', 'agma', 'iso', 'gear transmission', 'engineering'],
platforms='any',
license='MIT',
zip_safe=False,
classifiers=['Intended Audience :: Developers',
'Intended Audience :: Manufacturing',
'Intended Audience :: Science/Research',
'Natural Language :: English',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Human Machine Interfaces',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Application Frameworks'
]
)
【问题讨论】:
-
你说的静态文件到底是什么?
-
模块在这个文件夹上有一个文件夹
gearbox\export\templates是3个文件xxx.template 运行安装时这些文件不会复制到模块site-package/<module folder>甚至build文件夹,但它们在python setup.py sdist创建的zip安装文件
标签: python-2.7 setuptools python-module pypi