Debian Codegraph @

pyproject.toml

raw ◀ ▶
1 Debian patch touch this file
1 [build-system]
2 requires = [
3 "setuptools>=77",
4 "setuptools-scm>=8.1.0",
5 ]
6 build-backend = "setuptools.build_meta"
7
8
9 [project]
10 name = "mercurial"
11 authors = [
12 {name = "Olivia Mackall and many others", email = "[email protected]"},
13 ]
14 description="Fast scalable distributed SCM (revision control, version control) system"
15 readme = "README.rst"
16 requires-python = ">=3.9"
17 license = "GPL-2.0-or-later"
18 license-files = ["COPYING"]
19 classifiers=[
20 "Development Status :: 6 - Mature",
21 "Environment :: Console",
22 "Intended Audience :: Developers",
23 "Intended Audience :: System Administrators",
24 "Natural Language :: Danish",
25 "Natural Language :: English",
26 "Natural Language :: German",
27 "Natural Language :: Italian",
28 "Natural Language :: Japanese",
29 "Natural Language :: Portuguese (Brazilian)",
30 "Operating System :: Microsoft :: Windows",
31 "Operating System :: OS Independent",
32 "Operating System :: POSIX",
33 "Programming Language :: C",
34 "Programming Language :: Python",
35 "Topic :: Software Development :: Version Control",
36 ]
37 dynamic = ["version"]
38
39 [project.urls]
40 home = "https://mercurial-scm.org/"
41 download_url = "https://mercurial-scm.org/release/"
42
43 [project.optional-dependencies]
44 # This is currently only useful for --pure install.
45 # However it is is really handy there as it let a pure install access zstd
46 # compressed repositories. And such repository have been the default format for
47 # years.
48 zstd = [
49 "zstandard"
50 ]
51
52
53 [tool.setuptools]
54 # no automatic include
55 include-package-data = false
56
57
58 [tool.uv]
59 # Rebuild for each `make local` call and avoid wrong caching
60 #
61 # See https://github.com/astral-sh/uv/issues/2152
62 reinstall-package = ["mercurial"]
63
64
65 [tool.black]
66 line-length = 80
67 include = '\.py$'
68 extend-exclude = '''
69 build/
70 | wheelhouse/
71 | dist/
72 | packages/
73 | __pycache__/
74 | \.pytype/
75 | \.hg/
76 | \.mypy_cache/
77 | \.venv/
78 | mercurial/locale/
79 | mercurial/thirdparty/
80 '''
81 required-version = "23"
82 skip-string-normalization = true
83 quiet = true
84
85
86 [tool.cibuildwheel]
87 build = ["cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*", "cp314-*"]
88
89 # Don't stockpile wheels in the pip cache directory when they get built, since
90 # there's no mechanism to age old ones out.
91 build-frontend = { name = "pip", args = ["--no-cache-dir"] }
92
93 # Build translations; requires msgfmt.exe on PATH.
94 environment = { MERCURIAL_SETUP_FORCE_TRANSLATIONS="1" }
95
96 # Prevent building pypy wheels, which is broken.
97 skip = "pp*"
98
99 # Tests are run separately, but some values like "*-win_arm64" avoid a warning
100 # on amd64 Windows about not being able to test without an arm64 runner. That's
101 # likely to be an issue elsewhere too, like testing amd64 on an arm64 mac.
102 test-skip = "*"
103
104
105 [tool.cibuildwheel.macos]
106 # See https://cibuildwheel.pypa.io/en/stable/faq/#what-to-provide for reasons
107 # to also build "x86_64". Further discussion here:
108 # https://github.com/pypa/cibuildwheel/issues/1333
109 # https://github.com/python-cffi/cffi/issues/133
110 #
111 # NOTE: this is overridden in heptapod-ci.yml because the current CI system
112 # doesn't support arm64 builds.
113 archs = ["universal2"]
114
115
116 [[tool.cibuildwheel.overrides]]
117 select = "*-macosx_*"
118
119 # The minimum value is adjusted automatically when building for later Pythons
120 #
121 # Python Version Minimum macOS
122 # --------------------------------------
123 # Intel CPython 3.6-3.11 10.9
124 # Intel CPython 3.12+ 10.13
125 # AS CPython or PyPy 11
126 inherit.environment = "append"
127 environment = { MACOSX_DEPLOYMENT_TARGET="10.9" }
128
129
130 [tool.cibuildwheel.windows]
131 archs = ["x86", "AMD64", "ARM64"]
132
133
134 [tool.setuptools_scm]
135 # this use `<last-tag>.post1.dev<distance>
136 #
137 # To restore the format introduced for 6.9 nightly build we would need to be
138 # able to customise the `post1` section to avoid flip-flopping update between
139 # unrelated branches. It would need to be changed to:
140 # - post0: for the "stable" branch
141 # - post1: for the "default" branch
142 # - post2: for any other branch
143 version_scheme = "no-guess-dev"
144
145 # The "node-and-timestamp" option seems better but we cannot use it as it make
146 # `pip install` freaks out with the following warning resulting in an error in
147 # the end::
148 #
149 # WARNING: Built wheel for mercurial is invalid: Wheel has unexpected file name: expected 'x.y.z.post1.devXXX+hdeadbeef.d20250218231130', got 'x.y.z.post1.devXXX+hdeadbeef.d20250218231133'
150 # Failed to build mercurial
151 # ERROR: Failed to build installable wheels for some pyproject.toml based projects (mercurial)
152 local_scheme = "node-and-date"