简体   繁体   English

如何使用扩展创建项目的本地化版本?

[英]How to use buildout to create localized version of my project?

I am trying to create a localized version of my project. 我正在尝试创建项目的本地化版本。

I started from the following: 我从以下内容开始:

mkdir my
cd my
wget http://svn.zope.org/*checkout*/zc.buildout/trunk/bootstrap/bootstrap.py

After the last command I get the following message: 在执行最后一条命令后,我得到以下消息:

Warning: wildcards not supported in HTTP. 警告:HTTP不支持通配符。 --08:42:17-- http://svn.zope.org/ checkout /zc.buildout/trunk/bootstrap/bootstrap.py => `bootstrap.py' Resolving svn.zope.org... 74.84.203.155 Connecting to svn.zope.org|74.84.203.155|:80... connected. --08:42:17-- http://svn.zope.org/ checkout /zc.buildout/trunk/bootstrap/bootstrap.py =>`bootstrap.py'解决了svn.zope.org ... 74.84。 203.155正在连接至svn.zope.org | 74.84.203.155 |:80...。 HTTP request sent, awaiting response... 200 OK Length: unspecified [text/x-python] HTTP请求已发送,正在等待响应... 200 OK长度:未指定[text / x-python]

 [ <=> ] 2,572 --.--K/s 

08:42:17 (122.64 MB/s) - `bootstrap.py' saved [2572] 08:42:17(122.64 MB / s)-保存了'bootstrap.py'[2572]

You can see there a warning message. 您会看到一条警告消息。 I do not know what it means and if I should wary about it. 我不知道这意味着什么,我是否应该对此保持警惕。 Any way, I tried to continue. 无论如何,我试图继续。

python bootstrap.py init
vi buildout.cfg

In the buildout.cfg I put the following: 在buildout.cfg中,输入以下内容:

[buildout]
parts = sqlite 

[sqlite]
recipe = zc.recipe.egg
eggs = pysqlite
interpreter = mypython

And then I execute: 然后我执行:

./bin/buildout

At that stage I have problems: 在那个阶段,我有问题:

Getting distribution for 'zc.recipe.egg'. 正在获取“ zc.recipe.egg”的发行版。 Got zc.recipe.egg 1.2.2. 得到了zc.recipe.egg 1.2.2。 Installing sqlite. 安装sqlite。 Getting distribution for 'pysqlite'. 获取“ pysqlite”的分发。 In file included from src/module.c:24: src/connection.h:33:21: error: sqlite3.h: No such file or directory In file included from src/module.c:24: src/connection.h:38: error: expected specifier-qualifier-list before 'sqlite3' In file included from src/module.c:25: src/statement.h:37: error: expected specifier-qualifier-list before 'sqlite3' src/module.c: In function 'module_complete': src/module.c:99: warning: implicit declaration of function 'sqlite3_complete' src/module.c: At top level: src/module.c:265: error: 'SQLITE_OK' undeclared here (not in a function) src/module.c:266: error: 'SQLITE_DENY' undeclared here (not in a function) src/module.c:267: error: 'SQLITE_IGNORE' undeclared here (not in a function) src/module.c:268: error: 'SQLITE_CREATE_INDEX' undeclared here (not in a function) src/module.c:269: error: 'SQLITE_CREATE_TABLE' undeclared here (not in a function) src/module.c:270: error: 'SQLITE_CREATE_TEMP_INDEX' undeclared here (not in a function) src/module.c:271: error: 'SQ 在src / module.c:24包含的文件中:src / connection.h:33:21:错误:sqlite3.h:没有这样的文件或目录在src / module.c:24包含的文件中:src / connection.h :38:错误:'sqlite3'之前的预期说明者限定词列表在src / module.c中包含的文件中c:25:src / statement.h:37:错误:'sqlite3'src /模块之前的预期说明者限定词列表.c:在函数'module_complete'中:src / module.c:99:警告:函数'sqlite3_complete'的隐式声明src / module.c:在顶层:src / module.c:265:错误:'SQLITE_OK'未声明此处(不在函数中)src / module.c:266:错误:此处未声明“ SQLITE_DENY”(不在函数中)src / module.c:267:错误:在此处(不在函数中未声明)未声明“ SQLITE_IGNORE” /module.c:268:错误:此处未声明'SQLITE_CREATE_INDEX'(不在函数中)src / module.c:269:错误:此处此处未声明'SQLITE_CREATE_TABLE'(不在函数中)src / module.c:270:错误:此处未声明'SQLITE_CREATE_TEMP_INDEX'(不在函数中)src / module.c:271:错误:'SQ LITE_CREATE_TEMP_TABLE' undeclared here (not in a function) src/module.c:272: error: 'SQLITE_CREATE_TEMP_TRIGGER' undeclared here (not in a function) src/module.c:273: error: 'SQLITE_CREATE_TEMP_VIEW' undeclared here (not in a function) src/module.c:274: error: 'SQLITE_CREATE_TRIGGER' undeclared here (not in a function) src/module.c:275: error: 'SQLITE_CREATE_VIEW' undeclared here (not in a function) src/module.c:276: error: 'SQLITE_DELETE' undeclared here (not in a function) src/module.c:277: error: 'SQLITE_DROP_INDEX' undeclared here (not in a function) src/module.c:278: error: 'SQLITE_DROP_TABLE' undeclared here (not in a function) src/module.c:279: error: 'SQLITE_DROP_TEMP_INDEX' undeclared here (not in a function) src/module.c:280: error: 'SQLITE_DROP_TEMP_TABLE' undeclared here (not in a function) src/module.c:281: error: 'SQLITE_DROP_TEMP_TRIGGER' undeclared here (not in a function) src/module.c:282: error: 'SQLITE_DROP_TEMP_VIEW' undeclared here (not in a function) src/module.c LITE_CREATE_TEMP_TABLE'在这里未声明(不在函数中)src / module.c:272:错误:'SQLITE_CREATE_TEMP_TRIGGER'在这里未声明(不在函数中)src / module.c:273:错误:'SQLITE_CREATE_TEMP_VIEW'在这里未声明(不在一个函数中)函数)src / module.c:274:错误:此处未声明'SQLITE_CREATE_TRIGGER'(不在函数中)src / module.c:275:错误:此处未声明'SQLITE_CREATE_VIEW'(不在函数中)src / module.c: 276:错误:此处未声明“ SQLITE_DELETE”(不在函数中)src / module.c:277:错误:此处未声明“ SQLITE_DROP_INDEX”(不在函数中)src / module.c:278:错误:未声明“ SQLITE_DROP_TABLE”此处(不在函数中)src / module.c:279:错误:此处未声明'SQLITE_DROP_TEMP_INDEX'(不在函数中)src / module.c:280:此处未声明(不在函数中)'SQLITE_DROP_TEMP_TABLE'未声明/module.c:281:错误:此处未声明'SQLITE_DROP_TEMP_TRIGGER'(不在函数中)src / module.c:282:错误此处此处未声明'SQLITE_DROP_TEMP_VIEW'(不在函数中)src / module.c :283: error: 'SQLITE_DROP_TRIGGER' undeclared here (not in a function) src/module.c:284: error: 'SQLITE_DROP_VIEW' undeclared here (not in a function) src/module.c:285: error: 'SQLITE_INSERT' undeclared here (not in a function) src/module.c:286: error: 'SQLITE_PRAGMA' undeclared here (not in a function) src/module.c:287: error: 'SQLITE_READ' undeclared here (not in a function) src/module.c:288: error: 'SQLITE_SELECT' undeclared here (not in a function) src/module.c:289: error: 'SQLITE_TRANSACTION' undeclared here (not in a function) src/module.c:290: error: 'SQLITE_UPDATE' undeclared here (not in a function) src/module.c:291: error: 'SQLITE_ATTACH' undeclared here (not in a function) src/module.c:292: error: 'SQLITE_DETACH' undeclared here (not in a function) src/module.c: In function 'init_sqlite': src/module.c:419: warning: implicit declaration of function 'sqlite3_libversion' src/module.c:419: warning: passing argument 1 of 'PyString_FromString' makes pointer from integer without a :283:错误:此处未声明'SQLITE_DROP_TRIGGER'(不在函数中)src / module.c:284:错误:此处未声明'SQLITE_DROP_VIEW'(此处未在函数中)src / module.c:285:错误:'SQLITE_INSERT'此处未声明(不在函数中)src / module.c:286:错误:此处未声明“ SQLITE_PRAGMA”(不在函数中)src / module.c:287:此处未声明(不在函数中)“ SQLITE_READ” src / module.c:288:错误:此处未声明“ SQLITE_SELECT”(不在函数中)src / module.c:289:错误:此处未声明“ SQLITE_TRANSACTION”(不在函数中)src / module.c:290:错误:此处未声明“ SQLITE_UPDATE”(不在函数中)src / module.c:291:此处未声明错误:“ SQLITE_ATTACH”(不在函数中)src / module.c:292:错误:此处未声明“ SQLITE_DETACH”(不在函数中)src / module.c:在函数'init_sqlite'中:src / module.c:419:警告:函数'sqlite3_libversion'的隐式声明src / module.c:419:警告:传递'PyString_FromString的参数1 '使整数指针不加 cast error: Setup script exited with error: command 'gcc' failed with exit status 1 An error occured when trying to install pysqlite 2.5.5.Look above this message for any errors thatwere output by easy_install. 强制转换错误:安装脚本退出,错误:命令'gcc'失败,退出状态为1尝试安装pysqlite 2.5.5时发生错误。在此消息上方查看easy_install输出的任何错误。 While: Installing sqlite. 时间:安装sqlite。 Getting distribution for 'pysqlite'. 获取“ pysqlite”的分发。 Error: Couldn't install: pysqlite 2.5.5 错误:无法安装:pysqlite 2.5.5

Can anybody tell me, pleas, what these error messages means and how the above problem can be solved? 有人可以告诉我这些错误消息是什么意思,以及如何解决上述问题?

You need install sqlite develop library. 您需要安装sqlite开发库。

In ubuntu or debian, run: 在ubuntu或debian中,运行:

sudo apt-get install libsqlite3-dev

开始安装python绑定之前,需要先安装sqlite。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM