Skip to content

Commit

Permalink
g.extension: fix registration addon with module name start with 2 cha…
Browse files Browse the repository at this point in the history
…rs (#3168)

Addon module name start with db.*, ps.*, r3.*, wx.*, during installation
on the OS MS Windows platform.
  • Loading branch information
tmszi committed Sep 21, 2023
1 parent dfbc335 commit 658d79c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/g.extension/g.extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -1630,10 +1630,13 @@ def install_extension_win(name):

# collect module names and file names
module_list = list()
module_name_pattern = re.compile(
r"^([d,g,i,m,p,r,s,t,v]|^db|^ps|^r3|^wx)\..*[\.py,\.exe]$"
)
for r, d, f in os.walk(srcdir):
for file in f:
# Filter GRASS module name patterns
if re.search(r"^[d,db,g,i,m,p,ps,r,r3,s,t,v,wx]\..*[\.py,\.exe]$", file):
if re.search(module_name_pattern, file):
modulename = os.path.splitext(file)[0]
module_list.append(modulename)
# remove duplicates in case there are .exe wrappers for python scripts
Expand Down

0 comments on commit 658d79c

Please sign in to comment.