1+ from typing import Sequence
12from setuptools import setup , find_packages
23from setuptools .command .build_py import build_py as _build_py
34from setuptools .command .sdist import sdist as _sdist
1819
1920class build_py (_build_py ):
2021
21- def run (self ):
22+ def run (self ) -> None :
2223 init = path .join (self .build_lib , 'git' , '__init__.py' )
2324 if path .exists (init ):
2425 os .unlink (init )
@@ -29,7 +30,7 @@ def run(self):
2930
3031class sdist (_sdist ):
3132
32- def make_release_tree (self , base_dir , files ) :
33+ def make_release_tree (self , base_dir : str , files : Sequence ) -> None :
3334 _sdist .make_release_tree (self , base_dir , files )
3435 orig = path .join ('git' , '__init__.py' )
3536 assert path .exists (orig ), orig
@@ -40,7 +41,7 @@ def make_release_tree(self, base_dir, files):
4041 _stamp_version (dest )
4142
4243
43- def _stamp_version (filename ) :
44+ def _stamp_version (filename : str ) -> None :
4445 found , out = False , []
4546 try :
4647 with open (filename , 'r' ) as f :
@@ -59,7 +60,7 @@ def _stamp_version(filename):
5960 print ("WARNING: Couldn't find version line in file %s" % filename , file = sys .stderr )
6061
6162
62- def build_py_modules (basedir , excludes = ()):
63+ def build_py_modules (basedir : str , excludes : Sequence = ()) -> Sequence :
6364 # create list of py_modules from tree
6465 res = set ()
6566 _prefix = os .path .basename (basedir )
@@ -90,7 +91,7 @@ def build_py_modules(basedir, excludes=()):
9091 include_package_data = True ,
9192 py_modules = build_py_modules ("./git" , excludes = ["git.ext.*" ]),
9293 package_dir = {'git' : 'git' },
93- python_requires = '>=3.6 ' ,
94+ python_requires = '>=3.7 ' ,
9495 install_requires = requirements ,
9596 tests_require = requirements + test_requirements ,
9697 zip_safe = False ,
@@ -114,9 +115,9 @@ def build_py_modules(basedir, excludes=()):
114115 "Operating System :: MacOS :: MacOS X" ,
115116 "Programming Language :: Python" ,
116117 "Programming Language :: Python :: 3" ,
117- "Programming Language :: Python :: 3.6" ,
118118 "Programming Language :: Python :: 3.7" ,
119119 "Programming Language :: Python :: 3.8" ,
120120 "Programming Language :: Python :: 3.9"
121+ "Programming Language :: Python :: 3.10"
121122 ]
122123)
0 commit comments