我需要在Github倉庫上傳我的Python庫,并嘗試用
安裝它。pip安裝我的資源庫名稱
我怎樣才能做到這一點?
注意:我把setup.py、Licence.txt和Manifest.in檔案加到
它正在安裝唯一的資訊檔案,這是資源庫。 https://github.com/zieadshabkalieh/oauth2clientz
uj5u.com熱心網友回復:
通過這種方式,你可以從Github資源庫安裝python包:
pip install "git https://github.com/your_repository_name"
uj5u.com熱心網友回復:
你需要設定GitHub動作。這里有一些檔案。
。特別是你可能需要一些看起來像:
的東西。name: Python application
on:
推動。
分支。[ master ]
pull_request:
分支。[ 主目錄 ]
作業。
構建。
運行于:ubuntu-latest
步驟。
- 使用: actions/checkout@v2
- 名稱。Set up Python 3.9。
使用: actions/setup-python@v2
with:
python-version: 3.9。
- 名稱:安裝依賴項
運行。|
python -m pip install --upgrade pip
pip安裝flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
如果你想上傳到PyPi(即讓你的包pip package-name install-able),那就有點復雜了:
- 設定一個PyPi賬戶。
pip install wheel twine,- 在你的專案的根部運行
python setup.py sdist bdist_wheel python -m twine upload "dist/*"。
- 認證,然后你就完成了。
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/329874.html
標籤:
上一篇:如何使用githubapi列出一個目錄下的所有檔案名?
下一篇:在Windows上無法識別評估
