Skip to content

Commit

Permalink
More Pythonic file structure (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne authored Aug 24, 2024
1 parent eb79d76 commit 85d6fcd
Show file tree
Hide file tree
Showing 15 changed files with 63 additions and 13 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
export PYTHONHASHSEED=42
export BUILD_FILE_NAME=sync-keys-${RELEASE_VERSION}-linux-amd64;
mkdir ${BUILD_FILE_NAME};
pyinstaller --onefile ./main.py --name sync-keys --copy-metadata py_ecc --distpath ./${BUILD_FILE_NAME};
pyinstaller --onefile ./sync_keys/main.py --name sync-keys --copy-metadata py_ecc --distpath ./${BUILD_FILE_NAME};
tar -zcvf ${BUILD_FILE_NAME}.tar.gz ./${BUILD_FILE_NAME};
mkdir /tmp/artifacts;
cp ${BUILD_FILE_NAME}.tar.gz /tmp/artifacts;
Expand All @@ -29,7 +29,7 @@ jobs:
export PYTHONHASHSEED=42
export BUILD_FILE_NAME=sync-keys-${RELEASE_VERSION}-darwin-arm64;
mkdir ${BUILD_FILE_NAME};
pyinstaller --onefile ./main.py --name sync-keys --copy-metadata py_ecc --distpath ./${BUILD_FILE_NAME};
pyinstaller --onefile ./sync_keys/main.py --name sync-keys --copy-metadata py_ecc --distpath ./${BUILD_FILE_NAME};
tar -zcvf ${BUILD_FILE_NAME}.tar.gz ./${BUILD_FILE_NAME};
mkdir /tmp/artifacts;
cp ${BUILD_FILE_NAME}.tar.gz /tmp/artifacts;
Expand All @@ -38,10 +38,9 @@ jobs:
- OS: windows-latest
PYTHON_VERSION: 3.12
BUILD_CMD: |
$RELEASE_VERSION = $env:GITHUB_REF.replace('refs/tags/', '')
$BUILD_FILE_NAME = "sync-keys-" + $RELEASE_VERSION + "-windows-amd64"
$BUILD_FILE_NAME = "sync-keys-" + $env:RELEASE_VERSION + "-windows-amd64"
$BUILD_FILE_NAME_PATH = ".\" + $BUILD_FILE_NAME
pyinstaller --onefile ./main.py --name sync-keys --copy-metadata py_ecc --distpath ${BUILD_FILE_NAME_PATH};
pyinstaller --onefile ./sync_keys/main.py --name sync-keys --copy-metadata py_ecc --distpath ${BUILD_FILE_NAME_PATH};
$ZIP_FILE_NAME = $BUILD_FILE_NAME + ".zip"
Compress-Archive -Path $BUILD_FILE_NAME_PATH -DestinationPath $ZIP_FILE_NAME
mkdir \tmp\artifacts
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ sync-keys
__pycache__
build
*.spec
*.egg-info
dist
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ ARG VERSION

LABEL org.label-schema.version=$VERSION

RUN apt-get update && apt-get install -y git

COPY ./requirements.txt /src/requirements.txt

WORKDIR /src

RUN apt-get update && apt-get install -y git
RUN pip install -r requirements.txt

COPY ./*.py /src/
COPY ./sync_keys/*.py /src/

ENTRYPOINT [ "python", "./main.py"]
16 changes: 14 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
[build-system]
requires = ["setuptools", "wheel"]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "sync-keys"
version = "0.3.0"
version = "0.3.1"
authors = [
{name = "Thorsten Behrens", email = "[email protected]"},
{name = "Dmitri Tsumak", email = "[email protected]"}
]
description = "Helper script for eth-staking-charts"
readme = "README.md"
dependencies = [
"click",
"cytoolz",
Expand All @@ -20,3 +25,10 @@ dependencies = [
"toolz",
"web3"
]
requires-python = ">=3.9,<4"

[project.scripts]
sync-keys = "sync_keys.main:main"

[project.urls]
"Homepage" = "https://github.com/CryptoManufaktur-io/sync-keys"
45 changes: 41 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,49 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --no-annotate pyproject.toml
#
aiohappyeyeballs==2.4.0
aiohttp==3.10.5
aiosignal==1.3.1
annotated-types==0.7.0
attrs==24.2.0
bitarray==2.9.2
cached-property==1.5.2
certifi==2024.7.4
charset-normalizer==3.3.2
ckzg==2.0.0
click==8.1.7
cytoolz==0.12.3
eth-hash==0.7.0
eth-abi==5.1.0
eth-account==0.13.2
eth-hash[pycryptodome]==0.7.0
eth-keyfile==0.8.1
eth-keys==0.5.1
eth-rlp==2.1.0
eth-typing==5.0.0
eth-utils==5.0.0
ethstaker-deposit @ git+https://github.com/eth-educators/[email protected]
frozenlist==1.4.1
hexbytes==1.2.1
idna==3.8
multidict==6.0.5
parsimonious==0.10.0
psycopg2-binary==2.9.9
pycryptodome==3.20.0
py-ecc==7.0.1
PyYAML==6.0.2
ethstaker-deposit @ git+https://github.com/eth-educators/[email protected]
pycryptodome==3.20.0
pydantic==2.8.2
pydantic-core==2.20.1
pyunormalize==15.1.0
pyyaml==6.0.2
regex==2024.7.24
requests==2.32.3
rlp==4.0.1
toolz==0.12.1
types-requests==2.32.0.20240712
typing-extensions==4.12.2
urllib3==2.2.2
web3==7.0.0
websockets==13.0
yarl==1.9.4
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 85d6fcd

Please sign in to comment.