11import os
2- from setuptools import setup , find_packages
2+
3+ from setuptools import find_packages , setup
34
45
56def read (fname ):
67 return open (os .path .join (os .path .dirname (__file__ ), fname )).read ()
78
8-
9- def requirements (fname ):
10- for line in open (os .path .join (os .path .dirname (__file__ ), fname )):
11- yield line .strip ()
9+ about_path = os .path .join (os .path .dirname (__file__ ), "mwoauth/about.py" )
10+ exec (compile (open (about_path ).read (), about_path , "exec" ))
1211
1312
14- # Read version from file shared with the module using technique from
15- # https://python-packaging-user-guide.readthedocs.io/en/latest/single_source_version/
16- base_dir = os .path .dirname (__file__ )
17- version = {}
18- with open (os .path .join (base_dir , 'mwoauth' , 'version.py' )) as fp :
19- exec (fp .read (), version )
20-
2113setup (
22- name = "mwoauth" ,
23- version = version [ ' __version__' ],
24- author = "Aaron Halfaker / Filippo Valsorda" ,
25- 26- description = ( "A generic MediaWiki OAuth handshake helper." ),
27- license = "MIT" ,
28- url = "https://github.com/halfak/MediaWiki-OAuth" ,
14+ name = __name__ , # noqa
15+ version = __version__ , # noqa
16+ author = __author__ , # noqa
17+ author_email = __author_email__ , # noqa
18+ description = __description__ , # noqa
19+ url = __url__ , # noqa
20+ license = __license__ , # noqa
2921 packages = find_packages (),
3022 long_description = read ('README.rst' ),
3123 install_requires = [
@@ -40,5 +32,5 @@ def requirements(fname):
4032 "Topic :: Security" ,
4133 "License :: OSI Approved :: MIT License" ,
4234 "Topic :: Software Development :: Libraries :: Python Modules"
43- ],
35+ ]
4436)
0 commit comments