Building wheel from source and publishing source on pypi
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 停滯
- 技術堆疊
- python
- 領域
- build-system
研究方向
檢查 setup.py 和 MANIFEST.in,然後在重現步驟中執行提供的 python -m build --sdist 和 pip wheel 指令。確認產生的原始碼封存檔包含中繼資料產生期間所需的相依性檔案,且 pip wheel 能夠成功完成。
由索引模型根據 Issue 內容生成。
描述
Python version
3.11
Problem description
We try to build wheels from source (and not use provided wheels).
pip uninstall redshift-connector -y && pip install --no-binary :all: redshift-connector==2.1.3 --index-url https://pypi.python.org/simple
ERROR: Could not find a version that satisfies the requirement redshift-connector==2.1.3 (from versions: none)
ERROR: No matching distribution found for redshift-connector==2.1.3
First problem is that https://pypi.org/project/redshift-connector/#files does not contain source distribution.
When trying to build it locally (the source distribution from git:
python -m build --sdist
pip wheel dist/redshift_connector-2.1.3.tar.gz
we get:
(.venv) ➜ amazon-redshift-python-driver git:(master) ✗ pip wheel dist/redshift_connector-2.1.3.tar.gz
Processing ./dist/redshift_connector-2.1.3.tar.gz
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/sj/1swnwb8n6tb_3cnl8zq6wgjh0000gn/T/pip-req-build-jhbghmqn/setup.py", line 107, in <module>
install_requires=open("requirements.txt").read().strip().split("\n"),
^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
Adding to MANIFEST.in:
include requirements.txt
Solve the problem of building from source tar.gz.
Reproduction code
git clone https://github.com/aws/amazon-redshift-python-driver.git
cd amazon-redshift-python-driver
python3.11 -m venv .venv
source .venv/bin/activate
pip install wheel build
python -m build --sdist
pip wheel dist/redshift_connector-2.1.3.tar.gz
- 主要語言
- Python
- 星號
- 220
- 分支
- 89
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
aws/amazon-redshift-python-driver 的其他 Issue
-
docs: client_protocol_version missing from Connection Parameters table可能已有人在做 @reginaldalfret 於 10 天前認領。 未關閉
難度 1/5 1-3 小時 新手友好度 74/100
-
難度 4/5 3-5 天 新手友好度 30/100
aws/amazon-redshift-python-driver#268 · 2 個 reaction ·
-
難度 4/5 3-5 天 新手友好度 35/100
-
難度 5/5 一週以上 新手友好度 35/100
aws/amazon-redshift-python-driver#265 · 1 則留言 · 4 個 reaction ·
-
難度 3/5 1-2 天 新手友好度 45/100
查看 aws/amazon-redshift-python-driver 的全部 Issue
相似的 Issue
-
難度 1/5 1-3 小時 新手友好度 88/100
gradio-app/gradio#13964 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 93/100
BSData/horus-heresy-3rd-edition#3232 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
jbacalso24/mimry#123 ·
維護者通常 1 天內回覆
-
p:3-mid pydanty:bug pydanty:is-working
難度 2/5 1-3 小時 新手友好度 76/100
pydantic/pydantic-ai#10153 · 1 則留言 ·
維護者通常 1 天內回覆
-
good first issue priority: medium size: S testing
難度 2/5 1-3 小時 新手友好度 85/100
cubrid-lab/cubrid-cookbook-python#316 ·
維護者通常 1 天內回覆