Skip to content

Commit

Permalink
few updates and build fixes for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Kim Neunert committed May 21, 2024
1 parent 95c0678 commit 9fea93e
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 41 deletions.
2 changes: 2 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ release_binary_windows:
stage: releasing
only:
- tags
variables:
GIT_DEPTH: 0 # Disable shallow clone to get all Git history
tags:
- windows
before_script:
Expand Down
2 changes: 1 addition & 1 deletion pyinstaller/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ pyinstaller==5.2
pefile==2022.5.30
macholib
pywin32-ctypes
babel==2.10.1
babel==2.12.1
pytz==2022.1
18 changes: 9 additions & 9 deletions pyinstaller/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --generate-hashes requirements.in
#
Expand All @@ -10,17 +10,19 @@ altgraph==0.17 \
# via
# macholib
# pyinstaller
babel==2.10.1 \
--hash=sha256:3f349e85ad3154559ac4930c3918247d319f21910d5ce4b25d439ed8693b98d2 \
--hash=sha256:98aeaca086133efb3e1e2aad0396987490c8425929ddbcfe0550184fdc54cd13
babel==2.12.1 \
--hash=sha256:b4246fb7677d3b98f501a39d43396d3cafdc8eadb045f4a31be01863f655c610 \
--hash=sha256:cc2d99999cd01d44420ae725a21c9e3711b3aadc7976d6147f622d8581963455
# via -r requirements.in
future==0.18.2 \
--hash=sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d
# via pefile
macholib==1.14 \
--hash=sha256:0c436bc847e7b1d9bda0560351bf76d7caf930fb585a828d13608839ef42c432 \
--hash=sha256:c500f02867515e6c60a27875b408920d18332ddf96b4035ef03beddd782d4281
# via -r requirements.in
# via
# -r requirements.in
# pyinstaller
pefile==2022.5.30 \
--hash=sha256:a5488a3dd1fd021ce33f969780b88fe0f7eebb76eb20996d7318f307612a045b
# via -r requirements.in
Expand All @@ -44,9 +46,7 @@ pyinstaller-hooks-contrib==2022.8 \
pytz==2022.1 \
--hash=sha256:1e760e2fe6a8163bc0b3d9a19c4f84342afa0a2affebfaa84b01b978a02ecaa7 \
--hash=sha256:e68985985296d9a66a881eb3193b0906246245294a881e7c8afe623866ac6a5c
# via
# -r requirements.in
# babel
# via -r requirements.in
pywin32-ctypes==0.2.0 \
--hash=sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942 \
--hash=sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
requires = [
"setuptools<=65.7.0",
"setuptools_scm[toml]>=6.2",
"babel==2.11.0",
"setuptools_scm[toml]>=6.4.2",
"babel==2.12.1",
"build==0.10.0",
"wheel",
"twine"
Expand Down
47 changes: 18 additions & 29 deletions utils/release-helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import sys
import zipfile
from pathlib import Path
from glob import glob


logging.basicConfig(format="%(levelname)s:%(message)s", level=logging.INFO)
Expand Down Expand Up @@ -340,36 +341,24 @@ def sha256sum(filenames):
# Used by build-win.ci.bat
sha256sum(sys.argv[2:])
exit(0)
if "set_setup_py_version" in sys.argv:
# Used by build-win.ci.bat
version = sys.argv[2]
print(f"setting version {version} in setup.py")
search_text = "vx.y.z-get-replaced-by-release-script"

# creating a variable and storing the text
# that we want to add
replace_text = version

# Opening our text file in read only
# mode using the open() function
with open(r"setup.py", "r") as file:
data = file.read()
data = data.replace(search_text, replace_text)
with open(r"setup.py", "w") as file:
file.write(data)
print("Done")
exit(0)
if "install_wheel" in sys.argv:
# Used by build-win.ci.bat
version = sys.argv[2]
version = version.replace("v", "")
version = version.replace("-pre", "rc")
filename = f"cryptoadvance.specter-{version}-py3-none-any.whl"
cmd = f"pip3 install {Path('dist',filename)}"
res = os.system(cmd)
print(f"result of command: {cmd}")
print(res)
exit(res)
# List all .whl files in the 'dist' directory
wheel_files = glob(
str(Path("dist", "cryptoadvance.specter-*-py3-none-any.whl"))
)
print("found those wheel files: " + str(wheel_files))

# Loop through the wheel files and install them
for wheel_file in wheel_files:
cmd = f"pip3 install {wheel_file}"
res = os.system(cmd)
print(f"Result of command: {cmd}")
print(res)
# If the installation fails, exit with the error code
if res != 0:
exit(res)
# Exit with a success code if all installations were successful
exit(0)

rh = ReleaseHelper()
rh.init_gitlab()
Expand Down

0 comments on commit 9fea93e

Please sign in to comment.