私のプロジェクトの1つに次の行がありsetup.py
ます(質問の下部にある完全なスクリプト):
import os
from distutils.core import setup
# ...
setup(
# ...
package_data={
'mesh.binding': ['templates/*'],
'mesh.documentation': ['templates/*'],
},
# ...
)
mesh/binding/templates
これにより、Linux および OS Xの
ディレクトリにの内容がインストールsite-packages/mesh/binding/templates
されますが、Windows では成功しません。 これを Windows で動作させるにはどうすればよいですか?
私はにdistutils
慣れていないので、何か重要なことを忘れていたら許してください。とを使用setuptools 0.6
してpython 2.7
います。
関連ファイル
setup.py
:
import os
from distutils.core import setup
version = '1.0.0'
try:
revision = os.environ['REVISION']
except Exception:
pass
else:
version = revision
packages = []
for root, dirs, files in os.walk('mesh'):
if '__init__.py' in files:
packages.append(root.replace('/', '.'))
setup(
name='mesh',
version=version,
description='A declarative RESTful API framework.',
author='Jordan McCoy',
author_email='mccoy.jordan@gmail.com',
license='BSD',
url='http://github.com/siq/mesh',
packages=packages,
package_data={
'mesh.binding': ['templates/*'],
'mesh.documentation': ['templates/*'],
},
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Code Generators',
'Topic :: Software Development :: Libraries :: Application Frameworks',
'Topic :: Software Development :: Libraries :: Python Modules',
]
)
MANIFEST.in
:
recursive-include mesh/binding/templates *.tmpl
recursive-include mesh/documentation/templates *.tmpl
include LICENSE
include requirements.txt
include *.rst
recursive-include tests *.py
recursive-include examples *.rst *.py
include docs/conf.py docs/Makefile
recursive-include docs *.rst
recursive-include docs/_static *.css
recursive-include docs/_templates *.html