Skip to content

Commit c8f138b

Browse files
committed
build: Replace setup.py with setup.cfg
1 parent e973a42 commit c8f138b

File tree

4 files changed

+72
-89
lines changed

4 files changed

+72
-89
lines changed

CHANGELOG

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
trifinger_simulation Changelog
22
==============================
33

4+
master
5+
------
6+
7+
- Switch from setup.py to setup.cfg
8+
9+
410
Version 1.4.0
511
-------------
612

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools", "wheel"]
2+
requires = ["setuptools>=42", "wheel"]
33

44
[tool.black]
55
line-length = 79

setup.cfg

+61
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,64 @@
22
script-dir=$base/lib/trifinger_simulation
33
[install]
44
install-scripts=$base/lib/trifinger_simulation
5+
6+
[metadata]
7+
name = trifinger_simulation
8+
version = attr: trifinger_simulation.__version__
9+
description = TriFinger Robot Simulation
10+
long_description = file: README.md
11+
author = Felix Widmaier
12+
author_email = [email protected]
13+
license = BSD 3-Clause License
14+
license_files = LICENSE
15+
url = https://open-dynamic-robot-initiative.github.io/trifinger_simulation
16+
project_urls =
17+
Documentation = https://open-dynamic-robot-initiative.github.io/trifinger_simulation
18+
Source Code = https://github.com/open-dynamic-robot-initiative/trifinger_simulation
19+
Bug Tracker = https://github.com/open-dynamic-robot-initiative/trifinger_simulation/issues
20+
keywords = TriFinger, Simulation, Robotics, Robot
21+
classifiers =
22+
Development Status :: 5 - Production/Stable
23+
License :: OSI Approved :: BSD License
24+
Programming Language :: Python :: 3
25+
Topic :: Scientific/Engineering
26+
27+
[options]
28+
packages = find:
29+
install_requires =
30+
numpy >=1.19.1
31+
scipy >=1.5.4
32+
pin >=2.4.7 # pinocchio
33+
pybullet >=3.0.8
34+
gym >=0.23.1
35+
opencv-python >=4.2.0.34
36+
pyyaml >=5.3.1
37+
38+
scripts =
39+
demos/demo_cameras.py
40+
demos/demo_control.py
41+
demos/demo_inverse_kinematics.py
42+
demos/demo_load_gym_env.py
43+
demos/demo_plain_torque_control.py
44+
demos/demo_random_policy.py
45+
demos/demo_trifinger_platform.py
46+
scripts/check_position_control_accuracy.py
47+
scripts/profiling.py
48+
49+
[options.extras_require]
50+
test = pytest
51+
52+
[options.package_data]
53+
trifinger_simulation =
54+
data/camera_params/*.yml
55+
data/cube_v2/*.blend
56+
data/cube_v2/*.urdf
57+
data/cube_v2/*.png
58+
data/cube_v2/*.mtl
59+
data/cube_v2/*.obj
60+
robot_properties_fingers/**/*.stl
61+
robot_properties_fingers/**/*.urdf
62+
63+
[options.data_files]
64+
share/ament_index/resource_index/packages = resource/trifinger_simulation
65+
share/trifinger_simulation = package.xml

setup.py

+4-88
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,5 @@
1-
import os
2-
from setuptools import setup
1+
# Dummy setup.py needed for colon
2+
import setuptools
33

4-
package_name = "trifinger_simulation"
5-
6-
7-
def find_package_data(base_dir, data_dir):
8-
"""Get list of all files in base_dir/data_dir, relative to base_dir."""
9-
paths = []
10-
for (path, _directories, filenames) in os.walk(
11-
os.path.join(base_dir, data_dir)
12-
):
13-
for filename in filenames:
14-
paths.append(
15-
os.path.relpath(os.path.join(path, filename), base_dir)
16-
)
17-
return paths
18-
19-
20-
setup(
21-
name=package_name,
22-
version="1.4.0",
23-
packages=[
24-
package_name,
25-
package_name + ".gym_wrapper",
26-
package_name + ".gym_wrapper.envs",
27-
package_name + ".tasks",
28-
package_name + ".tasks.move_cube",
29-
package_name + ".tasks.move_cube_on_trajectory",
30-
package_name + ".tasks.rearrange_dice",
31-
],
32-
data_files=[
33-
(
34-
"share/ament_index/resource_index/packages",
35-
["resource/" + package_name],
36-
),
37-
("share/" + package_name, ["package.xml"]),
38-
],
39-
zip_safe=False, # <- TODO Could this be True?
40-
maintainer="Felix Widmaier",
41-
maintainer_email="[email protected]",
42-
url="https://open-dynamic-robot-initiative.github.io/trifinger_simulation",
43-
description="TriFinger Robot Simulation",
44-
classifiers=[
45-
"Development Status :: 5 - Production/Stable",
46-
"License :: OSI Approved :: BSD License",
47-
"Programming Language :: Python :: 3",
48-
"Topic :: Scientific/Engineering",
49-
],
50-
license="BSD 3-Clause",
51-
install_requires=[
52-
"numpy >=1.19.1",
53-
"scipy >=1.5.4",
54-
"pin >=2.4.7", # pinocchio
55-
"pybullet >=3.0.8",
56-
"gym >=0.23.1",
57-
"opencv-python >=4.2.0.34",
58-
"pyyaml >=5.3.1",
59-
],
60-
extras_require={
61-
"test": ["pytest"],
62-
},
63-
# entry_points={
64-
# 'console_scripts': [
65-
# 'my_node = my_py_pkg.my_node:main'
66-
# ],
67-
# },
68-
# TODO: use entry_points instead of scripts to get rid of the .py extension
69-
# on the executables.
70-
scripts=[
71-
"demos/demo_cameras.py",
72-
"demos/demo_control.py",
73-
"demos/demo_inverse_kinematics.py",
74-
"demos/demo_load_gym_env.py",
75-
"demos/demo_plain_torque_control.py",
76-
"demos/demo_random_policy.py",
77-
"demos/demo_trifinger_platform.py",
78-
"scripts/check_position_control_accuracy.py",
79-
"scripts/profiling.py",
80-
],
81-
package_data={
82-
"": (
83-
find_package_data("trifinger_simulation", "data")
84-
+ find_package_data(
85-
"trifinger_simulation", "robot_properties_fingers"
86-
)
87-
)
88-
},
89-
)
4+
if __name__ == "__main__":
5+
setuptools.setup()

0 commit comments

Comments
 (0)