File tree Expand file tree Collapse file tree 4 files changed +13
-5
lines changed
src/compas/datastructures/network Expand file tree Collapse file tree 4 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2828* ` compas_blender.artists.RobotModelArtist.collection ` can be assigned as a Blender collection or a name.
2929* Generalized the parameter ` color ` of ` compas_blender.draw_texts ` and various label drawing methods.
3030* Changed ` compas.IPY ` to ` compas.RHINO ` in ` orientation_rhino ` .
31+ * Changed ` planarity ` to ` requires_extra ` for pip installations.
3132
3233### Removed
3334
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ networkx
1212numba
1313numpy >= 1.15.4
1414pillow
15- planarity
1615pycollada
1716schema
1817jsonschema
Original file line number Diff line number Diff line change @@ -66,7 +66,9 @@ def read(*names, **kwargs):
6666 zip_safe = False ,
6767 install_requires = requirements ,
6868 python_requires = '>=2.7' ,
69- extras_require = optional_requirements ,
69+ extras_require = {
70+ 'planarity' : ['planarity' ],
71+ },
7072 entry_points = {
7173 'console_scripts' : [
7274 'compas_rpc=compas.rpc.__main__:main'
Original file line number Diff line number Diff line change 88
99from itertools import product
1010
11- import compas
11+ # import compas
1212
1313from compas .geometry import angle_vectors_xy
1414from compas .geometry import is_intersection_segment_segment_xy
1515from compas .geometry import is_ccw_xy
1616from compas .geometry import subtract_vectors_xy
1717
18- if not compas .IPY :
19- import planarity
18+ # if not compas.IPY:
19+ # import planarity
2020
2121
2222__all__ = [
@@ -198,6 +198,12 @@ def network_is_planar(network):
198198 --------
199199 >>>
200200 """
201+ try :
202+ import planarity
203+ except ImportError :
204+ print ("Planarity is not installed." )
205+ raise
206+
201207 return planarity .is_planar (list (network .edges ()))
202208
203209
You can’t perform that action at this time.
0 commit comments