Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit58820a5

Browse files
authored
Update setup.py
format path -> os.path in prep for pathlib
1 parente488ce3 commit58820a5

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

‎setup.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
importfnmatch
66
importos
77
importsys
8-
fromosimportpath
98

10-
withopen(path.join(path.dirname(__file__),'VERSION'))asv:
9+
withopen(os.path.join(os.path.dirname(__file__),'VERSION'))asv:
1110
VERSION=v.readline().strip()
1211

1312
withopen('requirements.txt')asreqs_file:
@@ -22,8 +21,8 @@
2221
classbuild_py(_build_py):
2322

2423
defrun(self)->None:
25-
init=path.join(self.build_lib,'git','__init__.py')
26-
ifpath.exists(init):
24+
init=os.path.join(self.build_lib,'git','__init__.py')
25+
ifos.path.exists(init):
2726
os.unlink(init)
2827
_build_py.run(self)
2928
_stamp_version(init)
@@ -34,10 +33,10 @@ class sdist(_sdist):
3433

3534
defmake_release_tree(self,base_dir:str,files:Sequence)->None:
3635
_sdist.make_release_tree(self,base_dir,files)
37-
orig=path.join('git','__init__.py')
38-
assertpath.exists(orig),orig
39-
dest=path.join(base_dir,orig)
40-
ifhasattr(os,'link')andpath.exists(dest):
36+
orig=os.path.join('git','__init__.py')
37+
assertos.path.exists(orig),orig
38+
dest=os.path.join(base_dir,orig)
39+
ifhasattr(os,'link')andos.path.exists(dest):
4140
os.unlink(dest)
4241
self.copy_file(orig,dest)
4342
_stamp_version(dest)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp