简单的setup.py看似破碎了

时间:2011-07-24 21:35:13

标签: python setuptools setup.py

在运行Python 2.7的Windows 7上,python setup.py install安装python-money,但不安装附带的money.django软件包。

可以找到setup.py文件here。为方便起见,我将它包含在下面:

import os
from setuptools import setup

def read(fname):
        return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(
        name = "python-money",
        version = "0.6",
        author = "Jordan Dimov",
        author_email = "s3x3y1@gmail.com",
        maintainer = "Ben Coughlan",
        maintainer_email = "ben.coughlan@gmail.com",
        description = ("Data classes to represent Money and Currency types"),
        license = "BSD",
        keywords = "money currency",
        url = "http://code.google.com/p/python-money",
        packages = ['money', 'money.django'],
        long_description = read('README.txt'),
        classifiers = [
                "Development Status :: 4 - Beta",
                "Environment :: Plugins",
                "Environment :: Other Environment",
                "Framework :: Django",
                "Operating System :: OS Independent",
                "Intended Audience :: Developers",
                "Intended Audience :: Financial and Insurance Industry",
                "License :: OSI Approved :: BSD License",
                "Programming Language :: Python",
                "Topic :: Office/Business :: Financial",
        ]
)

1 个答案:

答案 0 :(得分:1)

使用packages = find_packages()。它应该自动拿起你的包裹。您甚至可以运行find_packages()并将其输出复制粘贴到setup.py - 这样您就会知道自己做错了什么。

http://peak.telecommunity.com/DevCenter/setuptools#using-find-packages