Skip to content

Commit a2b35b6

Browse files
committed
bump
1 parent f39dbbc commit a2b35b6

File tree

2 files changed

+43
-42
lines changed

2 files changed

+43
-42
lines changed

bump.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from subprocess import check_output
66

77

8-
log = logging.getLogger('' if __name__ == '__main__' else __name__)
8+
log = logging.getLogger("" if __name__ == "__main__" else __name__)
99

1010
VERSION_FILE_TEMPLATE = '''
1111
# encoding: utf8',
@@ -21,30 +21,30 @@
2121
def git_version():
2222
# construct minimal environment
2323
env = {
24-
'LANG': 'C',
25-
'LANGUAGE': 'C',
26-
'LC_ALL': 'C',
27-
'PATH': environ.get('PATH'),
28-
'SYSTEMROOT': environ.get('SYSTEMROOT'),
24+
"LANG": "C",
25+
"LANGUAGE": "C",
26+
"LC_ALL": "C",
27+
"PATH": environ.get("PATH"),
28+
"SYSTEMROOT": environ.get("SYSTEMROOT"),
2929
}
3030

3131
env = {k: v for k, v in env.items() if v is not None}
3232

3333
try:
34-
output = check_output(['git', 'describe', '--long'], env=env).decode()
34+
output = check_output(["git", "describe", "--long"], env=env).decode()
3535
except OSError:
36-
output = 'v0.0.0-g'
36+
output = "v0.0.0-g"
3737

38-
version, commits, commit_hash = output.lstrip('v').strip().rsplit('-', 2)
38+
version, commits, commit_hash = output.lstrip("v").strip().rsplit("-", 2)
3939

4040
return (
41-
tuple(map(int, version.split('.'))),
41+
tuple(map(int, version.split("."))),
4242
int(commits),
4343
commit_hash,
4444
)
4545

4646

47-
def update_version(filename='version.py'):
47+
def update_version(filename="version.py"):
4848
version, commits, commit_hash = git_version()
4949

5050
major, minor = version
@@ -53,26 +53,26 @@ def update_version(filename='version.py'):
5353
major=major,
5454
minor=minor,
5555
commits=commits,
56-
commit_hash=commit_hash
56+
commit_hash=commit_hash,
5757
)
5858

5959
log.info(
60-
'Writing version %s.%s.%s-%s to %r',
60+
"Writing version %s.%s.%s-%s to %r",
6161
major, minor, commits, commit_hash,
6262
filename,
6363
)
6464

65-
with open(filename, 'w+') as version_file:
65+
with open(filename, "w+") as version_file:
6666
version_file.write(content.lstrip())
6767

6868

69-
if __name__ == '__main__':
69+
if __name__ == "__main__":
7070
# Just for manual testing
7171
from argparse import ArgumentParser
7272

7373
parser = ArgumentParser()
74-
parser.add_argument('version_file')
74+
parser.add_argument("version_file")
7575
arguments = parser.parse_args()
76-
logging.basicConfig(level=logging.INFO, format='%(message)s')
76+
logging.basicConfig(level=logging.INFO, format="%(message)s")
7777

7878
update_version(arguments.version_file)

setup.py

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import os
2-
from setuptools import setup, find_packages
32
from importlib.machinery import SourceFileLoader
43

4+
from setuptools import find_packages, setup
55

6-
module_name = 'jwt_rsa'
6+
7+
module_name = "jwt_rsa"
78

89
module = SourceFileLoader(
910
module_name,
10-
os.path.join(module_name, '__init__.py')
11+
os.path.join(module_name, "__init__.py"),
1112
).load_module()
1213

1314

@@ -18,7 +19,7 @@ def load_requirements(fname):
1819

1920

2021
setup(
21-
name='pyjwt-rsa',
22+
name="pyjwt-rsa",
2223
version=module.__version__,
2324
author=module.__author__,
2425
author_email=module.authors_email,
@@ -27,31 +28,31 @@ def load_requirements(fname):
2728
long_description=open("README.rst").read(),
2829
platforms="all",
2930
classifiers=[
30-
'Intended Audience :: Developers',
31-
'Natural Language :: Russian',
32-
'Operating System :: MacOS',
33-
'Operating System :: POSIX',
34-
'Programming Language :: Python',
35-
'Programming Language :: Python :: 3',
36-
'Programming Language :: Python :: 3.5',
37-
'Programming Language :: Python :: 3.6',
38-
'Programming Language :: Python :: 3.7',
39-
'Programming Language :: Python :: 3.8',
40-
'Programming Language :: Python :: Implementation :: CPython',
41-
'Topic :: Security',
31+
"Intended Audience :: Developers",
32+
"Natural Language :: Russian",
33+
"Operating System :: MacOS",
34+
"Operating System :: POSIX",
35+
"Programming Language :: Python",
36+
"Programming Language :: Python :: 3",
37+
"Programming Language :: Python :: 3.5",
38+
"Programming Language :: Python :: 3.6",
39+
"Programming Language :: Python :: 3.7",
40+
"Programming Language :: Python :: 3.8",
41+
"Programming Language :: Python :: Implementation :: CPython",
42+
"Topic :: Security",
4243
],
43-
packages=find_packages(exclude=['tests']),
44-
install_requires=load_requirements('requirements.txt'),
44+
packages=find_packages(exclude=["tests"]),
45+
install_requires=load_requirements("requirements.txt"),
4546
extras_require={
46-
'develop': load_requirements('requirements.dev.txt'),
47+
"develop": load_requirements("requirements.dev.txt"),
4748
},
4849
entry_points={
49-
'console_scripts': [
50-
'jwt-rsa-keygen = {}.keygen:main'.format(module_name),
51-
'jwt-rsa-verify = {}.verify:main'.format(module_name),
52-
'jwt-rsa-issue= {}.issue:main'.format(module_name),
53-
]
50+
"console_scripts": [
51+
"jwt-rsa-keygen = {}.keygen:main".format(module_name),
52+
"jwt-rsa-verify = {}.verify:main".format(module_name),
53+
"jwt-rsa-issue= {}.issue:main".format(module_name),
54+
],
5455
},
5556
python_requires=">=3.5, <4",
56-
url='https://github.com/mosquito/pyjwt-rsa'
57+
url="https://github.com/mosquito/pyjwt-rsa",
5758
)

0 commit comments

Comments
 (0)