python - 怎么打包flask资源文件
大家讲道理
大家讲道理 2017-04-17 14:56:24
[Python讨论组]

使用flask写了一个网站、目录结构如图所示

打包程序为:

from distutils.core import setup from setuptools import
find_packages

setup(name='abc',
      version='1.0',
      description='abc Common Distribution',
      author='aaa',
      author_email='aaa',
      url='aaaaa',
      license="GPL",
      packages=find_packages(),
      include_package_data=True,
      py_modules=["manage"], )

运行该程序生成的打包文件tar.gz文件解压打开没有 static文件夹和里面的资源以及tempaltes文件夹和里面的资源,请问需要如何设置打包程序?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

全部回复(1)
迷茫

https://packaging.python.org/en/latest/distributing.html#manifest-in

A “MANIFEST.in” is needed in certain cases where you need to package additional files that python setup.py sdist (or bdist_wheel) don’t automatically include.

For an example, see the MANIFEST.in from the PyPA sample project

For details on writing a MANIFEST.in file, see the The MANIFEST.in template section from the distutils documentation.

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号