Skip to content

Commit 85e91ca

Browse files
committed
Fix build
1 parent 2e53016 commit 85e91ca

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

.github/workflows/linux.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ jobs:
4141
/opt/python/cp312-cp312/bin/python tests/test_color_gen.py test_image.jpg 1
4242
4343
/opt/python/cp39-cp39/bin/pip install auditwheel
44-
mp dist/*.tar.gz wheelhouse/
44+
mkdir wheelhouse
45+
mv dist/*.tar.gz wheelhouse/
4546
auditwheel repair dist/*
47+
echo "Built dists:"
48+
ls wheelhouse
4649
- name: Publish to PyPI
4750
uses: pypa/[email protected]
4851
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')

tests/test_color_gen.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,21 @@
1313
from PIL import Image
1414
rgba_to_hex = lambda rgba: "#{:02X}{:02X}{:02X}{:02X}".format(*map(round, rgba))
1515

16-
if not os.path.isfile(sys.argv[1]):
16+
FILENAME = sys.argv[1]
17+
18+
if not os.path.isfile(FILENAME):
1719
print("Downloading test image file: ")
18-
with open(sys.argv[1], "wb") as file:
20+
with open(FILENAME, "wb") as file:
1921
file.write(
2022
requests.get(
21-
"https://upload.wikimedia.org/wikipedia/commons/thumb/1/19/"
22-
"Lisse%2C_Netherlands_-_panoramio_%2844%29.jpg/1280px-Lisse%2C_Netherlands_-_panoramio_%2844%29.jpg"
23+
"https://unsplash.com/photos/u9tAl8WR3DI/download?ixid=M3wxMjA3fDB8MXx0b3BpY3x8NnNNVmpUTFNrZVF8fHx8fDJ8fDE3MDUyMDgwNjF8&force=true"
2324
).content)
24-
print("Downloaded!")
25+
print("Downloaded: ", FILENAME, os.path.exists(FILENAME))
2526

2627
console = Console()
2728

2829
start = default_timer()
29-
image = Image.open(sys.argv[1])
30+
image = Image.open(FILENAME)
3031

3132
pixel_len = image.width * image.height
3233
image_data = image.getdata()

0 commit comments

Comments
 (0)