Skip to content

Commit 6bf56ad

Browse files
committed
Use new extension point for declaring rhino installable packages
1 parent b374981 commit 6bf56ad

File tree

5 files changed

+14
-46
lines changed

5 files changed

+14
-46
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Unreleased
1616
* **PyBullet integration**: added support for PyBullet client and forward/inverse kinematic solver
1717
* Added ``ClientInterface``, ``PlannerInterface`` and various backend feature interfaces
1818
* Added implementations of these interfaces for ROS and V-REP
19-
* Added ``attributes`` dictionary to ``Robot`` class
19+
* Added ``attributes`` dictionary to ``Robot`` class
2020

2121
**Changed**
2222

@@ -27,6 +27,7 @@ Unreleased
2727
* Parameter ``backend`` of forward kinematics has been renamed to ``solver``
2828
* The signatures of all kinematics, motion planning and planning scene management methods have been homogenized across backend clients and within ``Robot``
2929
* All examples have been updated to reflect these changes
30+
* The installer to Rhino has been unified with COMPAS core. Now running ``python -m compas_rhino.install`` will also detect and install COMPAS FAB and its dependencies.
3031

3132

3233
**Fixed**

docs/getting_started.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,11 @@ Working in Rhino
4040
================
4141

4242
To make **COMPAS FAB** available inside Rhino, open the *command prompt*
43-
and type the following which will install it on both Rhino 5.0 and 6.0:
43+
and type the following:
4444

4545
::
4646

47-
python -m compas_fab.rhino.install -v 5.0
48-
python -m compas_fab.rhino.install -v 6.0
47+
python -m compas_rhino.install
4948

5049
.. note:
5150

src/compas_fab/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,5 @@ def get(filename):
6969
except Exception:
7070
pass
7171

72+
__all_plugins__ = ['compas_fab.rhino.install']
7273
__all__ = ['__author__', '__author_email__', '__copyright__', '__description__', '__license__', '__title__', '__url__', '__version__', 'get']

src/compas_fab/rhino/install.py

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,15 @@
22
from __future__ import division
33
from __future__ import print_function
44

5-
import compas_rhino.install
5+
import compas.plugins
66

7-
__all__ = []
87

9-
INSTALLABLE_PACKAGES = ['compas_fab', 'roslibpy']
8+
@compas.plugins.plugin(category='install')
9+
def installable_rhino_packages():
10+
return ['compas_fab', 'roslibpy']
1011

1112

12-
# ==============================================================================
13-
# Main
14-
# ==============================================================================
15-
1613
if __name__ == "__main__":
17-
18-
import argparse
19-
20-
parser = argparse.ArgumentParser()
21-
parser.add_argument('-v', '--version', choices=['5.0', '6.0'], default='6.0', help="The version of Rhino to install the packages in.")
22-
23-
args = parser.parse_args()
24-
25-
packages = set(compas_rhino.install.INSTALLABLE_PACKAGES + INSTALLABLE_PACKAGES)
26-
27-
compas_rhino.install.install(version=args.version, packages=packages)
14+
print('This installation method is obsolete.')
15+
print('Please use `python -m compas_rhino.install` instead')
16+
print('COMPAS FAB will be automatically detected and installed')

src/compas_fab/rhino/uninstall.py

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,6 @@
22
from __future__ import division
33
from __future__ import print_function
44

5-
import compas_rhino
6-
import compas_rhino.uninstall
7-
8-
import compas_fab.rhino.install
9-
10-
__all__ = []
11-
12-
13-
# ==============================================================================
14-
# Main
15-
# ==============================================================================
16-
175
if __name__ == "__main__":
18-
19-
import argparse
20-
21-
parser = argparse.ArgumentParser()
22-
23-
parser.add_argument('-v', '--version', choices=['5.0', '6.0'], default='5.0', help="The version of Rhino to install the packages in.")
24-
25-
args = parser.parse_args()
26-
27-
packages = set(compas_rhino.install.INSTALLABLE_PACKAGES + compas_fab.rhino.install.INSTALLABLE_PACKAGES)
28-
29-
compas_rhino.uninstall.uninstall(version=args.version, packages=packages)
6+
print('This uninstallation method is obsolete.')
7+
print('Please use `python -m compas_rhino.uninstall` instead')

0 commit comments

Comments
 (0)