|
1 | 1 | [build-system] |
2 | | -requires = ["setuptools>=63.0"] |
3 | | -build-backend = "setuptools.build_meta" |
| 2 | +requires = ["hatchling>1.24","setuptools>=65.0","hatch-requirements-txt>=0.4.1"] |
| 3 | +build-backend = "hatchling.build" |
4 | 4 |
|
5 | 5 | [project] |
6 | 6 | name = "pymongo" |
@@ -45,16 +45,27 @@ Documentation = "https://pymongo.readthedocs.io" |
45 | 45 | Source = "https://github.com/mongodb/mongo-python-driver" |
46 | 46 | Tracker = "https://jira.mongodb.org/projects/PYTHON/issues" |
47 | 47 |
|
48 | | -[tool.setuptools.dynamic] |
49 | | -version = {attr = "pymongo._version.__version__"} |
| 48 | +# Used to call hatch_build.py |
| 49 | +[tool.hatch.build.hooks.custom] |
50 | 50 |
|
51 | | -[tool.setuptools.packages.find] |
52 | | -include = ["bson","gridfs", "pymongo"] |
| 51 | +[tool.hatch.version] |
| 52 | +path = "pymongo/_version.py" |
53 | 53 |
|
54 | | -[tool.setuptools.package-data] |
55 | | -bson=["py.typed", "*.pyi"] |
56 | | -pymongo=["py.typed", "*.pyi"] |
57 | | -gridfs=["py.typed", "*.pyi"] |
| 54 | +[tool.hatch.build.targets.wheel] |
| 55 | +packages = ["bson","gridfs", "pymongo"] |
| 56 | + |
| 57 | +[tool.hatch.metadata.hooks.requirements_txt] |
| 58 | +files = ["requirements.txt"] |
| 59 | + |
| 60 | +[tool.hatch.metadata.hooks.requirements_txt.optional-dependencies] |
| 61 | +aws = ["requirements/aws.txt"] |
| 62 | +docs = ["requirements/docs.txt"] |
| 63 | +encryption = ["requirements/encryption.txt"] |
| 64 | +gssapi = ["requirements/gssapi.txt"] |
| 65 | +ocsp = ["requirements/ocsp.txt"] |
| 66 | +snappy = ["requirements/snappy.txt"] |
| 67 | +test = ["requirements/test.txt"] |
| 68 | +zstd = ["requirements/zstd.txt"] |
58 | 69 |
|
59 | 70 | [tool.pytest.ini_options] |
60 | 71 | minversion = "7" |
@@ -168,6 +179,7 @@ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?)|dummy.*)$" |
168 | 179 | "UP031", "F401", "B023", "F811"] |
169 | 180 | "tools/*.py" = ["T201"] |
170 | 181 | "green_framework_test.py" = ["T201"] |
| 182 | +"hatch_build.py" = ["S"] |
171 | 183 |
|
172 | 184 | [tool.coverage.run] |
173 | 185 | branch = true |
|
0 commit comments