imgs2xl 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,43 @@
1
+ name: Build binary
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ permissions:
7
+ contents: read
8
+
9
+ jobs:
10
+ build:
11
+
12
+ runs-on: macOS-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+ - name: Set up Python 3.9
17
+ uses: actions/setup-python@v3
18
+ with:
19
+ python-version: "3.9"
20
+ - name: Set Tcl/Tk path
21
+ run: |
22
+ version=$(brew info tcl-tk --json | jq -r '.[].installed[].version')
23
+ echo "PATH=/usr/local/Cellar/tcl-tk/$version/bin:$PATH" > $GITHUB_ENV
24
+ echo "LDFLAGS=-L/usr/local/Cellar/tcl-tk/$version/lib" >> $GITHUB_ENV
25
+ echo "CPPFLAGS=-I/usr/local/Cellar/tcl-tk/$version/include" >> $GITHUB_ENV
26
+ echo "TCL_LIBRARY=/usr/local/Cellar/tcl-tk/$version" >> $GITHUB_ENV
27
+ echo "TK_LIBRARY=/usr/local/Cellar/tcl-tk/$version" >> $GITHUB_ENV
28
+ - name: Install uv
29
+ uses: astral-sh/setup-uv@v5
30
+
31
+ - name: install packages
32
+ run: uv sync --all-extras
33
+
34
+ - name: Build with nuitka
35
+ run: |
36
+ uv run nuitka --assume-yes-for-downloads --standalone --enable-plugin=tk-inter --enable-plugin=numpy --macos-create-app-bundle imgs2xl/gui.py
37
+ tar cvfz gui.app.tgz gui.app/*
38
+
39
+ - name: save dist
40
+ uses: actions/upload-artifact@v2
41
+ with:
42
+ name: gui.app.tgz
43
+ path: ./gui.app.tgz
@@ -0,0 +1,47 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*" # v0.1.0 などのタグがプッシュされたときに実行
7
+
8
+ jobs:
9
+ pypi-publish:
10
+ name: Upload release to PyPI
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ contents: read
14
+ id-token: write # OIDC認証に必須
15
+
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: "3.11"
24
+
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@v5
27
+
28
+ - name: Install dependencies
29
+ run: uv sync --all-extras
30
+
31
+ - name: Set version from tag
32
+ run: |
33
+ # タグ名を取得 (例: refs/tags/v0.1.2 -> 0.1.2)
34
+ TAG_NAME=${GITHUB_REF#refs/tags/v}
35
+ echo "Version from tag: $TAG_NAME"
36
+
37
+ # imgs2xl/__init__.pyの __version__ 行を置換
38
+ sed -i "s/^__version__ = .*/__version__ = '$TAG_NAME'/" imgs2xl/__init__.py
39
+
40
+ # 確認用
41
+ grep "^__version__ =" imgs2xl/__init__.py
42
+
43
+ - name: Build package
44
+ run: uv build
45
+
46
+ - name: Publish to PyPI
47
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,139 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+ *.build/
30
+ *.dist/
31
+ *.app/
32
+
33
+ # PyInstaller
34
+ # Usually these files are written by a python script from a template
35
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
36
+ *.manifest
37
+ *.spec
38
+
39
+ # Installer logs
40
+ pip-log.txt
41
+ pip-delete-this-directory.txt
42
+
43
+ # Unit test / coverage reports
44
+ htmlcov/
45
+ .tox/
46
+ .nox/
47
+ .coverage
48
+ .coverage.*
49
+ .cache
50
+ nosetests.xml
51
+ coverage.xml
52
+ *.cover
53
+ *.py,cover
54
+ .hypothesis/
55
+ .pytest_cache/
56
+
57
+ # Translations
58
+ *.mo
59
+ *.pot
60
+
61
+ # Django stuff:
62
+ *.log
63
+ local_settings.py
64
+ db.sqlite3
65
+ db.sqlite3-journal
66
+
67
+ # Flask stuff:
68
+ instance/
69
+ .webassets-cache
70
+
71
+ # Scrapy stuff:
72
+ .scrapy
73
+
74
+ # Sphinx documentation
75
+ docs/_build/
76
+
77
+ # PyBuilder
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # IPython
84
+ profile_default/
85
+ ipython_config.py
86
+
87
+ # pyenv
88
+ .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
98
+ __pypackages__/
99
+
100
+ # Celery stuff
101
+ celerybeat-schedule
102
+ celerybeat.pid
103
+
104
+ # SageMath parsed files
105
+ *.sage.py
106
+
107
+ # Environments
108
+ .env
109
+ .venv
110
+ env/
111
+ venv/
112
+ ENV/
113
+ env.bak/
114
+ venv.bak/
115
+
116
+ # Spyder project settings
117
+ .spyderproject
118
+ .spyproject
119
+
120
+ # Rope project settings
121
+ .ropeproject
122
+
123
+ # mkdocs documentation
124
+ /site
125
+
126
+ # mypy
127
+ .mypy_cache/
128
+ .dmypy.app
129
+ dmypy.json
130
+
131
+ # Pyre type checker
132
+ .pyre/
133
+
134
+ # VSCode
135
+ .vscode/settings.json
136
+ .vscode/launch.json
137
+ hoge.json
138
+ cover4youtube.png
139
+ work/
imgs2xl-0.2.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 T. Fujiba
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
imgs2xl-0.2.1/Makefile ADDED
@@ -0,0 +1,23 @@
1
+ # .envファイルがあれば読み込む
2
+ ifneq (,$(wildcard .env))
3
+ include .env
4
+ export
5
+ endif
6
+
7
+ .PHONY: build publish-test publish clean
8
+
9
+ build:
10
+ uv build
11
+
12
+ # TestPyPIへのアップロード
13
+ # 環境変数 TEST_PYPI_TOKEN を使用
14
+ publish-test: build
15
+ uv publish --publish-url https://test.pypi.org/legacy/ --token $(TEST_PYPI_TOKEN) dist/*
16
+
17
+ # 本番PyPIへのアップロード
18
+ # 環境変数 PYPI_TOKEN を使用
19
+ publish: build
20
+ uv publish --token $(PYPI_TOKEN) dist/*
21
+
22
+ clean:
23
+ rm -rf dist/ build/ ./*.egg-info