我已创建了将在将部署到bluemix的应用程序中使用的包。我使用setup.py
创建了包。如何在bluemix上使用此软件包而无需在PyPI上注册它(仅用于本地使用)。这是setup.py文件
import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "models",
version = "0.0.1",
author = "Arush Goyal",
author_email = "arushgyl@gmail.com",
description = ("Models for complaintResolution"),
license = "BSD",
keywords = "model complaintResolution",
packages=['models', 'tests'],
long_description=read('Readme.md'),
classifiers=[
"Development Status :: 3 - Alpha",
"Topic :: Utilities",
"License :: OSI Approved :: BSD License",
],
)
答案 0 :(得分:1)
尝试在应用根目录中创建vendor
目录并将包放在那里。 buildpack应该直接从那里安装它,因为它被设计为在需要时在断开连接的环境中工作。
有关示例,请参阅https://github.com/cloudfoundry/python-buildpack/tree/master/cf_spec/fixtures/flask_web_app。