MagicStack / MagicStack/httptools
Guide/Troubleshooting for vendor/build?
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 1.3k
- Fork
- 107
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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?
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với phần development trong README và so sánh phần này với các lệnh trong setup.py và Makefile. Kiểm tra các đường dẫn pip install -e .[test] và make đã được báo cáo, sau đó ghi lại các bước build bắt buộc, các vendor submodule đệ quy và yêu cầu về setuptools. Công việc được xem là hoàn tất khi một contributor mới có thể thực hiện thiết lập môi trường development mà không gặp các lỗi đã báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- c, python
- Lĩnh vực
- build-system, documentation
- Loại issue
- Tài liệu
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100