MagicStack / MagicStack/httptools

Guide/Troubleshooting for vendor/build?

オープン
#120 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
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
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?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

README の開発セクションから始め、setup.py と Makefile のコマンドと比較します。報告されている `pip install -e .[test]` と `make` のパスを確認し、必要な build 手順、再帰的な vendor サブモジュール、setuptools の要件を文書化します。新しいコントリビューターが報告されたエラーに遭遇せずに開発環境のセットアップに従える状態になれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
c, python
領域
build-system, documentation
issue の種類
ドキュメント
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。