Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
aisbf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
aisbf
Commits
f109ae26
Commit
f109ae26
authored
Apr 24, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: bundle aisbf/ Python package in _share/ so share dir import works without site-packages
parent
62e93fe6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
cli.py
cli.py
+1
-1
setup.py
setup.py
+4
-2
No files found.
cli.py
View file @
f109ae26
...
@@ -32,7 +32,7 @@ from pathlib import Path
...
@@ -32,7 +32,7 @@ from pathlib import Path
# Files and directories the share directory must contain for the server to start.
# Files and directories the share directory must contain for the server to start.
_REQUIRED_FILES
=
[
'aisbf.sh'
,
'main.py'
,
'requirements.txt'
]
_REQUIRED_FILES
=
[
'aisbf.sh'
,
'main.py'
,
'requirements.txt'
]
_REQUIRED_DIRS
=
[
'templates'
,
'static'
,
'config'
]
_REQUIRED_DIRS
=
[
'templates'
,
'static'
,
'config'
,
'aisbf'
]
def
_is_root
():
def
_is_root
():
...
...
setup.py
View file @
f109ae26
...
@@ -49,7 +49,7 @@ class build_py(_build_py):
...
@@ -49,7 +49,7 @@ class build_py(_build_py):
"""
"""
_SHARE_FILES
=
[
'main.py'
,
'requirements.txt'
,
'aisbf.sh'
]
_SHARE_FILES
=
[
'main.py'
,
'requirements.txt'
,
'aisbf.sh'
]
_SHARE_DIRS
=
[
'templates'
,
'static'
,
'config'
]
_SHARE_DIRS
=
[
'templates'
,
'static'
,
'config'
,
'aisbf'
]
def
run
(
self
):
def
run
(
self
):
self
.
_populate_share
()
self
.
_populate_share
()
...
@@ -73,8 +73,10 @@ class build_py(_build_py):
...
@@ -73,8 +73,10 @@ class build_py(_build_py):
src
=
root
/
dname
src
=
root
/
dname
dst
=
share
/
dname
dst
=
share
/
dname
if
src
.
is_dir
():
if
src
.
is_dir
():
# Exclude _share/ when copying the aisbf package — it's the
# directory we're currently building, so it must not recurse.
shutil
.
copytree
(
src
,
dst
,
shutil
.
copytree
(
src
,
dst
,
ignore
=
shutil
.
ignore_patterns
(
'__pycache__'
,
'*.pyc'
,
'*.pyo'
))
ignore
=
shutil
.
ignore_patterns
(
'_
share'
,
'_
_pycache__'
,
'*.pyc'
,
'*.pyo'
))
def
_update_package_data
(
self
):
def
_update_package_data
(
self
):
"""Dynamically register every file copied into _share/ so setuptools
"""Dynamically register every file copied into _share/ so setuptools
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment