-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgrade dependencies * fixing python path * adding --break-system-packages when installing python mdules with pip
- Loading branch information
Showing
12 changed files
with
280 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,50 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-ast | ||
- id: debug-statements | ||
- id: fix-byte-order-marker | ||
- id: check-json | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: fix-encoding-pragma | ||
- id: mixed-line-ending | ||
- id: requirements-txt-fixer | ||
- id: trailing-whitespace | ||
- id: mixed-line-ending | ||
args: ['--fix=lf'] | ||
description: Forces to replace line ending by the UNIX 'lf' character | ||
- id: detect-aws-credentials | ||
args: ['--allow-missing-credentials'] | ||
- id: detect-private-key | ||
- repo: https://github.com/myint/autoflake | ||
rev: v2.3.1 | ||
hooks: | ||
- id: autoflake | ||
args: | ||
- --in-place | ||
- --remove-unused-variables | ||
- --remove-all-unused-imports | ||
- repo: https://github.com/hadolint/hadolint | ||
rev: v2.12.0 | ||
hooks: | ||
- id: hadolint-docker | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.8.4 | ||
hooks: | ||
- id: ruff | ||
args: | ||
- '--line-length=120' | ||
- '--fix' | ||
- '--exit-non-zero-on-fix' | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
args: | ||
- '--profile' | ||
- black | ||
- '--filter-files' | ||
- repo: https://github.com/psf/black | ||
rev: 24.10.0 | ||
hooks: | ||
- id: black | ||
args: | ||
- '--line-length=120' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
pre-commit 2.20.0 | ||
pre-commit 4.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
FROM alpine:3.18.8 AS base | ||
FROM alpine:3.21.0 AS base | ||
RUN apk upgrade --available --no-cache --update \ | ||
&& apk add --no-cache --update \ | ||
python3=3.11.8-r1 \ | ||
py3-pip=23.1.2-r0 \ | ||
python3=3.12.8-r1 \ | ||
py3-pip=24.3.1-r0 \ | ||
# Cleanup APK | ||
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/* | ||
|
||
|
||
|
||
# Compiling python modules | ||
FROM base as builder | ||
FROM base AS builder | ||
RUN apk add --no-cache --update \ | ||
g++=12.2.1_git20220924-r10 \ | ||
python3-dev=3.11.8-r1 \ | ||
g++=14.2.0-r4 \ | ||
python3-dev=3.12.8-r1 \ | ||
&& ln -s /usr/include/locale.h /usr/include/xlocale.h | ||
COPY --chown=root:root FloatToHex /FloatToHex | ||
|
||
|
@@ -26,18 +26,18 @@ RUN python3 setup.py install | |
# Building the docker image with already compiled modules | ||
FROM base | ||
LABEL maintainer="Michael Oberdorf IT-Consulting <[email protected]>" | ||
LABEL site.local.program.version="1.0.15" | ||
LABEL site.local.program.version="1.0.16" | ||
|
||
COPY --from=builder /usr/lib/python3.11/site-packages /usr/lib/python3.11/site-packages | ||
COPY --from=builder /usr/lib/python3.12/site-packages /usr/lib/python3.12/site-packages | ||
|
||
RUN apk add --no-cache --update \ | ||
libstdc++=12.2.1_git20220924-r10 \ | ||
py3-wheel=0.40.0-r1 \ | ||
py3-pandas=1.5.3-r1 | ||
libstdc++=14.2.0-r4 \ | ||
py3-wheel=0.43.0-r0 \ | ||
py3-pandas=2.2.3-r0 | ||
|
||
COPY --chown=root:root /src / | ||
|
||
RUN pip3 install --no-cache-dir -r /requirements.txt | ||
RUN pip3 install --no-cache-dir -r /requirements.txt --break-system-packages | ||
|
||
USER 3748:3748 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,28 +4,28 @@ | |
# setup.py install to install the package - needs C compiler (vcvarsall.bat on windows) | ||
|
||
|
||
from distutils.core import setup, Extension | ||
from distutils.core import Extension, setup | ||
|
||
FloatToHexModule = Extension('FloatToHex', | ||
sources = ['floattohexmodule.c']) | ||
FloatToHexModule = Extension("FloatToHex", sources=["floattohexmodule.c"]) | ||
|
||
setup (name = 'FloatToHex', | ||
version = '1.0', | ||
url = 'https://gregstoll.com/~gregstoll/floattohex/', | ||
author = 'Gregory Stoll', | ||
author_email = '[email protected]', | ||
description = 'Converts float to hex and back', | ||
long_description=open('README.md').read(), | ||
#long_description_content_type='text/markdown', | ||
license='Python Software Foundation License', | ||
classifiers=[ | ||
'Environment :: Console', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: System Administrators', | ||
'License :: OSI Approved :: Python Software Foundation License', | ||
'Operating System :: POSIX', | ||
'Programming Language :: Python', | ||
'Topic :: Communications :: Modbus', | ||
], | ||
ext_modules = [FloatToHexModule] | ||
) | ||
setup( | ||
name="FloatToHex", | ||
version="1.0", | ||
url="https://gregstoll.com/~gregstoll/floattohex/", | ||
author="Gregory Stoll", | ||
author_email="[email protected]", | ||
description="Converts float to hex and back", | ||
long_description=open("README.md").read(), | ||
# long_description_content_type='text/markdown', | ||
license="Python Software Foundation License", | ||
classifiers=[ | ||
"Environment :: Console", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: System Administrators", | ||
"License :: OSI Approved :: Python Software Foundation License", | ||
"Operating System :: POSIX", | ||
"Programming Language :: Python", | ||
"Topic :: Communications :: Modbus", | ||
], | ||
ext_modules=[FloatToHexModule], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.