Skip to main content

collect-license: Collect license files for packages installed with pip.

Project description

collect-license

pipインストールされたパッケージのライセンスファイルを収集するモジュールです。 pip-licensesを使用します。

動作確認OS

  • Windows 11 Pro

インストール方法

pip install collectlicense

実行方法

python -m collectlicense --out .licenses --clear
  • --out:収集したライセンスファイルの保存先ディレクトリ
  • --clear:--outで指定したディレクトリを削除してから収集する

ソースから実行する方法

git clone https://github.com/hamacom2004jp/collect-license.git
cd collect-license
python -m venv .venv
.venv\Scripts\activate
python.exe -m pip install --upgrade pip
pip install -r requirements.txt
python -m collectlicense
deactivate

pyplにアップするための準備

python setup.py sdist
python setup.py bdist_wheel
[distutils]
index-servers =
  pypi
  testpypi

[pypi]
repository: https://upload.pypi.org/legacy/
username: __token__
password: 本番環境のAPIトークン

[testpypi]
repository: https://test.pypi.org/legacy/
username: __token__
password: テスト環境のAPIトークン
  • テスト環境にアップロード .pyplrcを作っていない場合はコマンド実行時にusernameとpasswordを要求される 成功するとURLが返ってくる。
twine upload --repository testpypi dist/*
  • pipコマンドのテスト
pip install -i https://test.pypi.org/simple/ collectlicense
  • 本番環境にアップロード
twine upload --repository pypi dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collectlicense-0.1.0.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

collectlicense-0.1.0-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page