Skip to content

Commit c55d96e

Browse files
committed
Use pyproject.toml instead of setup.py
1 parent 4ea5020 commit c55d96e

File tree

2 files changed

+82
-69
lines changed

2 files changed

+82
-69
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
[build-system]
2+
requires = ["setuptools>=68", "wheel", "build"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "projectairsim"
7+
version = "0.1.1"
8+
description = "Project AirSim client package"
9+
readme = { file = "README.md", content-type = "text/markdown" }
10+
requires-python = ">=3.7,<4"
11+
license = { text = "MIT" }
12+
authors = [{ name = "IAMAI Simulations" }]
13+
keywords = ["simulation", "uav", "drone", "airsim", "robotics"]
14+
classifiers = [
15+
"Programming Language :: Python :: 3",
16+
"Programming Language :: Python :: 3 :: Only",
17+
"License :: OSI Approved :: MIT License",
18+
"Operating System :: OS Independent",
19+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
20+
"Topic :: Scientific/Engineering :: Visualization"
21+
]
22+
23+
dependencies = [
24+
"pynng>=0.5.0",
25+
"msgpack>=1.0.5",
26+
"opencv-python>=4.2.0.32",
27+
"numpy",
28+
"matplotlib",
29+
"commentjson>=0.9.0",
30+
"jsonschema>=4.4.0",
31+
"inputs",
32+
"pqdict",
33+
"cryptography",
34+
"pykml",
35+
"junit-xml",
36+
"jsonlines",
37+
"Shapely",
38+
"azure-storage-blob",
39+
"open3d==0.16.*"
40+
]
41+
42+
[project.optional-dependencies]
43+
autonomy = [
44+
"torch>=1.8.0",
45+
"torchvision>=0.9.0",
46+
"scikit-image>=0.18.1",
47+
"Pillow<=8.2.0",
48+
"gym==0.18.3",
49+
"onnxruntime-gpu",
50+
"pydantic",
51+
"python-multipart",
52+
"fastapi",
53+
"uvicorn",
54+
]
55+
bonsai = [
56+
"microsoft-bonsai-api==0.1.2",
57+
"python-dotenv==0.13.0",
58+
"bonsai-cli==1.0.8",
59+
"msal-extensions==0.1.3",
60+
]
61+
datacollection = [
62+
"albumentations==1.3.0",
63+
]
64+
65+
[tool.setuptools]
66+
# Source layout: packages live under src/
67+
package-dir = { "" = "src" }
68+
69+
[tool.setuptools.packages.find]
70+
where = ["src"]
71+
include = ["projectairsim*"]
72+
73+
# Include non-Python data files inside the wheels/sdist.
74+
[tool.setuptools.package-data]
75+
# Adjust these globs if your schemas/assets live elsewhere under the package.
76+
"projectairsim" = ["schema/*.jsonc", "**/schema/*.jsonc"]
77+
"projectairsim.autonomy.gym_envs" = ["sim_config/*.jsonc", "*.ink"]
Lines changed: 5 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,8 @@
11
#!/usr/bin/env python
2-
# ProjectAirSim python client package
3-
42
from setuptools import setup
53

6-
7-
setup(
8-
name="projectairsim",
9-
version="2023.9.15",
10-
description="ProjectAirSim client package",
11-
long_description="To be populated from a README.md", # TODO Populate from a README.md
12-
package_dir={"": "src"},
13-
packages=[
14-
"projectairsim",
15-
"projectairsim.autonomy",
16-
"projectairsim.autonomy.models",
17-
"projectairsim.autonomy.models.backbone",
18-
"projectairsim.autonomy.gym_envs",
19-
"projectairsim.datacollection",
20-
"projectairsim.datacollection.augmentation",
21-
"projectairsim.datacollection.collection",
22-
"projectairsim.datacollection.randomization",
23-
"projectairsim.datacollection.trajectory",
24-
"projectairsim.datacollection.specs",
25-
"projectairsim.datacollection.validation",
26-
],
27-
include_package_data=True,
28-
package_data={
29-
"": ["schema/*.jsonc"],
30-
"projectairsim.autonomy.gym_envs": ["sim_config/*.jsonc", "*.ink"],
31-
},
32-
install_requires=[
33-
"pynng>=0.5.0",
34-
"msgpack>=1.0.5",
35-
"opencv-python>=4.2.0.32",
36-
"numpy",
37-
"matplotlib",
38-
"commentjson>=0.9.0",
39-
"jsonschema>=4.4.0",
40-
"inputs",
41-
"pqdict",
42-
"cryptography",
43-
"pykml",
44-
"junit-xml",
45-
"jsonlines",
46-
"Shapely",
47-
"azure-storage-blob",
48-
"open3d==0.16.*" # LidarDisplay view setting is broken from 0.17.0
49-
],
50-
python_requires=">=3.7, <4",
51-
extras_require={
52-
"autonomy": [
53-
"torch>=1.8.0",
54-
"torchvision>=0.9.0",
55-
"scikit-image>=0.18.1",
56-
"Pillow<=8.2.0", # Required since pip doesn't resolve gym's req ver
57-
"gym==0.18.3",
58-
"onnxruntime-gpu",
59-
"pydantic",
60-
"python-multipart",
61-
"fastapi",
62-
"uvicorn",
63-
],
64-
"bonsai": [
65-
"microsoft-bonsai-api==0.1.2",
66-
"python-dotenv==0.13.0",
67-
"bonsai-cli==1.0.8",
68-
"msal-extensions==0.1.3",
69-
],
70-
"datacollection": ["albumentations==1.3.0"],
71-
},
72-
)
4+
# Compatibility shim: all metadata is defined in pyproject.toml (PEP 621).
5+
# Keeping this file allows legacy workflows like:
6+
# python setup.py sdist bdist_wheel
7+
if __name__ == "__main__":
8+
setup()

0 commit comments

Comments
 (0)