MagicStack / MagicStack/httptools
Guide/Troubleshooting for vendor/build?
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 1.3k
- 派生
- 107
- PR 合并指标
- 30 天内没有已合并 PR
描述
After digging through the source for a while and trying to see if httptools might meet my needs I decided it was time to add a test case to tests/test_parser.py
I was attempting to follow the Development instructions https://github.com/MagicStack/httptools?tab=readme-ov-file#development and got an error during pip install -e .[test].
httptools/parser/parser.c:1260:10: fatal error: llhttp.h: No such file or directory
1260 | #include "llhttp.h"
| ^~~~~~~~~~
compilation terminated.
Ubuntu doesn't have a node-llhttp-dev package and node-llhttp doesn't help; that's about where my C build knowledge ends sadly.
I was so confused until I found the vendor directory with some anemic submodules; apparently the --recursive in the git clone step is kind of important 😉 In my case the alternative solution was git submodule update --init after the fact; whoops!
Then I remembered how desperately modern python's are trying to get rid of setuptools:
(.venv) clayg@ThinkStation:~/Workspace/scratch/httptools$ make
python3 setup.py build_ext --inplace
Traceback (most recent call last):
File "/mnt/c/Users/cgerrard/Workspace/scratch/httptools/setup.py", line 10, in <module>
from setuptools import setup, Extension
ModuleNotFoundError: No module named 'setuptools'
make: *** [Makefile:9: compile] Error 1
... but I eventually got to write my test (surprise: llhttp does NOT allow for non-ascii bytes in header names or values: https://gist.github.com/clayg/174d8e427c4263230b3cdf6591f3365f)
Anyway; would you find it helpful to include some expanded notes/guide/troubleshooting on the build requirements/process (or how to update the vendored submodules?) added to the existing README development section or would it be better to keep that as simple as possible and make a new/different file?
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 README 的开发部分开始,并将其与 setup.py 和 Makefile 中的命令进行比较。检查报告中的 pip install -e .[test] 和 make 路径,然后记录所需的构建步骤、递归 vendor 子模块以及 setuptools 要求。当新贡献者能够按照开发环境设置进行操作且不会遇到所报告的错误时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- c, python
- 领域
- build-system, documentation
- Issue 类型
- 文档
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100