From 2009f5771726c41bfd5d645941d721b80843c868 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Mon, 24 Jun 2019 18:57:55 +0200 Subject: [PATCH 1/9] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0518f45b..bc088b42 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -VERSION = "0.11" +VERSION = "1.0" setup( name="builder", From 9028f7455b4243cb2645b746213d7c6652e80cfb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 7 Jul 2019 11:50:44 +0200 Subject: [PATCH 2/9] Bump cython from 0.29.10 to 0.29.11 (#25) Bumps [cython](https://github.com/cython/cython) from 0.29.10 to 0.29.11. - [Release notes](https://github.com/cython/cython/releases) - [Changelog](https://github.com/cython/cython/blob/master/CHANGES.rst) - [Commits](https://github.com/cython/cython/compare/0.29.10...0.29.11) Signed-off-by: dependabot-preview[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b4a2fed2..be126372 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ click==7.0 click-pathlib==2019.6.13.1 requests==2.22.0 -Cython==0.29.10 +Cython==0.29.11 wheel==0.33.4 From 2d1f9343146572e5db80f668fc692a43ebc743af Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2019 14:20:42 +0200 Subject: [PATCH 3/9] Bump cython from 0.29.11 to 0.29.12 (#26) Bumps [cython](https://github.com/cython/cython) from 0.29.11 to 0.29.12. - [Release notes](https://github.com/cython/cython/releases) - [Changelog](https://github.com/cython/cython/blob/master/CHANGES.rst) - [Commits](https://github.com/cython/cython/compare/0.29.11...0.29.12) Signed-off-by: dependabot-preview[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index be126372..2c02026c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ click==7.0 click-pathlib==2019.6.13.1 requests==2.22.0 -Cython==0.29.11 +Cython==0.29.12 wheel==0.33.4 From 82f9698b0d8622299564be40e08d17ae6e10b783 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 11 Jul 2019 19:09:20 +0200 Subject: [PATCH 4/9] Bump flake8 from 3.7.7 to 3.7.8 (#27) Bumps [flake8](https://gitlab.com/pycqa/flake8) from 3.7.7 to 3.7.8. - [Release notes](https://gitlab.com/pycqa/flake8/tags) - [Commits](https://gitlab.com/pycqa/flake8/compare/3.7.7...3.7.8) Signed-off-by: dependabot-preview[bot] --- requirements_tests.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_tests.txt b/requirements_tests.txt index e8f840d5..fc700a85 100644 --- a/requirements_tests.txt +++ b/requirements_tests.txt @@ -1,2 +1,2 @@ -flake8==3.7.7 +flake8==3.7.8 pylint==2.3.1 From 36c37d569c2ce3237a583316bb10a25c0bfbbeb5 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 11 Jul 2019 19:12:40 +0200 Subject: [PATCH 5/9] Remove platform from name (#28) --- builder/__main__.py | 3 ++- builder/utils.py | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/builder/__main__.py b/builder/__main__.py index 4924285c..0d3dde06 100644 --- a/builder/__main__.py +++ b/builder/__main__.py @@ -18,7 +18,7 @@ extract_packages, ) from builder.upload import run_upload -from builder.utils import check_url +from builder.utils import check_url, fix_wheels_name @click.command("builder") @@ -84,6 +84,7 @@ def builder(apk, index, requirement, upload, remote, requirement_diff, single, l except CalledProcessError: exit_code = 109 + fix_wheels_name(output) run_upload(upload, output, remote) sys.exit(exit_code) diff --git a/builder/utils.py b/builder/utils.py index 276ad15c..e58cd158 100644 --- a/builder/utils.py +++ b/builder/utils.py @@ -1,9 +1,12 @@ """Some utils for builder.""" from pathlib import Path import os +import re import requests +RE_WHEEL_PLATFORM = re.compile(r"^(?P.*-)linux_\w+\.whl$") + def alpine_version() -> str: """Return alpine version for index server.""" @@ -21,3 +24,12 @@ def check_url(url: str) -> None: """Check if url is responsible.""" response = requests.get(url, timeout=10) response.raise_for_status() + + +def fix_wheels_name(wheels_folder: Path) -> None: + """Remove platform tag from filename.""" + for package in wheels_folder.glob("*.whl"): + match = RE_WHEEL_PLATFORM.match(package.name) + if not match: + continue + package.rename(Path(package.parent, f"{match.group('name')}any.whl")) From 02e398d3fffba10609fb62fd5daaaca32dcc18f3 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 11 Jul 2019 17:24:29 +0000 Subject: [PATCH 6/9] Fix dockerfile build --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bb1e141e..4e8cd803 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,8 @@ RUN apk add --no-cache \ openssh-client \ && apk add --no-cache --virtual .build-dependencies \ build-base \ - && pip3 install --no-cache-dir --find-links "https://wheels.home-assistant.io/alpine-$(cut -d '.' -f 1-2 < /etc/alpine-release)/${BUILD_ARCH}/" \ + && pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links \ + "https://wheels.home-assistant.io/alpine-$(cut -d '.' -f 1-2 < /etc/alpine-release)/${BUILD_ARCH}/" \ -r /usr/src/requirements.txt \ && rm -f /usr/src/requirements.txt \ && apk del .build-dependencies From ca04dc6a93d5e99d13f1a1448092c6debf2006b5 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 11 Jul 2019 19:41:42 +0200 Subject: [PATCH 7/9] Fix regex and add cp (#29) --- builder/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/utils.py b/builder/utils.py index e58cd158..af02db12 100644 --- a/builder/utils.py +++ b/builder/utils.py @@ -5,7 +5,7 @@ import requests -RE_WHEEL_PLATFORM = re.compile(r"^(?P.*-)linux_\w+\.whl$") +RE_WHEEL_PLATFORM = re.compile(r"^(?P.*-)cp\d{2}m-linux_\w+\.whl$") def alpine_version() -> str: @@ -32,4 +32,4 @@ def fix_wheels_name(wheels_folder: Path) -> None: match = RE_WHEEL_PLATFORM.match(package.name) if not match: continue - package.rename(Path(package.parent, f"{match.group('name')}any.whl")) + package.rename(Path(package.parent, f"{match.group('name')}none-any.whl")) From ec954777008c2cd0c0ac9ec29807087c19757199 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 11 Jul 2019 20:31:20 +0200 Subject: [PATCH 8/9] Update Dockerfile --- Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4e8cd803..b3098977 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,13 +9,10 @@ COPY requirements.txt /usr/src/ RUN apk add --no-cache \ rsync \ openssh-client \ - && apk add --no-cache --virtual .build-dependencies \ - build-base \ && pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links \ "https://wheels.home-assistant.io/alpine-$(cut -d '.' -f 1-2 < /etc/alpine-release)/${BUILD_ARCH}/" \ -r /usr/src/requirements.txt \ - && rm -f /usr/src/requirements.txt \ - && apk del .build-dependencies + && rm -f /usr/src/requirements.txt # Install builder COPY . /usr/src/builder/ From a92165f1577fa326a20c56f7027d9d6942922ba9 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 11 Jul 2019 19:55:27 +0000 Subject: [PATCH 9/9] Fix naming --- builder/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/__main__.py b/builder/__main__.py index 0d3dde06..cc7a8233 100644 --- a/builder/__main__.py +++ b/builder/__main__.py @@ -84,7 +84,7 @@ def builder(apk, index, requirement, upload, remote, requirement_diff, single, l except CalledProcessError: exit_code = 109 - fix_wheels_name(output) + fix_wheels_name(wheels_dir) run_upload(upload, output, remote) sys.exit(exit_code)