Skip to content

Commit 9fea93e

Browse files
author
Kim Neunert
committed
few updates and build fixes for windows
1 parent 95c0678 commit 9fea93e

File tree

5 files changed

+32
-41
lines changed

5 files changed

+32
-41
lines changed

.gitlab-ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ release_binary_windows:
111111
stage: releasing
112112
only:
113113
- tags
114+
variables:
115+
GIT_DEPTH: 0 # Disable shallow clone to get all Git history
114116
tags:
115117
- windows
116118
before_script:

pyinstaller/requirements.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ pyinstaller==5.2
22
pefile==2022.5.30
33
macholib
44
pywin32-ctypes
5-
babel==2.10.1
5+
babel==2.12.1
66
pytz==2022.1

pyinstaller/requirements.txt

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.10
3-
# To update, run:
2+
# This file is autogenerated by pip-compile with Python 3.10
3+
# by the following command:
44
#
55
# pip-compile --generate-hashes requirements.in
66
#
@@ -10,17 +10,19 @@ altgraph==0.17 \
1010
# via
1111
# macholib
1212
# pyinstaller
13-
babel==2.10.1 \
14-
--hash=sha256:3f349e85ad3154559ac4930c3918247d319f21910d5ce4b25d439ed8693b98d2 \
15-
--hash=sha256:98aeaca086133efb3e1e2aad0396987490c8425929ddbcfe0550184fdc54cd13
13+
babel==2.12.1 \
14+
--hash=sha256:b4246fb7677d3b98f501a39d43396d3cafdc8eadb045f4a31be01863f655c610 \
15+
--hash=sha256:cc2d99999cd01d44420ae725a21c9e3711b3aadc7976d6147f622d8581963455
1616
# via -r requirements.in
1717
future==0.18.2 \
1818
--hash=sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d
1919
# via pefile
2020
macholib==1.14 \
2121
--hash=sha256:0c436bc847e7b1d9bda0560351bf76d7caf930fb585a828d13608839ef42c432 \
2222
--hash=sha256:c500f02867515e6c60a27875b408920d18332ddf96b4035ef03beddd782d4281
23-
# via -r requirements.in
23+
# via
24+
# -r requirements.in
25+
# pyinstaller
2426
pefile==2022.5.30 \
2527
--hash=sha256:a5488a3dd1fd021ce33f969780b88fe0f7eebb76eb20996d7318f307612a045b
2628
# via -r requirements.in
@@ -44,9 +46,7 @@ pyinstaller-hooks-contrib==2022.8 \
4446
pytz==2022.1 \
4547
--hash=sha256:1e760e2fe6a8163bc0b3d9a19c4f84342afa0a2affebfaa84b01b978a02ecaa7 \
4648
--hash=sha256:e68985985296d9a66a881eb3193b0906246245294a881e7c8afe623866ac6a5c
47-
# via
48-
# -r requirements.in
49-
# babel
49+
# via -r requirements.in
5050
pywin32-ctypes==0.2.0 \
5151
--hash=sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942 \
5252
--hash=sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[build-system]
22
requires = [
33
"setuptools<=65.7.0",
4-
"setuptools_scm[toml]>=6.2",
5-
"babel==2.11.0",
4+
"setuptools_scm[toml]>=6.4.2",
5+
"babel==2.12.1",
66
"build==0.10.0",
77
"wheel",
88
"twine"

utils/release-helper.py

+18-29
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import sys
77
import zipfile
88
from pathlib import Path
9+
from glob import glob
910

1011

1112
logging.basicConfig(format="%(levelname)s:%(message)s", level=logging.INFO)
@@ -340,36 +341,24 @@ def sha256sum(filenames):
340341
# Used by build-win.ci.bat
341342
sha256sum(sys.argv[2:])
342343
exit(0)
343-
if "set_setup_py_version" in sys.argv:
344-
# Used by build-win.ci.bat
345-
version = sys.argv[2]
346-
print(f"setting version {version} in setup.py")
347-
search_text = "vx.y.z-get-replaced-by-release-script"
348-
349-
# creating a variable and storing the text
350-
# that we want to add
351-
replace_text = version
352-
353-
# Opening our text file in read only
354-
# mode using the open() function
355-
with open(r"setup.py", "r") as file:
356-
data = file.read()
357-
data = data.replace(search_text, replace_text)
358-
with open(r"setup.py", "w") as file:
359-
file.write(data)
360-
print("Done")
361-
exit(0)
362344
if "install_wheel" in sys.argv:
363-
# Used by build-win.ci.bat
364-
version = sys.argv[2]
365-
version = version.replace("v", "")
366-
version = version.replace("-pre", "rc")
367-
filename = f"cryptoadvance.specter-{version}-py3-none-any.whl"
368-
cmd = f"pip3 install {Path('dist',filename)}"
369-
res = os.system(cmd)
370-
print(f"result of command: {cmd}")
371-
print(res)
372-
exit(res)
345+
# List all .whl files in the 'dist' directory
346+
wheel_files = glob(
347+
str(Path("dist", "cryptoadvance.specter-*-py3-none-any.whl"))
348+
)
349+
print("found those wheel files: " + str(wheel_files))
350+
351+
# Loop through the wheel files and install them
352+
for wheel_file in wheel_files:
353+
cmd = f"pip3 install {wheel_file}"
354+
res = os.system(cmd)
355+
print(f"Result of command: {cmd}")
356+
print(res)
357+
# If the installation fails, exit with the error code
358+
if res != 0:
359+
exit(res)
360+
# Exit with a success code if all installations were successful
361+
exit(0)
373362

374363
rh = ReleaseHelper()
375364
rh.init_gitlab()

0 commit comments

Comments
 (0)