Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,17 @@ jobs:
assert np.allclose(arm.pose_jacobian(q), arm.raw_pose_jacobian(q, 2))
print(arm.fkm(q))
"
# marinholab and marinholab.sas must stay namespace packages (no
# __init__.py), or they hide the marinholab.* packages of other
# distributions (marinholab-solvers-qpoases, marinholab-ur3e-r820).
mkdir -p other/marinholab/other_package
echo "VALUE = 1" > other/marinholab/other_package/__init__.py
PYTHONPATH=other $GITHUB_WORKSPACE/$PY -c "
import marinholab, marinholab.sas, marinholab.sas.core, marinholab.other_package
assert getattr(marinholab, '__file__', None) is None, marinholab.__file__
assert getattr(marinholab.sas, '__file__', None) is None, marinholab.sas.__file__
print('namespace packages OK')
"

- name: Upload wheel artifact
uses: actions/upload-artifact@v6
Expand Down
1 change: 0 additions & 1 deletion marinholab/__init__.py

This file was deleted.

1 change: 0 additions & 1 deletion marinholab/sas/__init__.py

This file was deleted.

7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,15 @@ sas_core_clock_example = "marinholab.sas.core.example_clock:main"
sas_core_clock_sched_fifo_example = "marinholab.sas.core.example_clock_sched_fifo:main"
sas_core_robot_driver_subclass_example = "marinholab.sas.core.example_robot_driver_subclass:main"

# `marinholab` and `marinholab.sas` are PEP 420 namespace packages (no
# __init__.py), shared with other distributions such as
# marinholab-solvers-qpoases (marinholab.solvers) and marinholab-ur3e-r820
# (marinholab.ur3e_r820). An __init__.py in either would make it a regular
# package and hide the others' subpackages. `namespaces` (true by default)
# makes find include them.
[tool.setuptools.packages.find]
include = ["marinholab*"]
namespaces = true

[tool.setuptools.package-data]
"marinholab.sas.core" = ["py.typed", "*.pyi"]
Expand Down
7 changes: 0 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,6 @@ def build_extension(self, ext: CMakeExtension) -> None:

setup(
license="LGPL-3.0-or-later",
packages=[
"marinholab",
"marinholab.sas",
"marinholab.sas.core",
"marinholab.sas.core.papers",
"marinholab.sas.core.papers.icra2019",
],
ext_modules=[CMakeExtension("marinholab.sas.core._core")],
cmdclass={"build_ext": CMakeBuild},
zip_safe=False,
Expand Down
Loading