Skip to content

Commit b4cba89

Browse files
committed
prepare for distribution
1 parent 526d1b8 commit b4cba89

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/*.txt
33
/tests/format-support-*/
44
/tests/fixtures/tmp_*
5+
/dist-env/
56

67
__pycache__/
78
*.py[cod]

Makefile

+13-3
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,22 @@ uninstall:
1919
test:
2020
python3 tests/test_icnsutil.py
2121

22+
dist-env:
23+
@echo Creating virtual environment...
24+
@python3 -m venv 'dist-env'
25+
@source dist-env/bin/activate && pip install twine
26+
2227
.PHONY: dist
23-
dist:
24-
@python3 setup.py sdist --formats=tar bdist_wheel \
25-
|| echo '-> you can not do this inside a virtual environment.'
28+
dist: dist-env
29+
[ -z "$${VIRTUAL_ENV}" ] # you can not do this inside a virtual environment.
30+
rm -rf dist
31+
@echo Building...
32+
python3 setup.py sdist bdist_wheel
2633
@echo
2734
rm -rf ./*.egg-info/ ./build/ MANIFEST
35+
@echo Publishing...
36+
@echo "\033[0;31mEnter your PyPI token:\033[0m"
37+
@source dist-env/bin/activate && export TWINE_USERNAME='__token__' && twine upload dist/*
2838

2939
_icns_list.txt:
3040
@echo 'Generate list of system icns files...'

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,10 @@ Note: the CLI `export` command will fail if you run `--convert` without Pillow.
117117
## Help needed
118118

119119
1. Do you have an old macOS version running somewhere?
120-
You can help and identify what file formats / icns types were introduced and when. Download the [format-support-icns.zip](./tests/format-support-icns.zip) file and report back which icons are displayed properly and in which macOS version.
120+
You can help and identify what file formats / icns types were introduced and when. Download the [format-support-icns.zip] file and report back which icons are displayed properly and in which macOS version.
121121
See the [Apple Icon Image](https://en.wikipedia.org/wiki/Apple_Icon_Image) wikipedia article.
122122

123123
2. You can run `make sys-icons-test` and report back whether you find some weird icons that are not handled properly by this library.
124+
125+
[format-support-icns.zip]: https://github.com/relikd/icnsutil/raw/main/tests/format-support-icns.zip
126+

0 commit comments

Comments
 (0)