Skip to content

Commit 48e4978

Browse files
author
Kazuki Suzuki Przyborowski
committed
Ver up added toml file
1 parent d12e30f commit 48e4978

7 files changed

Lines changed: 42 additions & 12 deletions

File tree

pyproject.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[project]
2+
name = "PyWWW-Get"
3+
version = "2.1.2"
4+
readme = "README.md"
5+
license = { text = "BSD-3-Clause" }
6+
keywords = []
7+
description = "Python libary/module to download files."
8+
authors = [
9+
{ name = "Kazuki Przyborowski", email = "kazuki.przyborowski@gmail.com" },
10+
]
11+

pywwwget-dl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
Copyright 2016-2023 Game Maker 2k - https://github.com/GameMaker2k
1313
Copyright 2016-2023 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
1414
15-
$FileInfo: pywwwget-dl.py - Last Update: 10/5/2023 Ver. 2.0.2 RC 1 - Author: cooldude2k $
15+
$FileInfo: pywwwget-dl.py - Last Update: 10/22/2024 Ver. 2.1.2 RC 1 - Author: cooldude2k $
1616
'''
1717

1818
from __future__ import absolute_import, division, print_function, unicode_literals, generators, with_statement, nested_scopes

pywwwget.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
Copyright 2016-2023 Game Maker 2k - https://github.com/GameMaker2k
1313
Copyright 2016-2023 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
1414
15-
$FileInfo: pywwwget.py - Last Update: 10/22/2024 Ver. 2.1.0 RC 1 - Author: cooldude2k $
15+
$FileInfo: pywwwget.py - Last Update: 10/22/2024 Ver. 2.1.2 RC 1 - Author: cooldude2k $
1616
'''
1717

1818
from __future__ import absolute_import, division, print_function, unicode_literals, generators, with_statement, nested_scopes
@@ -159,7 +159,7 @@
159159
__program_small_name__ = "wwwget"
160160
__project__ = __program_name__
161161
__project_url__ = "https://github.com/GameMaker2k/PyWWW-Get"
162-
__version_info__ = (2, 1, 0, "RC 1", 1)
162+
__version_info__ = (2, 1, 2, "RC 1", 1)
163163
__version_date_info__ = (2024, 10, 22, "RC 1", 1)
164164
__version_date__ = str(__version_date_info__[0])+"."+str(__version_date_info__[
165165
1]).zfill(2)+"."+str(__version_date_info__[2]).zfill(2)

pywwwgetmini.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
1414
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
1515
16-
$FileInfo: pywwwget.py - Last Update: 10/22/2024 Ver. 2.1.0 RC 1 - Author: cooldude2k $
16+
$FileInfo: pywwwget.py - Last Update: 10/22/2024 Ver. 2.1.2 RC 1 - Author: cooldude2k $
1717
'''
1818

1919
from __future__ import absolute_import, division, print_function, unicode_literals, generators, with_statement, nested_scopes
@@ -127,7 +127,7 @@
127127
__program_small_name__ = "wwwget"
128128
__project__ = __program_name__
129129
__project_url__ = "https://github.com/GameMaker2k/PyWWW-Get"
130-
__version_info__ = (2, 1, 0, "RC 1", 1)
130+
__version_info__ = (2, 1, 2, "RC 1", 1)
131131
__version_date_info__ = (2024, 10, 22, "RC 1", 1)
132132
__version_date__ = str(__version_date_info__[0])+"."+str(__version_date_info__[
133133
1]).zfill(2)+"."+str(__version_date_info__[2]).zfill(2)

pywwwgetold-dl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
Copyright 2016-2023 Game Maker 2k - https://github.com/GameMaker2k
1313
Copyright 2016-2023 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
1414
15-
$FileInfo: pywwwget-dl.py - Last Update: 10/5/2023 Ver. 2.0.2 RC 1 - Author: cooldude2k $
15+
$FileInfo: pywwwget-dl.py - Last Update: 10/22/2024 Ver. 2.1.2 RC 1 - Author: cooldude2k $
1616
'''
1717

1818
from __future__ import absolute_import, division, print_function, unicode_literals, generators, with_statement, nested_scopes

pywwwgetold.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
Copyright 2016-2023 Game Maker 2k - https://github.com/GameMaker2k
1313
Copyright 2016-2023 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
1414
15-
$FileInfo: pywwwgetold.py - Last Update: 10/22/2024 Ver. 2.1.0 RC 1 - Author: cooldude2k $
15+
$FileInfo: pywwwgetold.py - Last Update: 10/22/2024 Ver. 2.1.2 RC 1 - Author: cooldude2k $
1616
'''
1717

1818
from __future__ import absolute_import, division, print_function, unicode_literals, generators, with_statement, nested_scopes
@@ -159,7 +159,7 @@
159159
__program_small_name__ = "wwwget"
160160
__project__ = __program_name__
161161
__project_url__ = "https://github.com/GameMaker2k/PyWWW-Get"
162-
__version_info__ = (2, 1, 0, "RC 1", 1)
162+
__version_info__ = (2, 1, 2, "RC 1", 1)
163163
__version_date_info__ = (2024, 10, 22, "RC 1", 1)
164164
__version_date__ = str(__version_date_info__[0])+"."+str(__version_date_info__[
165165
1]).zfill(2)+"."+str(__version_date_info__[2]).zfill(2)

setup.py

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import shutil
2323
import datetime
2424
import platform
25-
import pkg_resources
2625
from setuptools import setup, find_packages
2726

2827
# Open and read the version info file in a Python 2/3 compatible way
@@ -110,8 +109,8 @@
110109
print(pymodule_data)
111110
sys.exit()
112111
if(len(sys.argv) > 1 and (sys.argv[1] == "sourceinfo" or sys.argv[1] == "getsourceinfo")):
113-
srcinfofilename = os.path.realpath("."+os.path.sep+pkg_resources.to_filename(
114-
pymodule['name'])+".egg-info"+os.path.sep+"SOURCES.txt")
112+
srcinfofilename = os.path.realpath("."+os.path.sep+
113+
pymodule['name'].replace('-', '_')+".egg-info"+os.path.sep+"SOURCES.txt")
115114
srcinfofile = open(srcinfofilename, "r")
116115
srcinfodata = srcinfofile.read()
117116
srcinfofile.close()
@@ -125,7 +124,27 @@
125124
if(len(sys.argv) > 1 and sys.argv[1] == "cleansourceinfo"):
126125
os.system("rm -rfv \""+os.path.realpath("."+os.path.sep+"dist\""))
127126
os.system("rm -rfv \""+os.path.realpath("."+os.path.sep +
128-
pkg_resources.to_filename(pymodule['name'])+".egg-info\""))
127+
pymodule['name'].replace('-', '_')+".egg-info\""))
128+
sys.exit()
129+
130+
if(len(sys.argv) > 1 and (sys.argv[1] == "buildcfg" or sys.argv[1] == "makecfg")):
131+
outcfgvar = """[project]
132+
name = "{}"
133+
version = "{}"
134+
readme = "README.md"
135+
license = {{ text = "BSD-3-Clause" }}
136+
keywords = []
137+
description = "{}"
138+
authors = [
139+
{{ name = "{}", email = "{}" }},
140+
]
141+
""".format(pymodule['name'], pymodule['version'], pymodule['description'], pymodule['author'], pymodule['authoremail'])
142+
mytoml = open("./pyproject.toml", "w")
143+
mytoml.write(outcfgvar)
144+
mytoml.flush()
145+
if(hasattr(os, "sync")):
146+
os.fsync(mytoml.fileno())
147+
mytoml.close()
129148
sys.exit()
130149

131150
setup(

0 commit comments

Comments
 (0)