Skip to content

Commit bd25d24

Browse files
author
Kazuki Suzuki Przyborowski
committed
Update
1 parent 585a36f commit bd25d24

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

pyproject.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[project]
2+
name = "PyArchiveFile"
3+
version = "0.17.4"
4+
readme = "README.md
5+
license = "BSD-3-Clause"
6+
keywords = []
7+
description = "A tar like file format name archivefile after unix cat command (concatenate files) ."
8+
authors = [
9+
{ name = "Kazuki Przyborowski", email = "kazuki.przyborowski@gmail.com" },
10+
]
11+

setup.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,26 @@
126126
pkg_resources.to_filename(pymodule['name'])+".egg-info\""))
127127
sys.exit()
128128

129+
if(len(sys.argv) > 1 and (sys.argv[1] == "buildcfg" or sys.argv[1] == "makecfg")):
130+
outcfgvar = """[project]
131+
name = "{}"
132+
version = "{}"
133+
readme = "README.md
134+
license = "BSD-3-Clause"
135+
keywords = []
136+
description = "{}"
137+
authors = [
138+
{{ name = "{}", email = "{}" }},
139+
]
140+
""".format(pymodule['name'], pymodule['version'], pymodule['description'], pymodule['author'], pymodule['authoremail'])
141+
mytoml = open("./pyproject.toml", "w")
142+
mytoml.write(outcfgvar)
143+
mytoml.flush()
144+
if(hasattr(os, "sync")):
145+
os.fsync(mytoml.fileno())
146+
mytoml.close()
147+
sys.exit()
148+
129149
setup(
130150
name=pymodule['name'],
131151
version=pymodule['version'],

0 commit comments

Comments
 (0)