Skip to content

Commit b641b69

Browse files
committed
🔨 minimize the changes in setup.py
1 parent fd798a0 commit b641b69

File tree

1 file changed

+20
-28
lines changed

1 file changed

+20
-28
lines changed

setup.py

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,12 @@
4141
VERSION = "0.5.0"
4242
EMAIL = "wangc_2011@hotmail.com"
4343
LICENSE = "MIT"
44-
ENTRY_POINTS = {
45-
"console_scripts": [
46-
"moban = moban.main:main"
47-
],
48-
}
49-
DESCRIPTION = (
50-
"Yet another jinja2 cli command for static text generation"
51-
)
44+
ENTRY_POINTS = {"console_scripts": ["moban = moban.main:main"]}
45+
DESCRIPTION = "Yet another jinja2 cli command for static text generation"
5246
URL = "https://github.com/moremoban/moban"
5347
DOWNLOAD_URL = "%s/archive/0.5.0.tar.gz" % URL
5448
FILES = ["README.rst", "CONTRIBUTORS.rst", "CHANGELOG.rst"]
55-
KEYWORDS = [
56-
"python",
57-
"jinja2",
58-
"moban",
59-
]
49+
KEYWORDS = ["python", "jinja2", "moban"]
6050

6151
CLASSIFIERS = [
6252
"Topic :: Software Development :: Libraries",
@@ -68,11 +58,8 @@
6858
"Programming Language :: Python :: 3.4",
6959
"Programming Language :: Python :: 3.5",
7060
"Programming Language :: Python :: 3.6",
71-
7261
"Programming Language :: Python :: 3.7",
73-
7462
"Programming Language :: Python :: 3.8",
75-
7663
]
7764

7865
INSTALL_REQUIRES = [
@@ -90,17 +77,23 @@
9077
EXTRAS_REQUIRE = {
9178
":python_version == '3.4'": ["ruamel.yaml>=0.15.5,<=0.15.94"],
9279
":python_version == '3.7'": ["ruamel.yaml>=0.15.42"],
93-
":python_version != '3.4' and python_version < '3.7'": ["ruamel.yaml>=0.15.5"],
80+
":python_version != '3.4' and python_version < '3.7'": [
81+
"ruamel.yaml>=0.15.5"
82+
],
9483
":python_version == '3.8'": ["ruamel.yaml>=0.15.98"],
9584
}
9685
# You do not need to read beyond this line
97-
PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable)
98-
GS_COMMAND = ("gs moban v0.5.0 " +
99-
"Find 0.5.0 in changelog for more details")
100-
NO_GS_MESSAGE = ("Automatic github release is disabled. " +
101-
"Please install gease to enable it.")
86+
PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(
87+
sys.executable
88+
)
89+
GS_COMMAND = "gs moban v0.5.0 " + "Find 0.5.0 in changelog for more details"
90+
NO_GS_MESSAGE = (
91+
"Automatic github release is disabled. "
92+
+ "Please install gease to enable it."
93+
)
10294
UPLOAD_FAILED_MSG = (
103-
'Upload failed. please run "%s" yourself.' % PUBLISH_COMMAND)
95+
'Upload failed. please run "%s" yourself.' % PUBLISH_COMMAND
96+
)
10497
HERE = os.path.abspath(os.path.dirname(__file__))
10598

10699

@@ -143,9 +136,7 @@ def run(self):
143136
sys.exit()
144137

145138

146-
SETUP_COMMANDS.update({
147-
"publish": PublishCommand
148-
})
139+
SETUP_COMMANDS.update({"publish": PublishCommand})
149140

150141

151142
def has_gease():
@@ -156,6 +147,7 @@ def has_gease():
156147
"""
157148
try:
158149
import gease # noqa
150+
159151
return True
160152
except ImportError:
161153
return False
@@ -210,8 +202,8 @@ def filter_out_test_code(file_handle):
210202
# Replace _markerlib.default_environment to return a custom dict
211203
# that has all the necessary markers, and ignores any writes.
212204

213-
class Python3MarkerDict(dict):
214205

206+
class Python3MarkerDict(dict):
215207
def __setitem__(self, key, value):
216208
pass
217209

@@ -266,5 +258,5 @@ def default_environment():
266258
zip_safe=False,
267259
entry_points=ENTRY_POINTS,
268260
classifiers=CLASSIFIERS,
269-
cmdclass=SETUP_COMMANDS
261+
cmdclass=SETUP_COMMANDS,
270262
)

0 commit comments

Comments
 (0)