二 Flask Project 实战 三

9 Make the Project Installable

9.1 Describe the Project

setup.py
from setuptools import find_packages,setup

setup(
name='flaskr',
version='1.0.0',
#tell python what package directories to include
packages=find_packages(),
#inclue static data, such as the static and templates
include_package_data=True,
zip_safe=False,
install_requires=[
'flask',],
)

MANIFEST.in

include flaskr/schema.sql
graft flaskr/static
graft flaskr/templates
global-exclude *.pyc

9.2 install the Project

install: pip install -e .
check: pip list

猜你喜欢

转载自blog.51cto.com/12408798/2379335