Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jerrrrry
infinicore
Commits
ca45a67c
Commit
ca45a67c
authored
Dec 10, 2025
by
baominghelly
Browse files
issue/723 - Expose test framework to other packages
parent
f73d6237
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
8 deletions
+27
-8
setup.py
setup.py
+27
-8
test/infinicore/__init__.py
test/infinicore/__init__.py
+0
-0
No files found.
setup.py
View file @
ca45a67c
import
subprocess
from
setuptools
import
setup
from
setuptools
import
setup
,
find_packages
from
setuptools.command.build
import
build
def
run_xmake_build
():
print
(
"Running xmake build..."
)
subprocess
.
run
([
"xmake"
,
"build"
],
check
=
True
)
subprocess
.
run
([
"xmake"
,
"install"
],
check
=
True
)
subprocess
.
run
([
"xmake"
,
"build"
,
"-y"
,
"_infinicore"
],
check
=
True
)
subprocess
.
run
([
"xmake"
,
"install"
,
"_infinicore"
],
check
=
True
)
class
Build
(
build
):
def
run
(
self
):
subprocess
.
run
([
"xmake"
,
"build"
])
subprocess
.
run
([
"xmake"
,
"install"
])
subprocess
.
run
([
"xmake"
,
"build"
,
"-y"
,
"_infinicore"
])
subprocess
.
run
([
"xmake"
,
"install"
,
"_infinicore"
])
run_xmake_build
()
super
().
run
()
setup
(
# 1. Find main packages and manually add test/framework packages
packages
=
find_packages
(
where
=
"python"
)
+
[
"infinicore.test"
,
"infinicore.test.framework"
],
# 2. Directory mappings
package_dir
=
{
""
:
"python"
,
# Root package is under python/ directory
"infinicore.test"
:
"test/infinicore"
# Intermediate package mapping
},
setup
(
package_dir
=
{
""
:
"python"
},
cmdclass
=
{
"build"
:
Build
})
# 3. Register commands
cmdclass
=
{
"build"
:
Build
}
)
test/infinicore/__init__.py
0 → 100644
View file @
ca45a67c
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