Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update setup.py to use entry_points #60

Merged
merged 5 commits into from
Mar 18, 2022
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
4 changes: 0 additions & 4 deletions onshape-to-robot

This file was deleted.

4 changes: 0 additions & 4 deletions onshape-to-robot-bullet

This file was deleted.

8 changes: 0 additions & 8 deletions onshape-to-robot-clear-cache

This file was deleted.

4 changes: 0 additions & 4 deletions onshape-to-robot-edit-shape

This file was deleted.

4 changes: 0 additions & 4 deletions onshape-to-robot-pure-sketch

This file was deleted.

1 change: 0 additions & 1 deletion onshape_to_robot/bullet.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
import math
import sys
import os
Expand Down
17 changes: 17 additions & 0 deletions onshape_to_robot/clear_cache.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""Clear the onshape-to-robot cache."""
import os

from . import onshape_api as api

# Directory used for cache.
CACHE_DIR = os.path.join(os.path.dirname(api.__file__), "cache")


def clear_cache():
"""Clear the onshape-to-robot cache."""
print("Cleaning cache directory ({})".format(CACHE_DIR))
os.system("rm -rf {}/*".format(CACHE_DIR))


if __name__ == "__main__":
clear_cache()
1 change: 0 additions & 1 deletion onshape_to_robot/edit_shape.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
import sys
import os

Expand Down
1 change: 0 additions & 1 deletion onshape_to_robot/onshape_to_robot.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
import numpy as np
from copy import copy
import commentjson as json
Expand Down
1 change: 0 additions & 1 deletion onshape_to_robot/pure_sketch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
import numpy as np
import math
import commentjson as json
Expand Down
1 change: 0 additions & 1 deletion onshape_to_robot/simulation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
from transforms3d.quaternions import mat2quat, quat2mat
import math
import sys
Expand Down
11 changes: 9 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@
long_description_content_type="text/markdown",
url="https://github.com/rhoban/onshape-to-robot/",
packages=setuptools.find_packages(),
scripts=['onshape-to-robot', 'onshape-to-robot-bullet',
'onshape-to-robot-edit-shape', 'onshape-to-robot-clear-cache', 'onshape-to-robot-pure-sketch'],
entry_points={
"console_scripts": [
"onshape-to-robot=onshape_to_robot:onshape_to_robot",
"onshape-to-robot-bullet=onshape_to_robot:bullet",
"onshape-to-robot-clear-cache=onshape_to_robot:clear_cache",
"onshape-to-robot-edit-shape=onshape_to_robot:edit_shape",
"onshape-to-robot-pure-sketch=onshape_to_robot:pure_sketch",
]
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
Expand Down