1
+ from typing import Sequence
1
2
from setuptools import setup , find_packages
2
3
from setuptools .command .build_py import build_py as _build_py
3
4
from setuptools .command .sdist import sdist as _sdist
18
19
19
20
class build_py (_build_py ):
20
21
21
- def run (self ):
22
+ def run (self ) -> None :
22
23
init = path .join (self .build_lib , 'git' , '__init__.py' )
23
24
if path .exists (init ):
24
25
os .unlink (init )
@@ -29,7 +30,7 @@ def run(self):
29
30
30
31
class sdist (_sdist ):
31
32
32
- def make_release_tree (self , base_dir , files ) :
33
+ def make_release_tree (self , base_dir : str , files : Sequence ) -> None :
33
34
_sdist .make_release_tree (self , base_dir , files )
34
35
orig = path .join ('git' , '__init__.py' )
35
36
assert path .exists (orig ), orig
@@ -40,7 +41,7 @@ def make_release_tree(self, base_dir, files):
40
41
_stamp_version (dest )
41
42
42
43
43
- def _stamp_version (filename ) :
44
+ def _stamp_version (filename : str ) -> None :
44
45
found , out = False , []
45
46
try :
46
47
with open (filename , 'r' ) as f :
@@ -59,7 +60,7 @@ def _stamp_version(filename):
59
60
print ("WARNING: Couldn't find version line in file %s" % filename , file = sys .stderr )
60
61
61
62
62
- def build_py_modules (basedir , excludes = ()):
63
+ def build_py_modules (basedir : str , excludes : Sequence = ()) -> Sequence :
63
64
# create list of py_modules from tree
64
65
res = set ()
65
66
_prefix = os .path .basename (basedir )
@@ -90,7 +91,7 @@ def build_py_modules(basedir, excludes=()):
90
91
include_package_data = True ,
91
92
py_modules = build_py_modules ("./git" , excludes = ["git.ext.*" ]),
92
93
package_dir = {'git' : 'git' },
93
- python_requires = '>=3.6 ' ,
94
+ python_requires = '>=3.7 ' ,
94
95
install_requires = requirements ,
95
96
tests_require = requirements + test_requirements ,
96
97
zip_safe = False ,
@@ -114,9 +115,9 @@ def build_py_modules(basedir, excludes=()):
114
115
"Operating System :: MacOS :: MacOS X" ,
115
116
"Programming Language :: Python" ,
116
117
"Programming Language :: Python :: 3" ,
117
- "Programming Language :: Python :: 3.6" ,
118
118
"Programming Language :: Python :: 3.7" ,
119
119
"Programming Language :: Python :: 3.8" ,
120
120
"Programming Language :: Python :: 3.9"
121
+ "Programming Language :: Python :: 3.10"
121
122
]
122
123
)
0 commit comments