私は最近これを自分で発見しました。 "paster create"は--configコマンドライン引数をとります。これは、使用する変数を含むファイルにすることができます。例えば
:私はconfigというbobsetup.cfgからボブと呼ばれるパッケージを作成します
。設定ファイルは含まれています:
$ paster create -t basic_package --config=bobsetup.cfg bob
Selected and implied templates:
PasteScript#basic_package A basic setuptools-enabled package
Variables:
author: Fred Sprocket
author_email: [email protected]
created: 2011-09-07T14:47:27
description: Bob's magic code
dot: .
egg: bob
egg_plugins: []
keywords: Python
license_name:
long_description: Bob's super useful code base
package: bob
plus: +
project: bob
url: http://example.com
version: 1.0
zip_safe: False
Creating template basic_package
Creating directory ./bob
Recursing into +package+
Creating ./bob/bob/
Copying __init__.py to ./bob/bob/__init__.py
Copying setup.cfg to ./bob/setup.cfg
Copying setup.py_tmpl to ./bob/setup.py
Running /Users/omul/.virtualenvs/im.analytics/bin/python setup.py egg_info
$
私はボブ/ setup.pyをチェックする場合は、この変数を設定している見ることができます。次のように私は、これを使用することができ
[pastescript]
created = 2011-09-07T14:47:27
egg_plugins__eval__ = []
plus = +
egg = bob
dot = .
description = Bob's magic code
license_name =
zip_safe__eval__ = False
keywords = Python
long_description = Bob's super useful code base
author = Fred Sprocket
author_email = [email protected]
url = http://example.com
version = 1.0.0
を。 cat setup.py:
from setuptools import setup, find_packages
import sys, os
version = '1.0'
setup(name='bob',
version=version,
description="Bob's magic code",
long_description="""\
Bob's super useful code base""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='Python',
author='Fred Sprocket',
author_email='[email protected]',
url='http://example.com',
license='',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
zip_safe=False,
install_requires=[
# -*- Extra requirements: -*-
],
entry_points="""
# -*- Entry points: -*-
""",
)
awesome、thanks! – DrakeAnderson