Metadata-Version: 2.1
Name: collectlicense
Version: 0.0.4
Summary: collect-license: Collect license files for packages installed with pip.
Home-page: https://github.com/hamacom2004jp/collect-license
Download-URL: https://github.com/hamacom2004jp/collect-license
Author: hamacom2004jp
Author-email: hamacom2004jp@gmail.com
Maintainer: hamacom2004jp
Maintainer-email: hamacom2004jp@gmail.com
License: MIT
Keywords: LICENSE.txt LICENSE Collect
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# collect-license

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

## 動作確認OS

- `Windows 11 Pro`

## インストール方法

``` cmd or bash
pip install collectlicense
```

## 実行方法

``` cmd or bash
python -m collectlicense --out .licenses --clear
```

## ソースから実行する方法

``` cmd or bash
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にアップするための準備

``` cmd or bash
pip install wheel twine
python setup.py sdist
python setup.py bdist_wheel
```

- pyplのユーザー登録【本番】
  https://pypi.org/account/register/

- pyplのユーザー登録【テスト】
  https://test.pypi.org/account/register/

- それぞれ2要素認証とAPIトークンを登録

- ホームディレクトリに```.pypirc```を作成
``` .pypirc
[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が返ってくる。
``` cmd or bash
twine upload --repository testpypi dist/*
```
- pipコマンドのテスト
``` cmd or bash
pip install -i https://test.pypi.org/simple/ collectlicense
```

