Skip to content

Commit 6b4698c

Browse files
committed
feat(builder): call tldextract in build scripts
1 parent 6e42110 commit 6b4698c

File tree

6 files changed

+10
-18
lines changed

6 files changed

+10
-18
lines changed

.github/workflows/build_release.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,6 @@ jobs:
9292
- name: Install project as a package
9393
run: python -m pip install -e .
9494

95-
- name: Generates tldextract cache
96-
run: python -O ./builder/tldextract_update.py
97-
9895
- name: Generates Executable
9996
run: python -O ./builder/pyinstaller_build_macos.py
10097

@@ -129,8 +126,6 @@ jobs:
129126
130127
- name: Install project as a package
131128
run: python -m pip install -e .
132-
- name: Generates tldextract cache
133-
run: python -O ./builder/tldextract_update.py
134129

135130
- name: Generates Executable
136131
run: python -O ./builder/pyinstaller_build_ubuntu.py
@@ -170,9 +165,6 @@ jobs:
170165
- name: Generates MS Version Info
171166
run: python .\builder\version_info_templater.py
172167

173-
- name: Generates tldextract cache
174-
run: python -O .\builder\tldextract_update.py
175-
176168
- name: Generates MS Executable
177169
run: python -O .\builder\pyinstaller_build_windows.py
178170

builder/pyinstaller_build_macos.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
# package
2222
sys.path.insert(0, str(Path(".").resolve()))
23+
from builder import tldextract_update
2324
from qgis_deployment_toolbelt import __about__ # noqa: E402
2425

2526
# #############################################################################
@@ -49,6 +50,8 @@
4950
mac_os_version, _, _ = platform.mac_ver()
5051
mac_os_version = "-".join(mac_os_version.split(".")[:2])
5152

53+
tldextract_update.run()
54+
5255
PyInstaller.__main__.run(
5356
[
5457
"--add-data=LICENSE:.",

builder/pyinstaller_build_ubuntu.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
# package
2323
sys.path.insert(0, str(Path(".").resolve()))
24+
from builder import tldextract_update
2425
from qgis_deployment_toolbelt import __about__ # noqa: E402
2526

2627
# #############################################################################
@@ -48,6 +49,8 @@
4849
)
4950
package_folder = Path("qgis_deployment_toolbelt")
5051

52+
tldextract_update.run()
53+
5154
PyInstaller.__main__.run(
5255
[
5356
"--add-data=LICENSE:.",

builder/pyinstaller_build_windows.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
# package
2222
sys.path.insert(0, str(Path(".").resolve()))
23+
from builder import tldextract_update
2324
from qgis_deployment_toolbelt import __about__ # noqa: E402
2425

2526
# #############################################################################
@@ -46,6 +47,8 @@
4647
)
4748
package_folder = Path("qgis_deployment_toolbelt")
4849

50+
tldextract_update.run()
51+
4952
PyInstaller.__main__.run(
5053
[
5154
"--add-data=LICENSE:.",

builder/tldextract_update.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@
1111

1212
# Standard library
1313
import argparse
14-
import sys
1514
import urllib.request
16-
from os import W_OK, access, path
15+
from os import W_OK, access
1716
from pathlib import Path
1817

1918
# 3rd party
2019
from tldextract import TLDExtract
2120

22-
sys.path.insert(0, path.abspath(r"."))
23-
24-
2521
# #############################################################################
2622
# ########### MAIN #################
2723
# ##################################

docs/development/packaging.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ The output binary and all embedded dependencies is located into a subfolder name
1414
# Generates MS Version Info
1515
python .\builder\version_info_templater.py
1616
17-
# Generates tldextract cache
18-
python .\builder\tldextract_update.py
19-
2017
# Generates MS Executable
2118
python -O .\builder\pyinstaller_build_windows.py
2219
```
@@ -32,8 +29,6 @@ To run it, double-click on the executable file (*.exe) loated into `dist` folder
3229
```sh
3330
# Generates binary executable
3431
python -O ./builder/pyinstaller_build_ubuntu.py
35-
# Generates tldextract cache
36-
python ./builder/tldextract_update.py
3732
# make it runnable
3833
chmod +x dist/QGISDeploymentToolbelt_*
3934
```

0 commit comments

Comments
 (0)