Skip to content

Commit aaa0e13

Browse files
authored
Merge pull request #3167 from boutproject/better-pypi-package-master
Better pypi package (master)
2 parents de1542e + af37dff commit aaa0e13

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tools/pylib/_boutpp_build/backend.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,16 @@ def build_sdist(sdist_directory, config_settings=None):
216216
f"""Metadata-Version: 2.1
217217
Name: {pkgname}
218218
Version: {getversion()}
219-
License-File: COPYING
220219
"""
221220
)
221+
with open("LICENSE") as src:
222+
pre = "License: "
223+
for l in src:
224+
f.write(f"{pre}{l}")
225+
pre = " "
226+
f.write("Description-Content-Type: text/markdown\n\n")
227+
with open("README.md") as src:
228+
f.write(src.read())
222229
run(
223230
f"tar --append -f {sdist_directory}/{fname} _version.txt --xform='s\\_version.txt\\{prefix}/_version.txt\\'"
224231
)

0 commit comments

Comments
 (0)