Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Building wheel from source and publishing source on pypi

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

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

評価

難易度
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
フォーク
86
PR マージ指標
30日以内にマージされた PR はありません

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

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

はじめの一歩

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

aws/amazon-redshift-python-driver のほかの issue

aws/amazon-redshift-python-driver の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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